Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug #18959 Failed tests

QA fix - drop PHP4

git-svn-id: http://svn.php.net/repository/pear/packages/Date_Holidays/trunk@324724 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit a099a06fd67884691d8c4b0bb6768f20f91d7e95 1 parent 6e77f67
@CloCkWeRX CloCkWeRX authored
Showing with 159 additions and 159 deletions.
  1. +1 −1  Date/Holidays.php
  2. +2 −2 Date/Holidays/Driver.php
  3. +2 −2 Date/Holidays/Driver/Australia.php
  4. +1 −1  Date/Holidays/Driver/AustraliaNSW.php
  5. +1 −1  Date/Holidays/Driver/AustraliaQLD.php
  6. +1 −1  Date/Holidays/Driver/AustraliaSA.php
  7. +1 −1  Date/Holidays/Driver/AustraliaWA.php
  8. +1 −1  Date/Holidays/Driver/Austria.php
  9. +1 −1  Date/Holidays/Driver/Brazil.php
  10. +1 −1  Date/Holidays/Driver/Christian.php
  11. +1 −1  Date/Holidays/Driver/Composite.php
  12. +1 −1  Date/Holidays/Driver/Croatia.php
  13. +1 −1  Date/Holidays/Driver/Denmark.php
  14. +1 −1  Date/Holidays/Driver/Discordian.php
  15. +1 −1  Date/Holidays/Driver/EasternChristian.php
  16. +1 −1  Date/Holidays/Driver/EnglandWales.php
  17. +1 −1  Date/Holidays/Driver/Finland.php
  18. +1 −1  Date/Holidays/Driver/Germany.php
  19. +1 −1  Date/Holidays/Driver/Iceland.php
  20. +1 −1  Date/Holidays/Driver/Ireland.php
  21. +1 −1  Date/Holidays/Driver/Italy.php
  22. +1 −1  Date/Holidays/Driver/Japan.php
  23. +1 −1  Date/Holidays/Driver/Jewish.php
  24. +1 −1  Date/Holidays/Driver/Netherlands.php
  25. +1 −1  Date/Holidays/Driver/Norway.php
  26. +1 −1  Date/Holidays/Driver/PHPdotNet.php
  27. +1 −1  Date/Holidays/Driver/Portugal.php
  28. +1 −1  Date/Holidays/Driver/Romania.php
  29. +1 −1  Date/Holidays/Driver/SanMarino.php
  30. +1 −1  Date/Holidays/Driver/Slovenia.php
  31. +1 −1  Date/Holidays/Driver/Spain.php
  32. +1 −1  Date/Holidays/Driver/Sweden.php
  33. +1 −1  Date/Holidays/Driver/UNO.php
  34. +1 −1  Date/Holidays/Driver/USA.php
  35. +1 −1  Date/Holidays/Driver/Ukraine.php
  36. +1 −1  Date/Holidays/Driver/Venezuela.php
  37. +1 −1  Date/Holidays/Filter.php
  38. +1 −1  Date/Holidays/Filter/Austria/Official.php
  39. +1 −1  Date/Holidays/Filter/Blacklist.php
  40. +1 −1  Date/Holidays/Filter/Composite.php
  41. +1 −1  Date/Holidays/Filter/Germany/BadenWuerttemberg.php
  42. +1 −1  Date/Holidays/Filter/Germany/Bavaria.php
  43. +1 −1  Date/Holidays/Filter/Germany/Berlin.php
  44. +1 −1  Date/Holidays/Filter/Germany/Brandenburg.php
  45. +1 −1  Date/Holidays/Filter/Germany/Bremen.php
  46. +1 −1  Date/Holidays/Filter/Germany/Hamburg.php
  47. +1 −1  Date/Holidays/Filter/Germany/Hesse.php
  48. +1 −1  Date/Holidays/Filter/Germany/LowerSaxony.php
  49. +1 −1  Date/Holidays/Filter/Germany/MecklenburgWesternPomerania.php
  50. +1 −1  Date/Holidays/Filter/Germany/NorthRhineWestphalia.php
  51. +1 −1  Date/Holidays/Filter/Germany/Official.php
  52. +1 −1  Date/Holidays/Filter/Germany/RhinelandPalatinate.php
  53. +1 −1  Date/Holidays/Filter/Germany/Saarland.php
  54. +1 −1  Date/Holidays/Filter/Germany/Saxony.php
  55. +1 −1  Date/Holidays/Filter/Germany/SaxonyAnhalt.php
  56. +1 −1  Date/Holidays/Filter/Germany/SchleswigHolstein.php
  57. +1 −1  Date/Holidays/Filter/Germany/Thuringia.php
  58. +1 −1  Date/Holidays/Filter/Iceland/Official.php
  59. +1 −1  Date/Holidays/Filter/Ireland/Official.php
  60. +1 −1  Date/Holidays/Filter/Netherlands/Official.php
  61. +1 −1  Date/Holidays/Filter/Portugal/Official.php
  62. +1 −1  Date/Holidays/Filter/Whitelist.php
  63. +1 −1  Date/Holidays/Holiday.php
  64. +8 −8 examples/addingTranslations.php
  65. +1 −1  examples/cli.php
  66. +22 −22 examples/creating_drivers.php
  67. +2 −2 examples/fetchingInstalledDrivers.php
  68. +15 −15 examples/usingCompositeDriver.php
  69. +13 −13 examples/usingStandaloneDriver.php
  70. +1 −1  tests/Date_Holidays_Driver_UNO_TestSuite.php
  71. +21 −21 tests/Date_Holidays_TestSuite.php
  72. +1 −1  tests/Example.php
  73. +1 −1  tests/test_getHolidays.php
  74. +1 −1  tests/test_missingLocale.php
  75. +8 −8 util/testCreator.php
