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

Source for file PHPdotNet.php

Documentation is available at PHPdotNet.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. /**
  4.  * Driver for determining holidays of some PHP.net members
  5.  *
  6.  * PHP Version 4
  7.  *
  8.  * Copyright (c) 1997-2008 The PHP Group
  9.  *
  10.  * This source file is subject to version 3.0 of the PHP license,
  11.  * that is bundled with this package in the file LICENSE, and is
  12.  * available at through the world-wide-web at
  13.  * http://www.php.net/license/3_01.txt.
  14.  * If you did not receive a copy of the PHP license and are unable to
  15.  * obtain it through the world-wide-web, please send a note to
  16.  * license@php.net so we can mail you a copy immediately.
  17.  *
  18.  * @category Date
  19.  * @package  Date_Holidays
  20.  * @author   Carsten Lucke <luckec@tool-garage.de>
  21.  * @license  http://www.php.net/license/3_01.txt PHP License 3.0.1
  22.  * @version  CVS: $Id: PHPdotNet.php,v 1.8 2008/01/26 00:08:35 kguest Exp $
  23.  * @link     http://pear.php.net/package/Date_Holidays
  24.  */
  25.  
  26. /**
  27.  * Driver-class that calculates the birthdates of the PHP.net people. :)
  28.  *
  29.  * @category   Date
  30.  * @package    Date_Holidays
  31.  * @subpackage Driver
  32.  * @author     Carsten Lucke <luckec@tool-garage.de>
  33.  * @license    http://www.php.net/license/3_01.txt PHP License 3.0.1
  34.  * @version    CVS: $Id: PHPdotNet.php,v 1.8 2008/01/26 00:08:35 kguest Exp $
  35.  * @link       http://pear.php.net/package/Date_Holidays
  36.  */
  37. {
  38.     /**
  39.      * Constructor
  40.      *
  41.      * Use the Date_Holidays::factory() method to construct an object of a
  42.      * certain driver
  43.      *
  44.      * @access   protected
  45.      */
  46.     function Date_Holidays_Driver_PHPdotNet()
  47.     {
  48.     }
  49.  
  50.     /**
  51.      * Build the internal arrays that contain data about the calculated holidays
  52.      *
  53.      * @access   protected
  54.      * @return   boolean true on success, otherwise a PEAR_ErrorStack object
  55.      * @throws   object PEAR_ErrorStack
  56.      */
  57.     function _buildHolidays()
  58.     {
  59.         $static = array(
  60.             // Lukas Smith: 5 November 1977, Germany?
  61.             'lsmith'   => array(
  62.                 'date'          => '11-05',
  63.                 'title'         => 'Lukas Smith'
  64.             ),
  65.             // Stephan Schmidt: 12 May 1974, Germany
  66.             'schst'   => array(
  67.                 'date'          => '05-12',
  68.                 'title'         => 'Stephan Schmidt'
  69.             ),
  70.             // Carsten Lucke: 9 September 1980, Germany
  71.             'luckec'   => array(
  72.                 'date'          => '09-09',
  73.                 'title'         => 'Carsten Lucke'
  74.             ),
  75.             // Arnaud Limbourg: 14 March 1976, France
  76.             'arnaud'   => array(
  77.                 'date'          => '03-14',
  78.                 'title'         => 'Arnaud Limbourg'
  79.             ),
  80.             // Sebastian Bergmann: 22 April 1978, Germany
  81.             'sebastian'   => array(
  82.                 'date'          => '04-22',
  83.                 'title'         => 'Sebastian Bergmann'
  84.             ),
  85.             // Akash Mahajan: 20 May 1981, India
  86.             'akash'   => array(
  87.                 'date'          => '05-20',
  88.                 'title'         => 'Akash Mahajan'
  89.             ),
  90.             // Greg Beaver: 2 September 1976, USA
  91.             'cellog'   => array(
  92.                 'date'          => '09-02',
  93.                 'title'         => 'Gregory Beaver'
  94.             ),
  95.             // Ryan King: 31 March 1982, USA
  96.             'ryansking'   => array(
  97.                 'date'          => '03-31',
  98.                 'title'         => 'Ryan King'
  99.             ),
  100.             // Helgi Þormar Þorbjörnsson: 4 November 1986, Iceland
  101.             'dufuz'   => array(
  102.                 'date'          => '11-04',
  103.                 'title'         => 'Helgi Þormar Þorbjörnsson'
  104.             ),
  105.             // Tobias Schlitt: 19 May 1980, Germany
  106.             'toby'   => array(
  107.                 'date'          => '05-19',
  108.                 'title'         => 'Tobias Schlitt'
  109.             ),
  110.             // Sebastian Mordziol, 7 February 1975
  111.             'argh'   => array(
  112.                 'date'          => '02-07',
  113.                 'title'         => 'Sebastian Mordziol'
  114.             ),
  115.             // Jeroen Steggink: 7 December 1981, Netherlands
  116.             'steggink'   => array(
  117.                 'date'          => '12-07',
  118.                 'title'         => 'Jeroen Steggink'
  119.             ),
  120.             // Dylan Anderson: 21 October 1981, Canada
  121.             'anderson'   => array(
  122.                 'date'          => '10-21',
  123.                 'title'         => 'Dylan Anderson'
  124.             ),
  125.             // James McGlinn: 10 January 1980, New Zealand
  126.             'mcglinn'   => array(
  127.                 'date'          => '01-10',
  128.                 'title'         => 'James McGlinn'
  129.             ),
  130.             // Wilfredo Ignacio Pachón López: 31 July 1977, Colombia
  131.             'lopez'   => array(
  132.                 'date'          => '07-31',
  133.                 'title'         => 'Wilfredo Ignacio Pachón López'
  134.             )
  135.         );
  136.  
  137.         $this->_addStaticHolidays($static);
  138.         if (Date_Holidays::errorsOccurred()) {
  139.             return Date_Holidays::getErrorStack();
  140.         }
  141.         return true;
  142.     }
  143. }
  144. ?>

Documentation generated on Thu, 10 Apr 2008 20:00:23 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.