PHP Class Puli\Manager\Factory\FactoryManagerImpl

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements Puli\Manager\Api\Factory\FactoryManager
Exibir arquivo Open project: puli/manager Class Usage Examples

Public Methods

Method Description
__construct ( Puli\Manager\Api\Context\ProjectContext $context, Puli\Manager\Api\Factory\Generator\GeneratorRegistry $generatorRegistry, Puli\Manager\Php\ClassWriter $classWriter, ModuleList $modules = null, Puli\Manager\Api\Server\ServerCollection $servers = null ) Creates a new factory generator.
addCreateUrlGeneratorMethod ( Puli\Manager\Api\Php\Clazz $class ) Adds the createUrlGenerator() method.
addGetModuleOrderMethod ( Puli\Manager\Api\Php\Clazz $class ) Adds the getModuleOrder() method.
autoGenerateFactoryClass ( $path = null, $className = null )
createFactory ( $path = null, $className = null )
generateFactoryClass ( $path = null, $className = null )
isFactoryClassAutoGenerated ( )
refreshFactoryClass ( $path = null, $className = null )
setModules ( ModuleList $modules ) Sets the modules included in the getModuleOrder() method.
setServers ( Puli\Manager\Api\Server\ServerCollection $servers ) Sets the servers included in the createUrlGenerator() method.

Private Methods

Method Description
addCreateDiscoveryMethod ( Puli\Manager\Api\Php\Clazz $class ) Adds the createDiscovery() method.
addCreateRepositoryMethod ( Puli\Manager\Api\Php\Clazz $class ) Adds the createRepository() method.
camelize ( string $string ) : string Camelizes a string.
camelizeKeys ( array $array ) : array Recursively camelizes the keys of an array.

Method Details

__construct() public method

Creates a new factory generator.
public __construct ( Puli\Manager\Api\Context\ProjectContext $context, Puli\Manager\Api\Factory\Generator\GeneratorRegistry $generatorRegistry, Puli\Manager\Php\ClassWriter $classWriter, ModuleList $modules = null, Puli\Manager\Api\Server\ServerCollection $servers = null )
$context Puli\Manager\Api\Context\ProjectContext The project context.
$generatorRegistry Puli\Manager\Api\Factory\Generator\GeneratorRegistry The registry providing the generators for the services returned by the factory.
$classWriter Puli\Manager\Php\ClassWriter The writer that writes the class to a file.
$modules Puli\Manager\Api\Module\ModuleList The loaded modules.
$servers Puli\Manager\Api\Server\ServerCollection The configured servers.

addCreateUrlGeneratorMethod() public method

Adds the createUrlGenerator() method.
public addCreateUrlGeneratorMethod ( Puli\Manager\Api\Php\Clazz $class )
$class Puli\Manager\Api\Php\Clazz The factory class model.

addGetModuleOrderMethod() public method

Adds the getModuleOrder() method.
public addGetModuleOrderMethod ( Puli\Manager\Api\Php\Clazz $class )
$class Puli\Manager\Api\Php\Clazz The factory class model.

autoGenerateFactoryClass() public method

public autoGenerateFactoryClass ( $path = null, $className = null )

createFactory() public method

public createFactory ( $path = null, $className = null )

generateFactoryClass() public method

public generateFactoryClass ( $path = null, $className = null )

isFactoryClassAutoGenerated() public method

refreshFactoryClass() public method

public refreshFactoryClass ( $path = null, $className = null )

setModules() public method

Sets the modules included in the getModuleOrder() method.
public setModules ( ModuleList $modules )
$modules Puli\Manager\Api\Module\ModuleList The loaded modules.

setServers() public method

Sets the servers included in the createUrlGenerator() method.
public setServers ( Puli\Manager\Api\Server\ServerCollection $servers )
$servers Puli\Manager\Api\Server\ServerCollection The configured servers.