View
2  Date/Holidays.php
@@ -3,7 +3,7 @@
/**
* Holidays.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
4 Date/Holidays/Driver.php
@@ -3,7 +3,7 @@
/**
* Driver.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
@@ -307,7 +307,7 @@ function addTranslation($locale)
$loaded = false;
if ($data_dir == '@'.'DATA-DIR'.'@') {
- $data_dir = dirname(dirname(dirname(__FILE__)));
+ $data_dir = dirname(dirname(dirname(__FILE__)));
$stubdirs = array(
"$data_dir/lang/{$this->_driverName}/",
"$data_dir/lang/Christian/");
View
4 Date/Holidays/Driver/Australia.php
@@ -3,7 +3,7 @@
/**
* This file contains only the Driver class for determining holidays in Australia.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
@@ -101,7 +101,7 @@ function _buildHolidays()
$this->_addHoliday('easterMonday', $easterMonday, 'Easter Monday');
$this->_addTranslationForHoliday('goodFriday', 'en_EN', 'Good Friday');
$this->_addTranslationForHoliday('easterMonday', 'en_EN', 'Easter Monday');
-
+
/*
* Anzac Day
View
2  Date/Holidays/Driver/AustraliaNSW.php
@@ -3,7 +3,7 @@
/**
* This file contains only the Driver class for determining holidays in New South Wales
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  Date/Holidays/Driver/AustraliaQLD.php
@@ -3,7 +3,7 @@
/**
* This file contains only the Driver class for determining holidays in Queensland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/AustraliaSA.php
@@ -6,7 +6,7 @@
*
* @see http://www.safework.sa.gov.au/show_page.jsp?id=2483
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/AustraliaWA.php
@@ -4,7 +4,7 @@
* This file contains only the Driver class for determining holidays in Western
* Australia.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  Date/Holidays/Driver/Austria.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Austria
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Brazil.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Brazil
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Christian.php
@@ -3,7 +3,7 @@
/**
* Driver for Christian holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Composite.php
@@ -3,7 +3,7 @@
/**
* Composite driver.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Croatia.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Croatia.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  Date/Holidays/Driver/Denmark.php
@@ -3,7 +3,7 @@
/**
* Driver for Discordian holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Discordian.php
@@ -3,7 +3,7 @@
/**
* Driver for Discordian holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/EasternChristian.php
@@ -3,7 +3,7 @@
/**
* Driver for Eastern Christian holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/EnglandWales.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Germany
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Finland.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Finland
*
- * PHP Version 4 5
+ * PHP Version 5 5
*
* Copyright (c) 2011 The PHP Group
*
View
2  Date/Holidays/Driver/Germany.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Germany
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Iceland.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Iceland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Ireland.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Ireland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Italy.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Italy.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Japan.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Japanese
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Jewish.php
@@ -3,7 +3,7 @@
/**
* Driver for determining Jewish Holidays.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Netherlands.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in the Netherlands.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Norway.php
@@ -3,7 +3,7 @@
/**
* Driver class that calculates Norwegian holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/PHPdotNet.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays of some PHP.net members
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Portugal.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Portugal
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Romania.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Romania.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/SanMarino.php
@@ -4,7 +4,7 @@
/**
* Driver for determining holidays in San Marino.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  Date/Holidays/Driver/Slovenia.php
@@ -3,7 +3,7 @@
/**
* Slovenia
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Spain.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Spain
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2011 The PHP Group
*
View
2  Date/Holidays/Driver/Sweden.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Sweden
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/UNO.php
@@ -3,7 +3,7 @@
/**
* UNO
*
- * PHP Version 4
+ * PHP Version 5
*
* Authors:
* Copyright (c) 1997-2008 The PHP Group
View
2  Date/Holidays/Driver/USA.php
@@ -3,7 +3,7 @@
/**
* USA.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Ukraine.php
@@ -3,7 +3,7 @@
/**
* Driver for determining holidays in Ukraine.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Driver/Venezuela.php
@@ -3,7 +3,7 @@
/**
* Driver for holidays in Venezuela
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  Date/Holidays/Filter.php
@@ -3,7 +3,7 @@
/**
* Filter.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Austria/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays in Austria.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Blacklist.php
@@ -3,7 +3,7 @@
/**
* Blacklist
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Composite.php
@@ -3,7 +3,7 @@
/**
* Holiday.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/BadenWuerttemberg.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Baden Wuerttemberg.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Bavaria.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Bavaria.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Berlin.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Berlin.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Brandenburg.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Brandenburg.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Bremen.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Bremen.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Hamburg.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Hamburg.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Hesse.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Hamburg.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/LowerSaxony.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Lower Saxony.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/MecklenburgWesternPomerania.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in MecklenburgWesternPomerania.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/NorthRhineWestphalia.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in North Rhine Westphalia.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/RhinelandPalatinate.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in RhinelandPalatinate.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Saarland.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Saarland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Saxony.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Saxony.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/SaxonyAnhalt.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in SaxonyAnhalt
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/SchleswigHolstein.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Schleswig Holstein.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Germany/Thuringia.php
@@ -3,7 +3,7 @@
/**
* Filter for holidays in Thuringia.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Iceland/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays in Iceland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Ireland/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays in Ireland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Netherlands/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays in Ireland.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Portugal/Official.php
@@ -3,7 +3,7 @@
/**
* Filter for Official holidays in Portugal.
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Filter/Whitelist.php
@@ -3,7 +3,7 @@
/**
* Holiday.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
2  Date/Holidays/Holiday.php
@@ -3,7 +3,7 @@
/**
* Holiday.php
*
- * PHP Version 4
+ * PHP Version 5
*
* Copyright (c) 1997-2008 The PHP Group
*
View
16 examples/addingTranslations.php
@@ -2,26 +2,26 @@
/**
* Example that shows how to get localized holiday titles
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
* @author Carsten Lucke <luckec@tool-garage.de>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @link http://pear.php.net/package/Date_Holidays
- */
+ */
require_once 'Date/Holidays.php';
/**
- * Set static property concerning the behaviour when translations for a
+ * Set static property concerning the behaviour when translations for a
* holiday-title is missing
- *
- * If DIE_ON_MISSING_LOCALE is true, you will get an error if you request a
+ *
+ * If DIE_ON_MISSING_LOCALE is true, you will get an error if you request a
* holiday/ holiday-title.
- * If this is set false, the driver's internal default title (English) will be
- * returned. When you are using another locale-setting than English, you could
- * get mixed translations.
+ * If this is set false, the driver's internal default title (English) will be
+ * returned. When you are using another locale-setting than English, you could
+ * get mixed translations.
* Default this option is set true.
*/
Date_Holidays::staticSetProperty('DIE_ON_MISSING_LOCALE', true);
View
2  examples/cli.php
@@ -2,7 +2,7 @@
/**
* Rudimentary example of using Date_Holiday packages from the command line.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
44 examples/creating_drivers.php
@@ -5,23 +5,23 @@
* 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
+ * Otherwise it won't be compatible to be used within PEAR's strict directory
* structure.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
* @author Carsten Lucke <luckec@tool-garage.de>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @link http://pear.php.net/package/Date_Holidays
- */
+ */
class Date_Holidays_Driver_Example extends Date_Holidays_Driver
{
/**
* Constructor
*
- * Use the Date_Holidays::factory() method to construct an object of a
+ * Use the Date_Holidays::factory() method to construct an object of a
* certain driver
*
* @access protected
@@ -29,7 +29,7 @@ class Date_Holidays_Driver_Example extends Date_Holidays_Driver
function Date_Holidays_Driver_Example()
{
}
-
+
/**
* Build the internal arrays that contain data about the calculated holidays
*
@@ -40,8 +40,8 @@ function Date_Holidays_Driver_Example()
function _buildHolidays()
{
/**
- * If your driver is extending another driver-class and is not a direct
- * descendant of the Date_Holidays_Driver base-class you will want to
+ * If your driver is extending another driver-class and is not a direct
+ * descendant of the Date_Holidays_Driver base-class you will want to
* build this classes' holidays before you start with your turn.
*
* So just call the _buildHolidays() method of that class.
@@ -49,20 +49,20 @@ function _buildHolidays()
parent::_buildHolidays();
/**
- * There are two methods to add a holiday. One for adding holidays in
- * general and on that can be used to add static holidays (every year
+ * There are two methods to add a holiday. One for adding holidays in
+ * general and on that can be used to add static holidays (every year
* the same day).
*
- * You always have to give the added holiday an unique internal name
+ * You always have to give the added holiday an unique internal name
* within your driver.
* This should describe the holiday as good as possible.
*
- * Of course you need a date and a title (the default title should
+ * Of course you need a date and a title (the default title should
* always be in English)
*
- * You can add as many translations as you want for your driver's
- * holidays.
- * Although the default title is in English you should add another one
+ * You can add as many translations as you want for your driver's
+ * holidays.
+ * Although the default title is in English you should add another one
* with the correct locale setting.
*/
@@ -71,18 +71,18 @@ function _buildHolidays()
*/
// a static holiday
- $this->_addHoliday('jesusCircumcision',
- $this->_year . '-01-01',
+ $this->_addHoliday('jesusCircumcision',
+ $this->_year . '-01-01',
'Circumcision of Jesus');
-
+
// a calculated holiday
- // if you are using helper methods to calculate movable holidays is
+ // if you are using helper methods to calculate movable holidays is
// your own decision
$fooDate = $this->_calcFirstMondayInJanuary();
- $this->_addHoliday('firstMondayInJan',
- $fooDate,
+ $this->_addHoliday('firstMondayInJan',
+ $fooDate,
'First monday in January');
-
+
/*
* Special method for adding static holidays:
*/
@@ -96,7 +96,7 @@ function _buildHolidays()
}
return true;
}
-
+
/**
* A helper method
*
View
4 examples/fetchingInstalledDrivers.php
@@ -2,14 +2,14 @@
/**
* Example how to use a driver to determine holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
* @author Stephan Schmidt <schst@php.net>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @link http://pear.php.net/package/Date_Holidays
- */
+ */
require_once '../Holidays.php';
View
30 examples/usingCompositeDriver.php
@@ -3,19 +3,19 @@
* Example how to use a composite driver to determine holidays from
* several combined drivers
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
* @author Carsten Lucke <luckec@tool-garage.de>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @link http://pear.php.net/package/Date_Holidays
- */
+ */
require_once 'Date/Holidays.php';
/**
- * First thing to do is creating a Composite driver object
+ * First thing to do is creating a Composite driver object
* and some other drivers.
*
* You must determine a valid driver-name.
@@ -26,16 +26,16 @@
$germany03 = Date_Holidays::factory('Germany', 2003, 'en_EN');
$germany = Date_Holidays::factory('Germany', 2004, 'en_EN');
$uno = Date_Holidays::factory('UNO', 2004, 'en_EN');
-if (Date_Holidays::isError($comp) ||
- Date_Holidays::isError($germany03) ||
- Date_Holidays::isError($germany) ||
+if (Date_Holidays::isError($comp) ||
+ Date_Holidays::isError($germany03) ||
+ Date_Holidays::isError($germany) ||
Date_Holidays::isError($uno)) {
die('Factory was unable to produce driver-object');
}
/**
* Adding the drivers to the composite driver object
- *
+ *
* For some methods of the composite driver the importance of
* the added drivers is relevant for the returned result.
* The rule of priority is pretty easy, the earlier you add a
@@ -57,11 +57,11 @@
* However some of the methods won't do anything, like setYear() or getYear().
* You should execute those ones on a standalone driver.
*/
-
-
+
+
/**
- * Date holidays uses an internal name for each holiday and many methods
- * require one as a parameter.
+ * Date holidays uses an internal name for each holiday and many methods
+ * require one as a parameter.
* The following method returns an array with all available internal names.
*
* It returns the internal names of all drivers in the compound. Higher priorized
@@ -74,7 +74,7 @@
/**
* Let's retrieve holiday data for Easter.
*
- * On success an object will be returned, that contains
+ * On success an object will be returned, that contains
* the data about the requested holiday.
*
* You may specify a locale that differs from the driver's one
@@ -110,13 +110,13 @@
/**
- * As many driver may contain lots of holidays, most methods accept a param
+ * As many driver may contain lots of holidays, most methods accept a param
* $restrict that allows you to limit the relevant holidays.
*
* If you don't specify $restrict, all holidays the driver knows will be processed.
*
- * If the composite drivers contains two or more drivers with equal internal
- * holiday names the one of the driver with the highest priority will be
+ * If the composite drivers contains two or more drivers with equal internal
+ * holiday names the one of the driver with the highest priority will be
* returned (the one who was added earliest).
*/
$restrict = array(
View
26 examples/usingStandaloneDriver.php
@@ -2,14 +2,14 @@
/**
* Example how to use a driver to determine holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
* @author Carsten Lucke <luckec@tool-garage.de>
* @license http://www.php.net/license/3_01.txt PHP License 3.0.1
* @link http://pear.php.net/package/Date_Holidays
- */
+ */
require_once 'Date/Holidays.php';
@@ -29,12 +29,12 @@
* Now that you have created a driver, all the methods that Date_Holidays_Driver
* defines are available for usage. {@link Date_Holidays_Driver}
*/
-
-
+
+
/**
- * Date holidays uses an internal name for each holiday and many methods
- * require one as a parameter.
- * The following method returns an array with internal names of all holidays
+ * Date holidays uses an internal name for each holiday and many methods
+ * require one as a parameter.
+ * The following method returns an array with internal names of all holidays
* the driver knows.
*/
$internalNames = $germany->getInternalHolidayNames();
@@ -43,7 +43,7 @@
/**
* Let's retrieve holiday data for Easter.
*
- * On success an object will be returned, that contains
+ * On success an object will be returned, that contains
* the data about the requested holiday.
*
* You may specify a locale that differs from the driver's one
@@ -67,16 +67,16 @@
/**
* Although you will certainly not use it very often, you may change the
- * driver's locale setting. This will affect all methods that are executed
+ * driver's locale setting. This will affect all methods that are executed
* after changing the locale!
*
- * Many methods also accept a locale setting that
+ * Many methods also accept a locale setting that
* will be temporarily used during the method's processing time.
*/
$germany->setLocale('de_DE');
/**
- * As many driver may contain lots of holidays, most methods
+ * As many driver may contain lots of holidays, most methods
* accept a param $restrict that allows you to limit the relevant holidays.
*
* If you don't specify $restrict, all holidays the driver knows will be processed.
@@ -96,9 +96,9 @@
/**
* When you produce a driver the current year or the one you specified will be
* set and the holidays for this year will be calculated.
- *
+ *
* To change the year at a later point you can use Date_Holidays_Driver::setYear().
- * When doing so, the driver-class will automatically calculate the new year's
+ * When doing so, the driver-class will automatically calculate the new year's
* holidays.
*/
echo $germany->getYear() . "\n";
View
2  tests/Date_Holidays_Driver_UNO_TestSuite.php
@@ -2,7 +2,7 @@
/**
* TestSuite for UNO Holidays
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
42 tests/Date_Holidays_TestSuite.php
@@ -2,7 +2,7 @@
/**
* Testsuite.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
@@ -23,8 +23,8 @@
require_once "PHPUnit/Framework/TestSuite.php";
/**
- * Date_Holidays_TestSuite
- *
+ * Date_Holidays_TestSuite
+ *
* @uses PHPUnit_Framework_TestCase
* @category Date
* @package Date_Holidays
@@ -37,51 +37,51 @@ class Date_Holidays_TestSuite extends PHPUnit_Framework_TestCase
{
/**
- * testFactory
- *
+ * testFactory
+ *
* @access public
* @return void
*/
function testFactory()
{
- $this->assertTrue(is_a(Date_Holidays::factory('Christian'),
+ $this->assertTrue(is_a(Date_Holidays::factory('Christian'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('Composite'),
+ $this->assertTrue(is_a(Date_Holidays::factory('Composite'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('Germany'),
+ $this->assertTrue(is_a(Date_Holidays::factory('Germany'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('Jewish'),
+ $this->assertTrue(is_a(Date_Holidays::factory('Jewish'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('PHPdotNet'),
+ $this->assertTrue(is_a(Date_Holidays::factory('PHPdotNet'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('Sweden'),
+ $this->assertTrue(is_a(Date_Holidays::factory('Sweden'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('UNO'),
+ $this->assertTrue(is_a(Date_Holidays::factory('UNO'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factory('USA'),
+ $this->assertTrue(is_a(Date_Holidays::factory('USA'),
'Date_Holidays_Driver'));
}
/**
- * testFactoryISO3166
- *
+ * testFactoryISO3166
+ *
* @access public
* @return void
*/
function testFactoryISO3166()
{
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('de'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('de'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('deu'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('deu'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('se'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('se'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('swe'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('swe'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('us'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('us'),
'Date_Holidays_Driver'));
- $this->assertTrue(is_a(Date_Holidays::factoryISO3166('usa'),
+ $this->assertTrue(is_a(Date_Holidays::factoryISO3166('usa'),
'Date_Holidays_Driver'));
}
View
2  tests/Example.php
@@ -2,7 +2,7 @@
/**
* Example of writing a test.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  tests/test_getHolidays.php
@@ -2,7 +2,7 @@
/**
* script for testing a driver's getHolidays method.
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
2  tests/test_missingLocale.php
@@ -2,7 +2,7 @@
/**
* script for testing behaviour when locale is missing
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
View
16 util/testCreator.php
@@ -1,16 +1,16 @@
<?php
/**
- * Little script that creates the test-code for all
+ * Little script that creates the test-code for all
* holidays the specified driver can calculate
*
* Usage: php testCreator.php <drivername> <year>
- *
+ *
* Placeholders:
* --
* [%1] internal-name
* [%2] year
*
- * PHP Version 4
+ * PHP Version 5
*
* @category Date
* @package Date_Holidays
@@ -22,16 +22,16 @@
*/
//
-// Little script that creates the test-code for all
+// Little script that creates the test-code for all
// holidays the specified driver can calculate
//
// Usage: php testCreator.php <drivername> <year>
-//
+//
// Placeholders:
// --
// [%1] internal-name
// [%2] year
-//
+//
if ($_SERVER['argc'] != 3) {
die("Usage: php {$_SERVER['argv'][0]} <drivername> <year>");
@@ -39,7 +39,7 @@
$template = <<<EOT
-// test [%1]
+// test [%1]
\$day = \$drv->getHoliday('[%1]');
\$this->assertFalse(Date_Holidays::isError(\$day));
if (Date_Holidays::isError(\$day)) {
@@ -65,7 +65,7 @@
foreach ($internalNames as $internalName) {
$tmp = str_replace('[%1]', $internalName, $template);
$tmp = str_replace('[%2]', $_SERVER['argv'][2], $tmp);
-
+
$output .= $tmp;
}
Please sign in to comment.
Something went wrong with that request. Please try again.