PHP Class ZF2rapid\Generator\CrudGenerator\ControllerClassGenerator

Inheritance: extends Zend\Code\Generator\ClassGenerator, implements ZF2rapid\Generator\ClassGenerator\ClassGeneratorInterface
Mostra file Open project: zfrapid/zf2rapid

Protected Properties

Property Type Description
$config array
$controllerName null | string
$entityClass string
$entityModule string
$paramModule string

Public Methods

Method Description
__construct ( null | string $controllerName, null | string $paramModule, null | string $entityModule, null | string $entityClass, array $config = [] )
build ( string $className, string $moduleName ) Build the class

Protected Methods

Method Description
addClassDocBlock ( string $controllerName, string $moduleName ) Add a class doc block
addCreateControllerAction ( $repositoryClass, $formClass ) Add indexAction() method for CreateController
addDeleteControllerAction ( $repositoryClass, $formClass ) Add indexAction() method for DeleteController
addFormProperty ( $formClass ) Add form property
addFormSetter ( $formClass ) Add form setter
addIndexControllerAction ( $repositoryClass ) Add indexAction() method for IndexController
addRepositoryProperty ( $repositoryClass ) Add repository property
addRepositorySetter ( $repositoryClass ) Add repository setter
addShowControllerAction ( $repositoryClass ) Add indexAction() method for ShowController
addUpdateControllerAction ( $repositoryClass, $formClass ) Add indexAction() method for UpdateController

Method Details

__construct() public method

public __construct ( null | string $controllerName, null | string $paramModule, null | string $entityModule, null | string $entityClass, array $config = [] )
$controllerName null | string
$paramModule null | string
$entityModule null | string
$entityClass null | string
$config array

addClassDocBlock() protected method

Add a class doc block
protected addClassDocBlock ( string $controllerName, string $moduleName )
$controllerName string
$moduleName string

addCreateControllerAction() protected method

Add indexAction() method for CreateController
protected addCreateControllerAction ( $repositoryClass, $formClass )
$repositoryClass
$formClass

addDeleteControllerAction() protected method

Add indexAction() method for DeleteController
protected addDeleteControllerAction ( $repositoryClass, $formClass )
$repositoryClass
$formClass

addFormProperty() protected method

Add form property
protected addFormProperty ( $formClass )
$formClass

addFormSetter() protected method

Add form setter
protected addFormSetter ( $formClass )
$formClass

addIndexControllerAction() protected method

Add indexAction() method for IndexController
protected addIndexControllerAction ( $repositoryClass )
$repositoryClass

addRepositoryProperty() protected method

Add repository property
protected addRepositoryProperty ( $repositoryClass )
$repositoryClass

addRepositorySetter() protected method

Add repository setter
protected addRepositorySetter ( $repositoryClass )
$repositoryClass

addShowControllerAction() protected method

Add indexAction() method for ShowController
protected addShowControllerAction ( $repositoryClass )
$repositoryClass

addUpdateControllerAction() protected method

Add indexAction() method for UpdateController
protected addUpdateControllerAction ( $repositoryClass, $formClass )
$repositoryClass
$formClass

build() public method

Build the class
public build ( string $className, string $moduleName )
$className string
$moduleName string

Property Details

$config protected_oe property

protected array $config
return array

$controllerName protected_oe property

protected null|string $controllerName
return null | string

$entityClass protected_oe property

protected string $entityClass
return string

$entityModule protected_oe property

protected string $entityModule
return string

$paramModule protected_oe property

protected string $paramModule
return string