Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
_namespaceMap ($namespace) | |
& | instantiateTypeDescription ($typeDescription) |
Static Public Member Functions | |
static | getInstance () |
A factory class that takes a plain text type descriptor and instantiates the correct type description object based on the descriptor's namespace.
Definition at line 24 of file TypeDescriptionFactory.inc.php.
TypeDescriptionFactory::__construct | ( | ) |
Constructor
NB: Should not be called directly! Always use getInstance().
Definition at line 31 of file TypeDescriptionFactory.inc.php.
TypeDescriptionFactory::_namespaceMap | ( | $namespace | ) |
Map a namespace to a fully qualified type descriptor class name.
FIXME: Move this map to the Application object.
$namespace | string |
Definition at line 105 of file TypeDescriptionFactory.inc.php.
Referenced by instantiateTypeDescription().
|
static |
Return an instance of the session manager.
Definition at line 41 of file TypeDescriptionFactory.inc.php.
References Registry\get().
Referenced by Filter\setTransformationType(), TypeDescriptionFactoryTest\testInstantiateTypeDescription(), FilterTest\testInstantiationAndExecute(), and PersistableFilterTest\testInstantiationAndExecute().
& TypeDescriptionFactory::instantiateTypeDescription | ( | $typeDescription | ) |
Takes a plain text type descriptor, identifies the namespace and instantiates the corresponding type description object.
$typeDescription | string A plain text type description. |
Type descriptions consist of two parts:
Example: primitive::string[5] -> namespace: primitive - type name: string[5]
Each namespace will be mapped to one subclass of the TypeDescription class which will then be responsible to parse the given type name.
Definition at line 74 of file TypeDescriptionFactory.inc.php.
References _namespaceMap(), and instantiate().