- Timestamp:
- 2013/08/26 15:52:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13_0/data/module/Calendar/Decorator/Textual.php
r20119 r23126 1 1 <?php 2 2 /* vim: set expandtab tabstop=4 shiftwidth=4: */ 3 // 4 // +----------------------------------------------------------------------+ 5 // | PHP Version 4 | 6 // +----------------------------------------------------------------------+ 7 // | Copyright (c) 1997-2002 The PHP Group | 8 // +----------------------------------------------------------------------+ 9 // | This source file is subject to version 2.02 of the PHP license, | 10 // | that is bundled with this package in the file LICENSE, and is | 11 // | available at through the world-wide-web at | 12 // | http://www.php.net/license/3_0.txt. | 13 // | If you did not receive a copy of the PHP license and are unable to | 14 // | obtain it through the world-wide-web, please send a note to | 15 // | license@php.net so we can mail you a copy immediately. | 16 // +----------------------------------------------------------------------+ 17 // | Authors: Harry Fuecks <hfuecks@phppatterns.com> | 18 // | Lorenzo Alberton <l dot alberton at quipo dot it> | 19 // +----------------------------------------------------------------------+ 20 // 21 // $Id: Textual.php,v 1.3 2004/08/16 13:02:44 hfuecks Exp $ 22 // 23 /** 24 * @package Calendar 25 * @version $Id: Textual.php,v 1.3 2004/08/16 13:02:44 hfuecks Exp $ 3 4 /** 5 * Contains the Calendar_Decorator_Wrapper class 6 * 7 * PHP versions 4 and 5 8 * 9 * LICENSE: Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. The name of the author may not be used to endorse or promote products 17 * derived from this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED 20 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 * IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY 23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 26 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * 30 * @category Date and Time 31 * @package Calendar 32 * @author Harry Fuecks <hfuecks@phppatterns.com> 33 * @author Lorenzo Alberton <l.alberton@quipo.it> 34 * @copyright 2003-2007 Harry Fuecks, Lorenzo Alberton 35 * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) 36 * @version CVS: $Id: Textual.php 246907 2007-11-24 11:04:24Z quipo $ 37 * @link http://pear.php.net/package/Calendar 26 38 */ 27 39 … … 49 61 * <b>Note:</b> for performance you should prefer Calendar_Util_Textual unless you 50 62 * have a specific need to use a decorator 51 * @package Calendar 52 * @access public 63 * 64 * @category Date and Time 65 * @package Calendar 66 * @author Harry Fuecks <hfuecks@phppatterns.com> 67 * @author Lorenzo Alberton <l.alberton@quipo.it> 68 * @copyright 2003-2007 Harry Fuecks, Lorenzo Alberton 69 * @license http://www.debian.org/misc/bsd.license BSD License (3 Clause) 70 * @link http://pear.php.net/package/Calendar 71 * @access public 53 72 */ 54 73 class Calendar_Decorator_Textual extends Calendar_Decorator … … 56 75 /** 57 76 * Constructs Calendar_Decorator_Textual 58 * @param object subclass of Calendar 77 * 78 * @param object &$Calendar subclass of Calendar 79 * 59 80 * @access public 60 81 */ … … 66 87 /** 67 88 * Returns an array of 12 month names (first index = 1) 68 * @param string (optional) format of returned months (one,two,short or long) 89 * 90 * @param string $format (optional) format of returned months (one|two|short|long) 91 * 69 92 * @return array 70 93 * @access public 71 94 * @static 72 95 */ 73 function monthNames($format ='long')96 function monthNames($format = 'long') 74 97 { 75 98 return Calendar_Util_Textual::monthNames($format); … … 78 101 /** 79 102 * Returns an array of 7 week day names (first index = 0) 80 * @param string (optional) format of returned days (one,two,short or long) 103 * 104 * @param string $format (optional) format of returned days (one|two|short|long) 105 * 81 106 * @return array 82 107 * @access public 83 108 * @static 84 109 */ 85 function weekdayNames($format ='long')110 function weekdayNames($format = 'long') 86 111 { 87 112 return Calendar_Util_Textual::weekdayNames($format); … … 90 115 /** 91 116 * Returns textual representation of the previous month of the decorated calendar object 92 * @param string (optional) format of returned months (one,two,short or long) 93 * @return string 94 * @access public 95 */ 96 function prevMonthName($format='long') 97 { 98 return Calendar_Util_Textual::prevMonthName($this->calendar,$format); 117 * 118 * @param string $format (optional) format of returned months (one|two|short|long) 119 * 120 * @return string 121 * @access public 122 */ 123 function prevMonthName($format = 'long') 124 { 125 return Calendar_Util_Textual::prevMonthName($this->calendar, $format); 99 126 } 100 127 101 128 /** 102 129 * Returns textual representation of the month of the decorated calendar object 103 * @param string (optional) format of returned months (one,two,short or long) 104 * @return string 105 * @access public 106 */ 107 function thisMonthName($format='long') 108 { 109 return Calendar_Util_Textual::thisMonthName($this->calendar,$format); 130 * 131 * @param string $format (optional) format of returned months (one|two|short|long) 132 * 133 * @return string 134 * @access public 135 */ 136 function thisMonthName($format = 'long') 137 { 138 return Calendar_Util_Textual::thisMonthName($this->calendar, $format); 110 139 } 111 140 112 141 /** 113 142 * Returns textual representation of the next month of the decorated calendar object 114 * @param string (optional) format of returned months (one,two,short or long) 115 * @return string 116 * @access public 117 */ 118 function nextMonthName($format='long') 119 { 120 return Calendar_Util_Textual::nextMonthName($this->calendar,$format); 143 * 144 * @param string $format (optional) format of returned months (one|two|short|long) 145 * 146 * @return string 147 * @access public 148 */ 149 function nextMonthName($format = 'long') 150 { 151 return Calendar_Util_Textual::nextMonthName($this->calendar, $format); 121 152 } 122 153 123 154 /** 124 155 * Returns textual representation of the previous day of week of the decorated calendar object 125 * @param string (optional) format of returned months (one,two,short or long) 126 * @return string 127 * @access public 128 */ 129 function prevDayName($format='long') 130 { 131 return Calendar_Util_Textual::prevDayName($this->calendar,$format); 156 * 157 * @param string $format (optional) format of returned months (one|two|short|long) 158 * 159 * @return string 160 * @access public 161 */ 162 function prevDayName($format = 'long') 163 { 164 return Calendar_Util_Textual::prevDayName($this->calendar, $format); 132 165 } 133 166 134 167 /** 135 168 * Returns textual representation of the day of week of the decorated calendar object 136 * @param string (optional) format of returned months (one,two,short or long) 137 * @return string 138 * @access public 139 */ 140 function thisDayName($format='long') 141 { 142 return Calendar_Util_Textual::thisDayName($this->calendar,$format); 169 * 170 * @param string $format (optional) format of returned months (one|two|short|long) 171 * 172 * @return string 173 * @access public 174 */ 175 function thisDayName($format = 'long') 176 { 177 return Calendar_Util_Textual::thisDayName($this->calendar, $format); 143 178 } 144 179 145 180 /** 146 181 * Returns textual representation of the next day of week of the decorated calendar object 147 * @param string (optional) format of returned months (one,two,short or long) 148 * @return string 149 * @access public 150 */ 151 function nextDayName($format='long') 152 { 153 return Calendar_Util_Textual::nextDayName($this->calendar,$format); 182 * 183 * @param string $format (optional) format of returned months (one|two|short|long) 184 * 185 * @return string 186 * @access public 187 */ 188 function nextDayName($format = 'long') 189 { 190 return Calendar_Util_Textual::nextDayName($this->calendar, $format); 154 191 } 155 192 … … 158 195 * calendar object. Only useful for Calendar_Month_Weekdays, Calendar_Month_Weeks 159 196 * and Calendar_Week. Otherwise the returned array will begin on Sunday 160 * @param string (optional) format of returned months (one,two,short or long) 197 * 198 * @param string $format (optional) format of returned months (one|two|short|long) 199 * 161 200 * @return array ordered array of week day names 162 201 * @access public 163 202 */ 164 function orderedWeekdays($format ='long')165 { 166 return Calendar_Util_Textual::orderedWeekdays($this->calendar, $format);203 function orderedWeekdays($format = 'long') 204 { 205 return Calendar_Util_Textual::orderedWeekdays($this->calendar, $format); 167 206 } 168 207 }
Note: See TracChangeset
for help on using the changeset viewer.