Gumbo_Interface_Factory
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.
Author(s): |
Michael Luster <mluster79@yahoo.com> |
License: | New BSD License |
Copyright: | Copyright (c) 2007, iBayou, Michael Luster |
Link: | http://sourceforge.net/projects/phpgumbo |
Version: | 0.0.1 |
Interface Methods
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.
Parameter(s):
- (string|int) $name :: name of Class or key string
- (mixed) $args :: additional arguments
[ Top ]