Ignore:
Timestamp:
2013/08/28 13:26:44 (11 years ago)
Author:
m_uehara
Message:

#2275
影響が大きいため、2.13.0では対応を行わない r23125 r23128 r23133 を差し戻します。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/module/Calendar/Util/Uri.php

    r23125 r23141  
    11<?php 
    22/* vim: set expandtab tabstop=4 shiftwidth=4: */ 
    3  
     3// 
     4// +----------------------------------------------------------------------+ 
     5// | PHP                                                                  | 
     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: Uri.php,v 1.1 2004/08/16 09:03:55 hfuecks Exp $ 
     22// 
    423/** 
    5  * Contains the Calendar_Util_Uri 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: Uri.php 300729 2010-06-24 12:05:53Z quipo $ 
    37  * @link      http://pear.php.net/package/Calendar 
     24 * @package Calendar 
     25 * @version $Id: Uri.php,v 1.1 2004/08/16 09:03:55 hfuecks Exp $ 
    3826 */ 
    3927 
     
    4230 * <code> 
    4331 * $Day = new Calendar_Day(2003, 10, 23); 
    44  * $Uri = new Calendar_Util_Uri('year', 'month', 'day'); 
     32 * $Uri = & new Calendar_Util_Uri('year', 'month', 'day'); 
    4533 * echo $Uri->prev($Day,'month'); // Displays year=2003&amp;month=10 
    4634 * echo $Uri->prev($Day,'day'); // Displays year=2003&amp;month=10&amp;day=22 
     
    5038 * echo $Uri->prev($Day,'day'); // Displays 2003/10/22 
    5139 * </code> 
    52  * 
    53  * @category  Date and Time 
    54  * @package   Calendar 
    55  * @author    Harry Fuecks <hfuecks@phppatterns.com> 
    56  * @author    Lorenzo Alberton <l.alberton@quipo.it> 
    57  * @copyright 2003-2007 Harry Fuecks, Lorenzo Alberton 
    58  * @license   http://www.debian.org/misc/bsd.license  BSD License (3 Clause) 
    59  * @link      http://pear.php.net/package/Calendar 
    60  * @access    public 
     40 * @package Calendar 
     41 * @access public 
    6142 */ 
    6243class Calendar_Util_Uri 
     
    8970     * Constructs Calendar_Decorator_Uri 
    9071     * The term "fragment" means <i>name</i> of a calendar GET variables in the URL 
    91      * 
    92      * @param string $y URI fragment for year 
    93      * @param string $m (optional) URI fragment for month 
    94      * @param string $d (optional) URI fragment for day 
    95      * @param string $h (optional) URI fragment for hour 
    96      * @param string $i (optional) URI fragment for minute 
    97      * @param string $s (optional) URI fragment for second 
    98      * 
     72     * @param string URI fragment for year 
     73     * @param string (optional) URI fragment for month 
     74     * @param string (optional) URI fragment for day 
     75     * @param string (optional) URI fragment for hour 
     76     * @param string (optional) URI fragment for minute 
     77     * @param string (optional) URI fragment for second 
    9978     * @access public 
    10079     */ 
     
    10685    /** 
    10786     * Sets the URI fragment names 
    108      * 
    109      * @param string $y URI fragment for year 
    110      * @param string $m (optional) URI fragment for month 
    111      * @param string $d (optional) URI fragment for day 
    112      * @param string $h (optional) URI fragment for hour 
    113      * @param string $i (optional) URI fragment for minute 
    114      * @param string $s (optional) URI fragment for second 
    115      * 
     87     * @param string URI fragment for year 
     88     * @param string (optional) URI fragment for month 
     89     * @param string (optional) URI fragment for day 
     90     * @param string (optional) URI fragment for hour 
     91     * @param string (optional) URI fragment for minute 
     92     * @param string (optional) URI fragment for second 
    11693     * @return void 
    11794     * @access public 
    11895     */ 
    119     function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null)  
    120     { 
     96    function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) { 
    12197        if (!is_null($y)) $this->uris['Year']   = $y; 
    12298        if (!is_null($m)) $this->uris['Month']  = $m; 
     
    129105    /** 
    130106     * Gets the URI string for the previous calendar unit 
    131      * 
    132      * @param object $Calendar subclassed from Calendar e.g. Calendar_Month 
    133      * @param string $unit     calendar  unit (year|month|week|day|hour|minute|second) 
    134      * 
     107     * @param object subclassed from Calendar e.g. Calendar_Month 
     108     * @param string calendar unit ( must be year, month, week, day, hour, minute or second) 
    135109     * @return string 
    136110     * @access public 
     
    145119    /** 
    146120     * Gets the URI string for the current calendar unit 
    147      * 
    148      * @param object $Calendar subclassed from Calendar e.g. Calendar_Month 
    149      * @param string $unit     calendar  unit (year|month|week|day|hour|minute|second) 
    150      * 
     121     * @param object subclassed from Calendar e.g. Calendar_Month 
     122     * @param string calendar unit ( must be year, month, week, day, hour, minute or second) 
    151123     * @return string 
    152124     * @access public 
     
    154126    function this($Calendar, $unit) 
    155127    { 
    156         $method = 'this'.$unit; 
     128       $method = 'this'.$unit; 
    157129        $stamp  = $Calendar->{$method}('timestamp'); 
    158130        return $this->buildUriString($Calendar, $method, $stamp); 
     
    161133    /** 
    162134     * Gets the URI string for the next calendar unit 
    163      * 
    164      * @param object $Calendar subclassed from Calendar e.g. Calendar_Month 
    165      * @param string $unit     calendar unit (year|month|week|day|hour|minute|second) 
    166      * 
     135     * @param object subclassed from Calendar e.g. Calendar_Month 
     136     * @param string calendar unit ( must be year, month, week, day, hour, minute or second) 
    167137     * @return string 
    168138     * @access public 
     
    177147    /** 
    178148     * Build the URI string 
    179      * 
    180      * @param object $Calendar subclassed from Calendar e.g. Calendar_Month 
    181      * @param string $method   method substring 
    182      * @param int    $stamp    timestamp 
    183      * 
     149     * @param string method substring 
     150     * @param int timestamp 
    184151     * @return string build uri string 
    185152     * @access private 
     
    193160            $call = 'stampTo'.$unit; 
    194161            $uriString .= $separator; 
    195             if (!$this->scalar) { 
    196                 $uriString .= $uri.'='; 
    197             } 
     162            if (!$this->scalar) $uriString .= $uri.'='; 
    198163            $uriString .= $cE->{$call}($stamp); 
    199164            $separator = $this->separator; 
Note: See TracChangeset for help on using the changeset viewer.