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

Class: Calendar_Decorator_Textual

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

Class Overview

Calendar_Decorator
   |
   --Calendar_Decorator_Textual

Decorator to help with fetching textual representations of months and days of the week.


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 73]
Decorator to help with fetching textual representations of months and days of the week.

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



[ Top ]


Method Detail

Calendar_Decorator_Textual (Constructor)   [line 82]

Calendar_Decorator_Textual Calendar_Decorator_Textual( object &$Calendar)

Constructs Calendar_Decorator_Textual
  • Access: public

Parameters:

object   &$Calendar   —  subclass of Calendar

[ Top ]

monthNames   [line 96]

array monthNames( [string $format = 'long'])

Returns an array of 12 month names (first index = 1)
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

nextDayName   [line 188]

string nextDayName( [string $format = 'long'])

Returns textual representation of the next day of week of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

nextMonthName   [line 149]

string nextMonthName( [string $format = 'long'])

Returns textual representation of the next month of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

orderedWeekdays   [line 203]

array orderedWeekdays( [string $format = 'long'])

Returns the days of the week using the order defined in the decorated calendar object. Only useful for Calendar_Month_Weekdays, Calendar_Month_Weeks and Calendar_Week. Otherwise the returned array will begin on Sunday
  • Return: ordered array of week day names
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

prevDayName   [line 162]

string prevDayName( [string $format = 'long'])

Returns textual representation of the previous day of week of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

prevMonthName   [line 123]

string prevMonthName( [string $format = 'long'])

Returns textual representation of the previous month of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

thisDayName   [line 175]

string thisDayName( [string $format = 'long'])

Returns textual representation of the day of week of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

thisMonthName   [line 136]

string thisMonthName( [string $format = 'long'])

Returns textual representation of the month of the decorated calendar object
  • Access: public

Parameters:

string   $format   —  (optional) format of returned months (one|two|short|long)

[ Top ]

weekdayNames   [line 110]

array weekdayNames( [string $format = 'long'])

Returns an array of 7 week day names (first index = 0)
  • Access: public

Parameters:

string   $format   —  (optional) format of returned days (one|two|short|long)

[ Top ]


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