Source for file Factory.class.php
Documentation is available at Factory.class.php
* Gumbo Library Framework
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* Factory Pattern Interface
* A Factory is responsible for creating new objects. It is responsible
* for knowing how to instantiate a class. A Factory should define the value
* to be passed through the 'name' argument. All Factories should check if the
* class implements the Singleton interface.
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* @desc Factory Pattern Interface
* Returns an instantiated object.
* The first argument is either the name of the Class, or a key
* reference to a Class (string|int). It will depend on the Factory as to
* what type of argument is required.
* In some cases, the method will accept additional arguments. Each
* will be passed to the Constructor in the order they are given. It
* is important to follow the rules defined by the Factory, passing
* the appropriate arguments for the classes it instantiates.
* @param string|int$name name of Class or key string
* @param mixed $args additional arguments
public function factory ($name=
null, $args=
null);