PHP Class InfyOm\Generator\Utils\TableFieldsGenerator

Show file Open project: infyomlabs/laravel-generator Class Usage Examples

Public Methods

Method Description
generateFieldsFromTable ( $tableName )
getPrimaryKeyFromTable ( string $tableName ) : string | null
getTimestampFieldNames ( ) : array

Private Methods

Method Description
generateDecimalInput ( Doctrine\DBAL\Schema\Column $column ) : string
generateFloatInput ( Doctrine\DBAL\Schema\Column $column ) : string
generateIntFieldInput ( string $name, string $type, Doctrine\DBAL\Schema\Column $column ) : string
generateSingleFieldInput ( $name, $type )
generateStringInput ( Doctrine\DBAL\Schema\Column $column, integer $length = 255 ) : string
generateTextInput ( Doctrine\DBAL\Schema\Column $column ) : string

Method Details

generateFieldsFromTable() public static method

public static generateFieldsFromTable ( $tableName )

getPrimaryKeyFromTable() public static method

public static getPrimaryKeyFromTable ( string $tableName ) : string | null
$tableName string
return string | null The column name of the (simple) primary key

getTimestampFieldNames() public static method

public static getTimestampFieldNames ( ) : array
return array the set of [created_at column name, updated_at column name]