Apache Zeta Components Manual :: File Source for result_cookie.php

Source for file result_cookie.php

Documentation is available at result_cookie.php

  1. <?php
  2. /**
  3.  * File containing the ezcMvcResultCookie class
  4.  *
  5.  * Licensed to the Apache Software Foundation (ASF) under one
  6.  * or more contributor license agreements.  See the NOTICE file
  7.  * distributed with this work for additional information
  8.  * regarding copyright ownership.  The ASF licenses this file
  9.  * to you under the Apache License, Version 2.0 (the
  10.  * "License"); you may not use this file except in compliance
  11.  * with the License.  You may obtain a copy of the License at
  12.  * 
  13.  *   http://www.apache.org/licenses/LICENSE-2.0
  14.  * 
  15.  * Unless required by applicable law or agreed to in writing,
  16.  * software distributed under the License is distributed on an
  17.  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  18.  * KIND, either express or implied.  See the License for the
  19.  * specific language governing permissions and limitations
  20.  * under the License.
  21.  *
  22.  * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
  23.  * @version //autogentag//
  24.  * @filesource
  25.  * @package MvcTools
  26.  */
  27.  
  28. /**
  29.  * This struct contains cookie arguments
  30.  *
  31.  * @package MvcTools
  32.  * @version //autogentag//
  33.  */
  34. {
  35.     /**
  36.      * Cookie name
  37.      *
  38.      * @var string 
  39.      */
  40.     public $name;
  41.  
  42.     /**
  43.      * Cookie value
  44.      *
  45.      * @var string 
  46.      */
  47.     public $value;
  48.  
  49.     /**
  50.      * Expiry date
  51.      *
  52.      * @var DateTime 
  53.      */
  54.     public $expire;
  55.  
  56.     /**
  57.      * Cookie path
  58.      *
  59.      * @var string 
  60.      */
  61.     public $path;
  62.  
  63.     /**
  64.      * Cookie domain
  65.      *
  66.      * @var string 
  67.      */
  68.     public $domain;
  69.  
  70.     /**
  71.      * Whether it is a "secure" cookie
  72.      *
  73.      * @var boolean 
  74.      */
  75.     public $secure;
  76.  
  77.     /**
  78.      * Whether it is a "HTTP-only" cookie
  79.      *
  80.      * @var boolean 
  81.      */
  82.     public $httpOnly;
  83.  
  84.     /**
  85.      * Constructs a new ezcMvcResultCache.
  86.      *
  87.      * @param string $name 
  88.      * @param string $value 
  89.      * @param DateTime $expire 
  90.      * @param string $path 
  91.      * @param string $domain 
  92.      * @param bool $secure 
  93.      * @param bool $httpOnly 
  94.      */
  95.     public function __construct$name ''$value '',
  96.         DateTime $expire null$path ''$domain ''$secure false,
  97.         $httpOnly false )
  98.     {
  99.         $this->name = $name;
  100.         $this->value = $value;
  101.         $this->expire = $expire;
  102.         $this->path = $path;
  103.         $this->domain = $domain;
  104.         $this->secure = $secure;
  105.         $this->httpOnly = $httpOnly;
  106.     }
  107.  
  108.     /**
  109.      * Returns a new instance of this class with the data specified by $array.
  110.      *
  111.      * $array contains all the data members of this class in the form:
  112.      * array('member_name'=>value).
  113.      *
  114.      * __set_state makes this class exportable with var_export.
  115.      * var_export() generates code, that calls this method when it
  116.      * is parsed with PHP.
  117.      *
  118.      * @param array(string=>mixed) $array 
  119.      * @return ezcMvcResultCache 
  120.      */
  121.     static public function __set_statearray $array )
  122.     {
  123.         return new ezcMvcResultCookie$array['name']$array['value'],
  124.             $array['expire']$array['path']$array['domain'],
  125.             $array['secure']$array['httpOnly');
  126.     }
  127. }
  128. ?>
Documentation generated by phpDocumentor 1.4.3