Zend\Di\ServiceLocator\Generator
Generator that creates the body of a service locator that can emulate the logic of the given Zend\Di\Di instance without class definitions
Synopsis
class Generator
{
- // members
- protected string $containerClass;
- protected DependencyInjectorProxy $injector;
- protected null|string $namespace;
- // methods
- public void __construct()
- public Generator setContainerClass()
- public Generator setNamespace()
- public FileGenerator getCodeGenerator()
- protected array reduceAliases()
- protected MethodGenerator getCodeGenMethodFromAlias()
- protected string normalizeAlias()
Members
protected
- $containerClass
- $injector — Zend\Di\ServiceLocator\DependencyInjectorProxy
- $namespace — Zend\Di\ServiceLocator\null|string
Methods
protected
- getCodeGenMethodFromAlias() — Create a PhpMethod code generation object named after a given alias
- normalizeAlias() — Normalize an alias to a getter method name
- reduceAliases() — Reduces aliases
public
- __construct() — Constructor
- getCodeGenerator() — Construct, configure, and return a PHP class file code generation object
- setContainerClass() — Set the class name for the generated service locator container
- setNamespace() — Set the namespace to use for the generated class file