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

Class: Date_Holidays_Driver_Example

Source Location: /Date_Holidays-0.21.8/examples/creating_drivers.php

Class Overview

Date_Holidays_Driver
   |
   --Date_Holidays_Driver_Example

Example how to create an own driver-class for Date_Holidays


Author(s):

Version:

  • CVS: $Id$

Methods


Inherited Variables

Inherited Methods

Class: Date_Holidays_Driver

Date_Holidays_Driver::Date_Holidays_Driver()
Constructor
Date_Holidays_Driver::addCompiledTranslationFile()
Add a compiled language-file's content
Date_Holidays_Driver::addDriver()
Add a driver component
Date_Holidays_Driver::addTranslation()
addTranslation
Date_Holidays_Driver::addTranslationFile()
Add a language-file's content
Date_Holidays_Driver::getHoliday()
Returns the specified holiday
Date_Holidays_Driver::getHolidayDate()
Returns date of a holiday
Date_Holidays_Driver::getHolidayDates()
Returns dates of all holidays or those accepted by the applied filter.
Date_Holidays_Driver::getHolidayForDate()
Returns a
object, if any was found, matching the specified date.
Date_Holidays_Driver::getHolidayProperties()
Returns the localized properties of a holiday. If no properties have been stored an empty array will be returned.
Date_Holidays_Driver::getHolidays()
Returns all holidays that the driver knows.
Date_Holidays_Driver::getHolidaysForDatespan()
Returns an array containing a number of
items.
Date_Holidays_Driver::getHolidayTitle()
Returns localized title for a holiday
Date_Holidays_Driver::getHolidayTitles()
Returns localized titles of all holidays or those accepted by the filter
Date_Holidays_Driver::getInternalHolidayNames()
Returns the internal names of holidays that were calculated
Date_Holidays_Driver::getISO3166Codes()
Method that returns an array containing the ISO3166 codes that may possibly identify a driver.
Date_Holidays_Driver::getYear()
Returns the driver's current year
Date_Holidays_Driver::isHoliday()
Determines whether a date represents a holiday or not
Date_Holidays_Driver::removeDriver()
Remove a driver component
Date_Holidays_Driver::setLocale()
Sets the driver's locale
Date_Holidays_Driver::setYear()
Sets the driver's current year
Date_Holidays_Driver::_addDays()
Converts the date to the specified no of days from the given date
Date_Holidays_Driver::_addHoliday()
Adds a holiday to the driver's holidays
Date_Holidays_Driver::_addStaticHolidays()
Adds all holidays in the array to the driver's internal list of holidays.
Date_Holidays_Driver::_addStringPropertiesForHoliday()
Adds a arbitrary number of localized string-properties for the specified holiday.
Date_Holidays_Driver::_addStringPropertyForHoliday()
Adds a localized (regrading translation etc.) string-property for a holiday.
Date_Holidays_Driver::_addTranslationData()
Add a language-file's content. Translations, properties, etc. for holidays will be made available with the specified locale.
Date_Holidays_Driver::_addTranslationForHoliday()
Add a localized translation for a holiday's title. Overwrites existing data.
Date_Holidays_Driver::_buildHolidays()
Build the internal arrays that contain data about the calculated holidays
Date_Holidays_Driver::_findBestLocale()
Finds the best internally available locale for the specified one
Date_Holidays_Driver::_removeHoliday()
Remove a holiday from internal storage

Class Details

[line 19]
Example how to create an own driver-class for Date_Holidays

To test this class, you have to copy it into the drivers-directory.

The classname has to be something like Date_Holidays_Driver_*. Otherwise it won't be compatible to be used within PEAR's strict directory structure.

PHP Version 5



[ Top ]


Method Detail

Date_Holidays_Driver_Example (Constructor)   [line 29]

Date_Holidays_Driver_Example Date_Holidays_Driver_Example( )

Constructor

Use the Date_Holidays::factory() method to construct an object of a certain driver

  • Access: protected

[ Top ]

_buildHolidays   [line 40]

boolean _buildHolidays( )

Build the internal arrays that contain data about the calculated holidays
  • Return: true on success, otherwise a PEAR_ErrorStack object
  • Throws: object PEAR_ErrorStack
  • Access: protected

Overrides Date_Holidays_Driver::_buildHolidays() (Build the internal arrays that contain data about the calculated holidays)
[ Top ]


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