src/InstallerModule/Generator/ModelGenerator.php
protected function generateBody($modelName, array $properties)
    {
        $linesProperties = array("");
        $linesMethods    = array("");
        
        foreach ($properties as $field) {
            foreach ($field as $property) {
                $linesProperties[] = "    /**";
                $linesProperties[] = "     * " . $property['columnName'];
                $linesProperties[] = "     * ";
                $linesProperties[] = "     * @var $property[type] $$property[fieldName]";
                $linesProperties[] = "     */";
                $linesProperties[] = "    protected $$property[fieldName];";
                $linesProperties[] = "";

                # Getter Property
                $linesMethods[] = str_replace(array(
                    '<description>', 
                    '<fieldName>', 
                    '<variableType>', 
                    '<methodName>',
                    '<spaces>'
                ), array(
                    'Get ' . $property['columnName'], 
                    $property['fieldName'], 
                    $property['type'], 
                    'get' . ucwords($property['fieldName']),
                    "    "
                ), self::$getMethodTemplate);
                $linesMethods[] = "";
                # Setter Property
                $linesMethods[] = str_replace(array(
                    '<description>',
                    '<fieldName>',
                    '<variableType>',
                    '<variableName>', 
                    '<modelClass>',
                    '<methodName>',
                    '<spaces>'
                ), array(
                    'Set ' . $property['columnName'], 
                    $property['fieldName'], 
                    $property['type'],
                    $property['fieldName'],
                    $modelName,
                    'set' . ucwords($property['fieldName']),
                    "    "
                ), self::$setMethodTemplate);
                $linesMethods[] = "";
            }
        }
        
        return implode("\n", $linesProperties) . implode("\n", $linesMethods);
    }
protected function generateBody($modelName, array $properties)
    {
        $linesProperties = array("");
        $linesMethods    = array("");
        
        foreach ($properties as $field) {
            foreach ($field as $property) {
                $linesProperties[] = "    /**";
                $linesProperties[] = "     * " . $property['columnName'];
                $linesProperties[] = "     * ";
                $linesProperties[] = "     * @var $property[type] $$property[fieldName]";
                $linesProperties[] = "     */";
                $linesProperties[] = "    protected $$property[fieldName];";
                $linesProperties[] = "";

                # Getter Property
                $linesMethods[] = str_replace(array(
                    '<description>', 
                    '<fieldName>', 
                    '<variableType>', 
                    '<methodName>',
                    '<spaces>'
                ), array(
                    'Get ' . $property['columnName'], 
                    $property['fieldName'], 
                    $property['type'], 
                    'get' . ucwords($property['fieldName']),
                    "    "
                ), self::$getMethodTemplate);
                $linesMethods[] = "";
                # Setter Property
                $linesMethods[] = str_replace(array(
                    '<description>',
                    '<fieldName>',
                    '<variableType>',
                    '<variableName>', 
                    '<modelClass>',
                    '<methodName>',
                    '<spaces>'
                ), array(
                    'Set ' . $property['columnName'], 
                    $property['fieldName'], 
                    $property['type'],
                    $property['fieldName'],
                    $modelName,
                    'set' . ucwords($property['fieldName']),
                    "    "
                ), self::$setMethodTemplate);
                $linesMethods[] = "";
            }
        }
        
        return implode("\n", $linesProperties) . implode("\n", $linesMethods);
    }
protected function generateBody ( $ modelName , array $ properties ) { $ linesProperties = array ( "" ) ; $ linesMethods = array ( "" ) ; foreach ( $ properties as $ field ) { foreach ( $ field as $ property ) { $ linesProperties [ ] = "    /**" ; $ linesProperties [ ] = "     * " . $ property [ 'columnName' ] ; $ linesProperties [ ] = "     * " ; $ linesProperties [ ] = "     * @var $property[type] $$property[fieldName]" ; $ linesProperties [ ] = "     */" ; $ linesProperties [ ] = "    protected $$property[fieldName];" ; $ linesProperties [ ] = "" ; # Getter Property $ linesMethods [ ] = str_replace ( array ( '<description>' , '<fieldName>' , '<variableType>' , '<methodName>' , '<spaces>' ) , array ( 'Get ' . $ property [ 'columnName' ] , $ property [ 'fieldName' ] , $ property [ 'type' ] , 'get' . ucwords ( $ property [ 'fieldName' ] ) , "    " ) , self :: $ getMethodTemplate ) ; $ linesMethods [ ] = "" ; # Setter Property $ linesMethods [ ] = str_replace ( array ( '<description>' , '<fieldName>' , '<variableType>' , '<variableName>' , '<modelClass>' , '<methodName>' , '<spaces>' ) , array ( 'Set ' . $ property [ 'columnName' ] , $ property [ 'fieldName' ] , $ property [ 'type' ] , $ property [ 'fieldName' ] , $ modelName , 'set' . ucwords ( $ property [ 'fieldName' ] ) , "    " ) , self :: $ setMethodTemplate ) ; $ linesMethods [ ] = "" ; } } return implode ( "\n" , $ linesProperties ) . implode ( "\n" , $ linesMethods ) ; }
Generate array properties, getters and setters

@param string $modelName
@param array $properties
@return string
Generate array properties getters and setters