[ Index ] |
PHP Cross Reference of PHK Manager |
[Summary view] [Print] [Text view]
1 <?php 2 //============================================================================= 3 // 4 // Copyright Francois Laupretre <phk@tekwire.net> 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // 10 // http://www.apache.org/licenses/LICENSE-2.0 11 // 12 // Unless required by applicable law or agreed to in writing, software 13 // distributed under the License is distributed on an "AS IS" BASIS, 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 // See the License for the specific language governing permissions and 16 // limitations under the License. 17 // 18 //============================================================================= 19 /** 20 * @copyright Francois Laupretre <phk@tekwire.net> 21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, V 2.0 22 * @category PHK 23 * @package PHK 24 *///========================================================================== 25 26 namespace PHK\Tools { 27 28 if (!class_exists('PHK\Tools\ItemLister',false)) 29 { 30 //============================================================================= 31 /** 32 * A utility class used only at package creation time. 33 * 34 * This class maintains an array and appends elements to it, eliminating 35 * duplicate keys. When every elements have been appended, it returns the resulting 36 * array. 37 * 38 * API status: Private 39 * Included in the PHK PHP runtime: No 40 * Implemented in the extension: No 41 *///========================================================================== 42 43 class ItemLister 44 { 45 private $a; 46 47 //--------- 48 49 public function __construct() 50 { 51 $this->a=array(); 52 } 53 54 //--------- 55 56 public function add($item,$value) 57 { 58 $this->a[$item]=$value; 59 } 60 61 //--------- 62 63 public function get() 64 { 65 return $this->a; 66 } 67 68 //--- 69 } // End of class 70 //=========================================================================== 71 } // End of class_exists 72 //=========================================================================== 73 } // End of namespace 74 //=========================================================================== 75 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jun 4 18:33:15 2015 | Cross-referenced by PHPXref 0.7.1 |