- Timestamp:
- 2013/08/28 13:55:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13_0/data/module/Calendar/Decorator/Textual.php
r23126 r23143 1 1 <?php 2 2 /* vim: set expandtab tabstop=4 shiftwidth=4: */ 3 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 // 4 23 /** 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 24 * @package Calendar 25 * @version $Id: Textual.php,v 1.3 2004/08/16 13:02:44 hfuecks Exp $ 38 26 */ 39 27 … … 61 49 * <b>Note:</b> for performance you should prefer Calendar_Util_Textual unless you 62 50 * have a specific need to use a decorator 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 51 * @package Calendar 52 * @access public 72 53 */ 73 54 class Calendar_Decorator_Textual extends Calendar_Decorator … … 75 56 /** 76 57 * Constructs Calendar_Decorator_Textual 77 * 78 * @param object &$Calendar subclass of Calendar 79 * 58 * @param object subclass of Calendar 80 59 * @access public 81 60 */ … … 87 66 /** 88 67 * Returns an array of 12 month names (first index = 1) 89 * 90 * @param string $format (optional) format of returned months (one|two|short|long) 91 * 68 * @param string (optional) format of returned months (one,two,short or long) 92 69 * @return array 93 70 * @access public 94 71 * @static 95 72 */ 96 function monthNames($format ='long')73 function monthNames($format='long') 97 74 { 98 75 return Calendar_Util_Textual::monthNames($format); … … 101 78 /** 102 79 * Returns an array of 7 week day names (first index = 0) 103 * 104 * @param string $format (optional) format of returned days (one|two|short|long) 105 * 80 * @param string (optional) format of returned days (one,two,short or long) 106 81 * @return array 107 82 * @access public 108 83 * @static 109 84 */ 110 function weekdayNames($format ='long')85 function weekdayNames($format='long') 111 86 { 112 87 return Calendar_Util_Textual::weekdayNames($format); … … 115 90 /** 116 91 * Returns textual representation of the previous month of the decorated calendar object 117 * 118 * @param string $format (optional) format of returned months (one|two|short|long) 119 * 92 * @param string (optional) format of returned months (one,two,short or long) 120 93 * @return string 121 94 * @access public 122 95 */ 123 function prevMonthName($format ='long')96 function prevMonthName($format='long') 124 97 { 125 return Calendar_Util_Textual::prevMonthName($this->calendar, 98 return Calendar_Util_Textual::prevMonthName($this->calendar,$format); 126 99 } 127 100 128 101 /** 129 102 * Returns textual representation of the month of the decorated calendar object 130 * 131 * @param string $format (optional) format of returned months (one|two|short|long) 132 * 103 * @param string (optional) format of returned months (one,two,short or long) 133 104 * @return string 134 105 * @access public 135 106 */ 136 function thisMonthName($format ='long')107 function thisMonthName($format='long') 137 108 { 138 return Calendar_Util_Textual::thisMonthName($this->calendar, 109 return Calendar_Util_Textual::thisMonthName($this->calendar,$format); 139 110 } 140 111 141 112 /** 142 113 * Returns textual representation of the next month of the decorated calendar object 143 * 144 * @param string $format (optional) format of returned months (one|two|short|long) 145 * 114 * @param string (optional) format of returned months (one,two,short or long) 146 115 * @return string 147 116 * @access public 148 117 */ 149 function nextMonthName($format ='long')118 function nextMonthName($format='long') 150 119 { 151 return Calendar_Util_Textual::nextMonthName($this->calendar, 120 return Calendar_Util_Textual::nextMonthName($this->calendar,$format); 152 121 } 153 122 154 123 /** 155 124 * Returns textual representation of the previous day of week of the decorated calendar object 156 * 157 * @param string $format (optional) format of returned months (one|two|short|long) 158 * 125 * @param string (optional) format of returned months (one,two,short or long) 159 126 * @return string 160 127 * @access public 161 128 */ 162 function prevDayName($format ='long')129 function prevDayName($format='long') 163 130 { 164 return Calendar_Util_Textual::prevDayName($this->calendar, 131 return Calendar_Util_Textual::prevDayName($this->calendar,$format); 165 132 } 166 133 167 134 /** 168 135 * Returns textual representation of the day of week of the decorated calendar object 169 * 170 * @param string $format (optional) format of returned months (one|two|short|long) 171 * 136 * @param string (optional) format of returned months (one,two,short or long) 172 137 * @return string 173 138 * @access public 174 139 */ 175 function thisDayName($format ='long')140 function thisDayName($format='long') 176 141 { 177 return Calendar_Util_Textual::thisDayName($this->calendar, 142 return Calendar_Util_Textual::thisDayName($this->calendar,$format); 178 143 } 179 144 180 145 /** 181 146 * Returns textual representation of the next day of week of the decorated calendar object 182 * 183 * @param string $format (optional) format of returned months (one|two|short|long) 184 * 147 * @param string (optional) format of returned months (one,two,short or long) 185 148 * @return string 186 149 * @access public 187 150 */ 188 function nextDayName($format ='long')151 function nextDayName($format='long') 189 152 { 190 return Calendar_Util_Textual::nextDayName($this->calendar, 153 return Calendar_Util_Textual::nextDayName($this->calendar,$format); 191 154 } 192 155 … … 195 158 * calendar object. Only useful for Calendar_Month_Weekdays, Calendar_Month_Weeks 196 159 * and Calendar_Week. Otherwise the returned array will begin on Sunday 197 * 198 * @param string $format (optional) format of returned months (one|two|short|long) 199 * 160 * @param string (optional) format of returned months (one,two,short or long) 200 161 * @return array ordered array of week day names 201 162 * @access public 202 163 */ 203 function orderedWeekdays($format ='long')164 function orderedWeekdays($format='long') 204 165 { 205 return Calendar_Util_Textual::orderedWeekdays($this->calendar, 166 return Calendar_Util_Textual::orderedWeekdays($this->calendar,$format); 206 167 } 207 168 }
Note: See TracChangeset
for help on using the changeset viewer.