Library/Phalcon/Annotations/ModelStrategy.php
public function getColumnMaps(ModelInterface $model, DiInterface $di)
    {
        $reflection = $di['annotations']->get($model);
        $columnMap = array();
        $reverseColumnMap = array();
        $renamed = false;
        foreach ($reflection->getPropertiesAnnotations() as $name => $collection) {
            if ($collection->has('Column')) {
                $arguments = $collection->get('Column')->getArguments();
                /**
                 * Get the column's name
                 */
                if (isset($arguments['column'])) {
                    $columnName = $arguments['column'];
                } else {
                    $columnName = $name;
                }
                $columnMap[$columnName] = $name;
                $reverseColumnMap[$name] = $columnName;
                if (!$renamed) {
                    if ($columnName != $name) {
                        $renamed = true;
                    }
                }
            }
        }
        return array(
            MetaData::MODELS_COLUMN_MAP => $columnMap,
            MetaData::MODELS_REVERSE_COLUMN_MAP => $reverseColumnMap
        );
    }
public function getColumnMaps(ModelInterface $model, DiInterface $di)
    {
        $reflection = $di['annotations']->get($model);
        $columnMap = array();
        $reverseColumnMap = array();
        $renamed = false;
        foreach ($reflection->getPropertiesAnnotations() as $name => $collection) {
            if ($collection->has('Column')) {
                $arguments = $collection->get('Column')->getArguments();
                /**
                 * Get the column's name
                 */
                if (isset($arguments['column'])) {
                    $columnName = $arguments['column'];
                } else {
                    $columnName = $name;
                }
                $columnMap[$columnName] = $name;
                $reverseColumnMap[$name] = $columnName;
                if (!$renamed) {
                    if ($columnName != $name) {
                        $renamed = true;
                    }
                }
            }
        }
        return array(
            MetaData::MODELS_COLUMN_MAP => $columnMap,
            MetaData::MODELS_REVERSE_COLUMN_MAP => $reverseColumnMap
        );
    }
public function getColumnMaps ( ModelInterface $ model , DiInterface $ di ) { $ reflection = $ di [ 'annotations' ] -> get ( $ model ) ; $ columnMap = array ( ) ; $ reverseColumnMap = array ( ) ; $ renamed = false ; foreach ( $ reflection -> getPropertiesAnnotations ( ) as $ name => $ collection ) { if ( $ collection -> has ( 'Column' ) ) { $ arguments = $ collection -> get ( 'Column' ) -> getArguments ( ) ; /**
                 * Get the column's name
                 */ if ( isset ( $ arguments [ 'column' ] ) ) { $ columnName = $ arguments [ 'column' ] ; } else { $ columnName = $ name ; } $ columnMap [ $ columnName ] = $ name ; $ reverseColumnMap [ $ name ] = $ columnName ; if ( ! $ renamed ) { if ( $ columnName != $ name ) { $ renamed = true ; } } } } return array ( MetaData :: MODELS_COLUMN_MAP => $ columnMap , MetaData :: MODELS_REVERSE_COLUMN_MAP => $ reverseColumnMap ) ; }
Initializes the model's column map

@param \Phalcon\Mvc\ModelInterface $model
@param \Phalcon\DiInterface $di
@return array
Initializes the model s column map