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

Class: Date_Holidays

Source Location: /Date_Holidays-0.10.0/Holidays.php

Class Overview


class that helps you to locate holidays for a year


Author(s):

Version:

  • $Id: Holidays.php,v 1.19 2004/08/09 18:03:49 luckec Exp $

Methods


Inherited Variables

Inherited Methods


Class Details

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


[ Top ]


Method Detail

Date_Holidays (Constructor)   [line 62]

Date_Holidays Date_Holidays( )

Constructor

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

  • Access: protected

[ Top ]

errorsOccurred   [line 171]

boolean errorsOccurred( )

Checks whether errors occured
  • Return: true if errors occurred
  • Access: public
  • Static: This method can be called statically

[ Top ]

factory   [line 75]

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

Factory method that creates a driver-object
  • Return: driver-object on success, otherwise a PEAR_Error object
  • Throws: object PEAR_Error
  • Access: public
  • Static: This method can be called statically

Parameters:

string   $driverId     driver-name

[ Top ]

getErrors   [line 185]

array getErrors( [boolean $purge = false])

Returns the errors the error-stack contains
  • Return: errors
  • Access: public
  • Static: This method can be called statically

Parameters:

boolean   $purge     true if the stall shall be purged

[ Top ]

getErrorStack   [line 118]

object PEAR_ErrorStack &getErrorStack( )

Returns the error-stack
  • Return: error-stack
  • Access: public
  • Static: This method can be called statically

[ Top ]

isError   [line 150]

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
  • Static: This method can be called statically

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 132]

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
  • Static: This method can be called statically

Parameters:

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

[ Top ]

staticGetProperty   [line 232]

mixed staticGetProperty( string $prop)

Returns an internal property value
  • Return: property value on success, otherwise null
  • Access: public
  • Static: This method can be called statically

Parameters:

string   $prop     property-name

[ Top ]

staticSetProperty   [line 206]

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 internal translation (English) will be used
 

  • Access: public
  • Static: This method can be called statically

Parameters:

string   $prop     property
string   $value     property-value

[ Top ]


Documentation generated on Mon, 30 Aug 2004 14:20:11 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.