PHP Class ZF2rapid\Generator\ClassGenerator\EntityClassGenerator

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

Protected Properties

Property Type Description
$config array
$tableData

Public Methods

Method Description
__construct ( array $config = [], array $tableData = [] )
build ( string $className, string $moduleName ) Build the class

Protected Methods

Method Description
addClassDocBlock ( string $className, string $moduleName ) Add a class doc block
fetchPrimaryColumns ( ) : array
fetchTableColumns ( ) : array
generateGetMethod ( $columnName, $columnType ) : MethodGenerator
generateIdentifierMethod ( array $primaryColumns, array $tableColumns ) : MethodGenerator
generateMagicToStringMethod ( array $primaryColumns, array $tableColumns ) : MethodGenerator
generateNormalToStringMethod ( ) : MethodGenerator
generateProperty ( $columnName, $columnType ) : Zend\Code\Generator\PropertyGenerator
generateSetMethod ( $columnName, $columnType ) : MethodGenerator

Method Details

__construct() public method

public __construct ( array $config = [], array $tableData = [] )
$config array
$tableData array

addClassDocBlock() protected method

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

build() public method

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

fetchPrimaryColumns() protected method

protected fetchPrimaryColumns ( ) : array
return array

fetchTableColumns() protected method

protected fetchTableColumns ( ) : array
return array

generateGetMethod() protected method

protected generateGetMethod ( $columnName, $columnType ) : MethodGenerator
$columnName
$columnType
return Zend\Code\Generator\MethodGenerator

generateIdentifierMethod() protected method

protected generateIdentifierMethod ( array $primaryColumns, array $tableColumns ) : MethodGenerator
$primaryColumns array
$tableColumns array
return Zend\Code\Generator\MethodGenerator

generateMagicToStringMethod() protected method

protected generateMagicToStringMethod ( array $primaryColumns, array $tableColumns ) : MethodGenerator
$primaryColumns array
$tableColumns array
return Zend\Code\Generator\MethodGenerator

generateNormalToStringMethod() protected method

protected generateNormalToStringMethod ( ) : MethodGenerator
return Zend\Code\Generator\MethodGenerator

generateProperty() protected method

protected generateProperty ( $columnName, $columnType ) : Zend\Code\Generator\PropertyGenerator
$columnName
$columnType
return Zend\Code\Generator\PropertyGenerator

generateSetMethod() protected method

protected generateSetMethod ( $columnName, $columnType ) : MethodGenerator
$columnName
$columnType
return Zend\Code\Generator\MethodGenerator

Property Details

$config protected_oe property

protected array $config
return array

$tableData protected_oe property

protected $tableData