Generator that creates the body of a service locator that can emulate the logic of the given Zend instance without class definitions.
More...
|
| __construct (Di $injector) |
| Constructor.
|
|
| setContainerClass ($name) |
| Set the class name for the generated service locator container.
|
|
| setNamespace ($namespace) |
| Set the namespace to use for the generated class file.
|
|
| getCodeGenerator ($filename=null) |
| Construct, configure, and return a PHP class file code generation object.
|
|
Generator that creates the body of a service locator that can emulate the logic of the given Zend instance without class definitions.
__construct |
( |
Di |
$injector | ) |
|
Constructor.
Requires a DependencyInjection manager on which to operate.
- Parameters
-
getCodeGenerator |
( |
|
$filename = null | ) |
|
Construct, configure, and return a PHP class file code generation object.
Creates a Zend object that has created the specified class and service locator methods.
- Parameters
-
- Exceptions
-
\Zend\Di\Exception\RuntimeException | |
- Returns
- FileGenerator
getCodeGenMethodFromAlias |
( |
|
$alias, |
|
|
|
$class |
|
) |
| |
|
protected |
Create a PhpMethod code generation object named after a given alias.
- Parameters
-
string | $alias | |
string | $class | Class to which alias refers |
- Returns
- MethodGenerator
Normalize an alias to a getter method name.
- Parameters
-
- Returns
- string
reduceAliases |
( |
array |
$aliasList | ) |
|
|
protected |
Reduces aliases.
Takes alias list and reduces it to a 2-dimensional array of class names pointing to an array of aliases that resolve to it.
- Parameters
-
- Returns
- array
setContainerClass |
( |
|
$name | ) |
|
Set the class name for the generated service locator container.
- Parameters
-
- Returns
- Generator
setNamespace |
( |
|
$namespace | ) |
|
Set the namespace to use for the generated class file.
- Parameters
-
- Returns
- Generator
$containerClass = 'ApplicationContext' |
|
protected |