| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 10 /** 11 * Composes several tools into one 12 * Doesn't check if tools have any intersecting methods. Method of the latter tools always wins. 13 * @see lmbToolkit :: merge() 14 * @package toolkit 15 * @version $Id: lmbCompositeToolkitTools.class.php 5945 2007-06-06 08:31:43Z pachanga $ 16 */ 17 class lmbCompositeToolkitTools implements lmbToolkitTools 18 { 19 /** 20 * @var array Array of {@link lmbToolkitTools} 21 */ 22 protected $tools = array(); 23 24 /** 25 * Constructor 26 * Can accept array of tools or many arguments. In second case will treat all arguments as tools 27 * @param array Array of {@link lmbToolkitTools} 28 */ 29 function __construct($tools) 30 { 31 if(is_array($tools)) 32 $this->tools = $tools; 33 else 34 $this->tools = func_get_args(); 35 } 36 37 function __clone() 38 { 39 foreach($this->tools as $key => $tools) 40 $this->tools[$key] = clone($tools); 41 } 42 43 /** 44 * @see lmbToolkitTools :: getToolsSignatures() 45 */ 46 function getToolsSignatures() 47 { 48 $result = array(); 49 foreach($this->tools as $tools) 50 { 51 $signatures = $tools->getToolsSignatures(); 52 $result = array_merge($result, $signatures); 53 } 54 return $result; 55 } 56 } 57 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Oct 14 04:47:40 2008 | Cross-referenced by PHPXref 0.7 |