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

Class: Date_Holidays

Source Location: /Date_Holidays-0.17.1/Holidays.php

Class Overview


class that helps you to locate holidays for a year


Author(s):

Version:

  • $Id: Holidays.php,v 1.13 2007/05/28 14:52:56 luckec Exp $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 79]
class that helps you to locate holidays for a year


[ Top ]


Method Detail

Date_Holidays (Constructor)   [line 88]

Date_Holidays Date_Holidays( )

Constructor

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

  • Access: protected

[ Top ]

errorsOccurred   [line 340]

boolean errorsOccurred( )

Checks whether errors occured
  • Return: true if errors occurred
  • Access: public

[ Top ]

factory   [line 103]

object Date_Holidays factory( string $driverId, [string $year = null], [string $locale = null], [ $external = false])

Factory method that creates a driver-object
  • Return: driver-object on success, otherwise a PEAR_Error object
  • Throws: object PEAR_Error
  • Access: public

Parameters:

string   $driverId   —  driver-name
string   $year   —  year
string   $locale   —  locale name
   $external   — 

[ Top ]

factoryISO3166   [line 156]

object Date_Holidays factoryISO3166( string $isoCode, [string $year = null], [string $locale = null], [ $external = false])

Factory method that creates a driver-object
  • Return: driver-object on success, otherwise a PEAR_Error object
  • Throws: object PEAR_Error
  • Access: public

Parameters:

string   $isoCode   —  ISO3166 code identifying the driver
string   $year   —  year
string   $locale   —  locale name
   $external   — 

[ Top ]

getErrors   [line 354]

array getErrors( [boolean $purge = false])

Returns the errors the error-stack contains
  • Return: errors
  • Access: public

Parameters:

boolean   $purge   —  true if the stall shall be purged

[ Top ]

getErrorStack   [line 289]

object PEAR_ErrorStack &getErrorStack( )

Returns the error-stack
  • Return: error-stack
  • Access: public

[ Top ]

getInstalledDrivers   [line 222]

array getInstalledDrivers( [string $directory = null])

Returns a list of the installed drivers
  • Access: public

Parameters:

string   $directory   —  directory, where the drivers are installed

[ Top ]

getInstalledFilters   [line 242]

array getInstalledFilters( [string $directory = null])

Returns a list of the installed filters
  • Access: public

Parameters:

string   $directory   —  directory, where the filters are installed

[ Top ]

isError   [line 321]

boolean isError( mixed $data, [int $code = null])

Checks a variable to determine whether it represnts an error object or not
  • Return: true if $subject is an error object
  • Access: public

Parameters:

mixed   $data   —  variable to test
int   $code   —  if $data is an PEAR_Error object, return true only if $code is a string and $obj->getMessage() == $code or $code is an integer and $obj->getCode() == $code

[ Top ]

raiseError   [line 303]

object PEAR_Error raiseError( int $code, [string $msg = null])

Pushes a new error on the error-stack and returns a PEAR_Error object
  • Access: public

Parameters:

int   $code   —  error-code
string   $msg   —  error-message

[ Top ]

staticGetProperty   [line 398]

mixed staticGetProperty( string $prop)

Returns an internal property value
  • Return: property value on success, otherwise null
  • Access: public

Parameters:

string   $prop   —  property-name

[ Top ]

staticSetProperty   [line 375]

void staticSetProperty( string $prop, string $value)

Set a property for the Date_Holidays drivers

Available properties:

 DIE_ON_MISSING_LOCALE = boolean
   false: if no localized holiday-title is found an error will be returned
   true: if no localized holiday-title is found the default translation (English) will be used

  • Access: public

Parameters:

string   $prop   —  property
string   $value   —  property-value

[ Top ]

_getModulesFromDir   [line 262]

void _getModulesFromDir( string $dir, [string $prefix = ''])

Fetch all modules from a directory and its subdirectories
  • Access: protected

Parameters:

string   $dir   —  directory
string   $prefix   —  prefix for the class names, will be used in recursive calls

[ Top ]


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