Calendar
[ class tree: Calendar ] [ index: Calendar ] [ all elements ]

Class: Calendar_Decorator_Uri

Source Location: /Calendar-0.5.5/Decorator/Uri.php

Class Overview

Calendar_Decorator
   |
   --Calendar_Decorator_Uri

Decorator to help with building HTML links for navigating the calendar


Author(s):

Copyright:

  • 2003-2007 Harry Fuecks, Lorenzo Alberton

Methods


Inherited Variables

Inherited Methods

Class: Calendar_Decorator

Calendar_Decorator::Calendar_Decorator()
Constructs the Calendar_Decorator
Calendar_Decorator::adjust()
Adjusts the date (helper method)
Calendar_Decorator::build()
Build the children
Calendar_Decorator::fetch()
Iterator method for fetching child Calendar subclass objects (e.g. a minute from an hour object). On reaching the end of the collection, returns false and resets the collection for further iteratations.
Calendar_Decorator::fetchAll()
Fetches all child from the current collection of children
Calendar_Decorator::getTimestamp()
Returns a timestamp from the current date / time values. Format of timestamp depends on Calendar_Engine implementation being used
Calendar_Decorator::getValidator()
Returns an instance of Calendar_Validator
Calendar_Decorator::isEmpty()
Check if the current object is empty
Calendar_Decorator::isFirst()
Returns true if Day object is first in a Week Only relevant when Day is created by Calendar_Month_Weekdays::build()
Calendar_Decorator::isLast()
Returns true if Day object is last in a Week Only relevant when Day is created by Calendar_Month_Weekdays::build()
Calendar_Decorator::isSelected()
True if the calendar subclass object is selected (e.g. today)
Calendar_Decorator::isValid()
Determine whether this date is valid, with the bounds determined by the Calendar_Engine. The call is passed on to Calendar_Validator::isValid
Calendar_Decorator::nextDay()
Returns the value for the next day
Calendar_Decorator::nextHour()
Returns the value for the next hour
Calendar_Decorator::nextMinute()
Returns the value for the next minute
Calendar_Decorator::nextMonth()
Returns the value for next month
Calendar_Decorator::nextSecond()
Returns the value for the next second
Calendar_Decorator::nextWeek()
Returns the value for next week
Calendar_Decorator::nextYear()
Returns the value for next year
Calendar_Decorator::prevDay()
Returns the value for the previous day
Calendar_Decorator::prevHour()
Returns the value for the previous hour
Calendar_Decorator::prevMinute()
Returns the value for the previous minute
Calendar_Decorator::prevMonth()
Returns the value for the previous month
Calendar_Decorator::prevSecond()
Returns the value for the previous second
Calendar_Decorator::prevWeek()
Returns the value for the previous week
Calendar_Decorator::prevYear()
Returns the value for the previous year
Calendar_Decorator::setSelected()
Defines calendar object as selected (e.g. for today)
Calendar_Decorator::setTimestamp()
Defines the calendar by a Unix timestamp, replacing values passed to the constructor
Calendar_Decorator::size()
Get the number Calendar subclass objects stored in the internal collection
Calendar_Decorator::thisDay()
Returns the value for this day
Calendar_Decorator::thisHour()
Returns the value for this hour
Calendar_Decorator::thisMinute()
Returns the value for this minute
Calendar_Decorator::thisMonth()
Returns the value for this month
Calendar_Decorator::thisSecond()
Returns the value for this second
Calendar_Decorator::thisWeek()
Returns the value for this week
Calendar_Decorator::thisYear()
Returns the value for this year
Calendar_Decorator::toArray()
Returns the date as an associative array (helper method)

Class Details

[line 79]
Decorator to help with building HTML links for navigating the calendar

Note: for performance you should prefer Calendar_Util_Uri unless you have a specific need to use a decorator

  1.  $Day = new Calendar_Day(20031023);
  2.  $Uri = new Calendar_Decorator_Uri($Day);
  3.  $Uri->setFragments('year''month''day');
  4.  echo $Uri->getPrev()// Displays year=2003&month=10&day=22



[ Top ]


Method Detail

Calendar_Decorator_Uri (Constructor)   [line 95]

Calendar_Decorator_Uri Calendar_Decorator_Uri( object &$Calendar)

Constructs Calendar_Decorator_Uri
  • Access: public

Parameters:

object   &$Calendar   —  subclass of Calendar

[ Top ]

next   [line 178]

string next( string $method)

Gets the URI string for the next calendar unit
  • Access: public

Parameters:

string   $method   —  calendar unit to fetch uri for (year,month,week or day etc)

[ Top ]

prev   [line 152]

string prev( string $method)

Gets the URI string for the previous calendar unit
  • Access: public

Parameters:

string   $method   —  calendar unit to fetch uri for (year, month, week or day etc)

[ Top ]

setFragments   [line 113]

void setFragments( string $y, [string $m = null], [string $d = null], [string $h = null], [string $i = null], [string $s = null])

Sets the URI fragment names
  • Access: public

Parameters:

string   $y   —  URI fragment for year
string   $m   —  (optional) URI fragment for month
string   $d   —  (optional) URI fragment for day
string   $h   —  (optional) URI fragment for hour
string   $i   —  (optional) URI fragment for minute
string   $s   —  (optional) URI fragment for second

[ Top ]

setScalar   [line 139]

void setScalar( [boolean $state = true])

Puts Uri decorator into "scalar mode" - URI variable names are not returned
  • Access: public

Parameters:

boolean   $state   —  (optional)

[ Top ]

setSeparator   [line 126]

void setSeparator( string $separator)

Sets the separator string between fragments
  • Access: public

Parameters:

string   $separator   —  url fragment separator e.g. /

[ Top ]

this   [line 165]

string this( string $method)

Gets the URI string for the current calendar unit
  • Access: public

Parameters:

string   $method   —  calendar unit to fetch uri for (year,month,week or day etc)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:37:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.