1694. Class

1694.1. Zend\Di\ServiceLocator\Generator

Generator that creates the body of a service locator that can emulate the logic of the given ZendDiDi instance without class definitions

1694.1.1. Methods

1694.1.1.1. __construct

__construct()

Constructor

Requires a DependencyInjection manager on which to operate.

Parameters:Di

1694.1.1.2. setContainerClass

setContainerClass()

Set the class name for the generated service locator container

Parameters:string
Return type:Generator

1694.1.1.3. setNamespace

setNamespace()

Set the namespace to use for the generated class file

Parameters:string
Return type:Generator

1694.1.1.4. getCodeGenerator

getCodeGenerator()

Construct, configure, and return a PHP class file code generation object

Creates a ZendCodeGeneratorFileGenerator object that has created the specified class and service locator methods.

Parameters:null|string
Throws ZendDiExceptionRuntimeException:
 
Return type:FileGenerator

1694.1.1.5. reduceAliases

reduceAliases()

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:array
Return type:array

1694.1.1.6. getCodeGenMethodFromAlias

getCodeGenMethodFromAlias()

Create a PhpMethod code generation object named after a given alias

Parameters:
  • string
  • string – Class to which alias refers
Return type:

MethodGenerator

1694.1.1.7. normalizeAlias

normalizeAlias()

Normalize an alias to a getter method name

Parameters:string
Return type:string