protected function normalizeFieldDefinitions(array $fieldDefinitions, $namespace = '')
    {
        foreach ($fieldDefinitions as &$fieldDefinition) {
            if ($fieldDefinition['type'] == 'bool') {
                $fieldDefinition['type'] = 'boolean';
            } elseif ($fieldDefinition['type'] == 'int') {
                $fieldDefinition['type'] = 'integer';
            } elseif (preg_match('/^[A-Z]/', $fieldDefinition['type'])) {
                if (class_exists($fieldDefinition['type'])) {
                    $fieldDefinition['type'] = '\\' . $fieldDefinition['type'];
                } else {
                    $fieldDefinition['type'] = '\\' . $namespace . '\\' . $fieldDefinition['type'];
                }
            }
        }
        return $fieldDefinitions;
    }
protected function normalizeFieldDefinitions(array $fieldDefinitions, $namespace = '')
    {
        foreach ($fieldDefinitions as &$fieldDefinition) {
            if ($fieldDefinition['type'] == 'bool') {
                $fieldDefinition['type'] = 'boolean';
            } elseif ($fieldDefinition['type'] == 'int') {
                $fieldDefinition['type'] = 'integer';
            } elseif (preg_match('/^[A-Z]/', $fieldDefinition['type'])) {
                if (class_exists($fieldDefinition['type'])) {
                    $fieldDefinition['type'] = '\\' . $fieldDefinition['type'];
                } else {
                    $fieldDefinition['type'] = '\\' . $namespace . '\\' . $fieldDefinition['type'];
                }
            }
        }
        return $fieldDefinitions;
    }
protected function normalizeFieldDefinitions ( array $ fieldDefinitions , $ namespace = '' ) { foreach ( $ fieldDefinitions as & $ fieldDefinition ) { if ( $ fieldDefinition [ 'type' ] == 'bool' ) { $ fieldDefinition [ 'type' ] = 'boolean' ; } elseif ( $ fieldDefinition [ 'type' ] == 'int' ) { $ fieldDefinition [ 'type' ] = 'integer' ; } elseif ( preg_match ( '/^[A-Z]/' , $ fieldDefinition [ 'type' ] ) ) { if ( class_exists ( $ fieldDefinition [ 'type' ] ) ) { $ fieldDefinition [ 'type' ] = '\\' . $ fieldDefinition [ 'type' ] ; } else { $ fieldDefinition [ 'type' ] = '\\' . $ namespace . '\\' . $ fieldDefinition [ 'type' ] ; } } } return $ fieldDefinitions ; }
Normalize types and prefix types with namespaces

@param array $fieldDefinitions The field definitions
@param string $namespace The namespace
@return array The normalized and type converted field definitions
Normalize types and prefix types with namespaces