Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/vendors/Textpattern/Container/Container.php - 134 lines - 3362 bytes - Source - Print

Description: (no description)

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Container:: (4 methods):
register()
remove()
resolveAlias()
getInstance()

Class: Container

Container.

Base container implementation for resolving and initialising classes.
Basic usage would happen with the getInstance() method:

<code>
$container = new \Textpattern\Container\Container();
$container->getInstance('Abc_class', 'argument1', 'argument2');
</code>

Normally you would write a static wrapper class for the container to keep the
instances and configuration between calls. See the 'Txp' class for
Textpattern's own implementation.

register($alias, $class line: 63
{@inheritdoc}

remove($alias line: 78
{@inheritdoc}

resolveAlias($alias line: 89
Resolves an alias to the actual classname.

return: string The classname
param: string $alias The alias
getInstance($alias, array $options line: 105
{@inheritdoc}

title

Body