Library/Bullhorn/FastRest/Generator/ModelBuilder.php
private function buildColumnMap() {
        $content = '		return $this->columnMapMissingColumnsFix(array(' . "\n";
        foreach($this->getFields() as $field) {
            $content .= '			\'' . $field->getName() . '\' => \'' . $field->getShortName() . '\',' . "\n";
        }
        $content = substr($content, 0, -2) . "\n"; //Remove trailing comma
        $content .= '		));';
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Updates so we can use the shortened names, without changing the database');
        $method->setName('columnMap');
        $method->setReturnType('string[] keys are the real names, values are the names in the application');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);

        $this->getAbstractClass()->addUse('Phalcon\Db\Column');
        $content = '		return [';
        foreach($this->getFields() as $field) {
            $content .= '			\'' . $field->getShortName() . '\' => Column::' . $field->getPhalconColumnType() . ',' . "\n";
        }
        $content .= '       ];';
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Used for determining the database type');
        $method->setName('getDatabaseTypes');
        $method->setReturnType('string[] keys are the column names, values are the DB\Column');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);
    }
private function buildColumnMap() {
        $content = '		return $this->columnMapMissingColumnsFix(array(' . "\n";
        foreach($this->getFields() as $field) {
            $content .= '			\'' . $field->getName() . '\' => \'' . $field->getShortName() . '\',' . "\n";
        }
        $content = substr($content, 0, -2) . "\n"; //Remove trailing comma
        $content .= '		));';
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Updates so we can use the shortened names, without changing the database');
        $method->setName('columnMap');
        $method->setReturnType('string[] keys are the real names, values are the names in the application');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);

        $this->getAbstractClass()->addUse('Phalcon\Db\Column');
        $content = '		return [';
        foreach($this->getFields() as $field) {
            $content .= '			\'' . $field->getShortName() . '\' => Column::' . $field->getPhalconColumnType() . ',' . "\n";
        }
        $content .= '       ];';
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Used for determining the database type');
        $method->setName('getDatabaseTypes');
        $method->setReturnType('string[] keys are the column names, values are the DB\Column');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);
    }
private function buildColumnMap ( ) { $ content = '		return $this->columnMapMissingColumnsFix(array(' . "\n" ; foreach ( $ this -> getFields ( ) as $ field ) { $ content .= '			\'' . $ field -> getName ( ) . '\' => \'' . $ field -> getShortName ( ) . '\',' . "\n" ; } $ content = substr ( $ content , 0 , - 2 ) . "\n" ; //Remove trailing comma $ content .= '		));' ; $ method = new Object \ Method ( ) ; $ method -> setAccess ( 'public' ) ; $ method -> setDescription ( 'Updates so we can use the shortened names, without changing the database' ) ; $ method -> setName ( 'columnMap' ) ; $ method -> setReturnType ( 'string[] keys are the real names, values are the names in the application' ) ; $ method -> setContent ( $ content ) ; $ this -> getAbstractClass ( ) -> addMethod ( $ method ) ; $ this -> getAbstractClass ( ) -> addUse ( 'Phalcon\Db\Column' ) ; $ content = '		return [' ; foreach ( $ this -> getFields ( ) as $ field ) { $ content .= '			\'' . $ field -> getShortName ( ) . '\' => Column::' . $ field -> getPhalconColumnType ( ) . ',' . "\n" ; } $ content .= '       ];' ; $ method = new Object \ Method ( ) ; $ method -> setAccess ( 'public' ) ; $ method -> setDescription ( 'Used for determining the database type' ) ; $ method -> setName ( 'getDatabaseTypes' ) ; $ method -> setReturnType ( 'string[] keys are the column names, values are the DB\Column' ) ; $ method -> setContent ( $ content ) ; $ this -> getAbstractClass ( ) -> addMethod ( $ method ) ; }
Builds the column maps
@return void
Builds the column maps