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

Source for file ini_item.php

Documentation is available at ini_item.php

  1. <?php
  2. /**
  3.  * File containing the ezcConfigurationIniItem 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 Configuration
  26.  */
  27.  
  28. /**
  29.  * A container to store one INI settings item
  30.  *
  31.  * This struct is used in various classes to store the data accompanying one
  32.  * INI setting.
  33.  *
  34.  * @package Configuration
  35.  * @version //autogentag//
  36.  */
  37. {
  38.     /**
  39.      * The Configuration item is a setting.
  40.      *
  41.      * @var int 
  42.      */
  43.     const SETTING = 1;
  44.  
  45.     /**
  46.      * The Configuration item is a group..
  47.      *
  48.      * @var int 
  49.      */
  50.     const GROUP_HEADER = 2;
  51.  
  52.     /**
  53.      * The item type.
  54.      *
  55.      * Either SETTING or GROUP_HEADER.
  56.      *
  57.      * @var int 
  58.      */
  59.     public $type;
  60.  
  61.     /**
  62.      * The name of the group this setting belongs to.
  63.      *
  64.      * @var string 
  65.      */
  66.     public $group;
  67.  
  68.     /**
  69.      * The name of the setting or the group.
  70.      *
  71.      * @var string 
  72.      */
  73.     public $setting;
  74.  
  75.     /**
  76.      * The dimensions of the setting.
  77.      *
  78.      * @var string 
  79.      */
  80.     public $dimensions;
  81.  
  82.     /**
  83.      * Comments that belong to this setting.
  84.      *
  85.      * @var string 
  86.      */
  87.     public $comments;
  88.  
  89.     /**
  90.      * The setting's value.
  91.      *
  92.      * @var mixed 
  93.      */
  94.     public $value;
  95.  
  96.     /**
  97.      * Constructs an ezcConfigurationIniItem object.
  98.      *
  99.      * @param int $type Either SETTING or GROUP_HEADER
  100.      * @param string $group 
  101.      * @param string $setting 
  102.      * @param string $dimensions 
  103.      * @param string $comments 
  104.      * @param mixed $value 
  105.      */
  106.     function __construct$type$group$setting$dimensions$comments$value )
  107.     {
  108.         $this->type = $type;
  109.         $this->group = $group;
  110.         $this->setting = $setting;
  111.         $this->dimensions = $dimensions;
  112.         $this->comments = $comments;
  113.         $this->value = $value;
  114.     }
  115.  
  116.     /**
  117.      * Returns a new instance of this class with the data specified by $array.
  118.      *
  119.      * $array contains all the data members of this class in the form:
  120.      * array('member_name'=>value).
  121.      *
  122.      * __set_state makes this class exportable with var_export.
  123.      * var_export() generates code, that calls this method when it
  124.      * is parsed with PHP.
  125.      *
  126.      * @param array(string=>mixed) $array 
  127.      * @return ezcConfigurationIniItem 
  128.      * @ignore
  129.      */
  130.     static public function __set_statearray $array )
  131.     {
  132.         return new ezcConfigurationIniItem(
  133.             $array['type']$array['group']$array['setting'],
  134.             $array['dimensions']$array['comments']$array['value']
  135.         );
  136.     }
  137. }
  138. ?>
Documentation generated by phpDocumentor 1.4.3