Creates column class based on numOfColumns
@return string
763178
protected function createClass()
	{
		$cols = $this->numOfColumns;
		if ($cols === self::COLUMNS_NONE) {
			return 'col';
		} elseif ($cols === self::COLUMNS_AUTO) {
			return 'col-auto';
		} else {
			// number
			if ($this->row->gridBreakPoint != NULL) {
				return 'col-' . $this->row->gridBreakPoint . '-' . $this->numOfColumns;
			} else {
				return 'col-' . $this->numOfColumns;
			}
		}
	}
435376
protected function createColumn($column)
	{
		$c=new CMysqlColumnSchema;
		$c->name=$column['Field'];
		$c->rawName=$this->quoteColumnName($c->name);
		$c->allowNull=$column['Null']==='YES';
		$c->isPrimaryKey=strpos($column['Key'],'PRI')!==false;
		$c->isForeignKey=false;
		$c->init($column['Type'],$column['Default']);
		$c->autoIncrement=strpos(strtolower($column['Extra']),'auto_increment')!==false;
		if(isset($column['Comment']))
			$c->comment=$column['Comment'];

		return $c;
	}
828413
protected function getInsertColumnList()
    {
        $columns             = [];
        $versionPropertyName = $this->class->isVersioned()
            ? $this->class->versionProperty->getName()
            : null;

        foreach ($this->class->getDeclaredPropertiesIterator() as $name => $property) {
            /*if (isset($this->class->embeddedClasses[$name])) {
                continue;
            }*/

            switch (true) {
                case $property instanceof VersionFieldMetadata:
                    // Do nothing
                    break;

                case $property instanceof LocalColumnMetadata:
                    if (($property instanceof FieldMetadata
                            && (
                                ! $property->hasValueGenerator()
                                || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY
                            )
                        )
                        || $this->class->identifier[0] !== $name
                    ) {
                        $columnName = $property->getColumnName();

                        $columns[] = $columnName;

                        $this->columns[$columnName] = $property;
                    }

                    break;

                case $property instanceof AssociationMetadata:
                    if ($property->isOwningSide() && $property instanceof ToOneAssociationMetadata) {
                        $targetClass = $this->em->getClassMetadata($property->getTargetEntity());

                        foreach ($property->getJoinColumns() as $joinColumn) {
                            /** @var JoinColumnMetadata $joinColumn */
                            $columnName           = $joinColumn->getColumnName();
                            $referencedColumnName = $joinColumn->getReferencedColumnName();

                            if (! $joinColumn->getType()) {
                                $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
                            }

                            $columns[] = $columnName;

                            $this->columns[$columnName] = $joinColumn;
                        }
                    }

                    break;
            }
        }

        return $columns;
    }
441600
private function getAdditionalColumns()
    {
        $columns = ['facet_display_mode' => 'fal.facet_display_mode'];

        foreach ($this->overridenColumns as $column) {
            $columns[$column] = new \Zend_Db_Expr("COALESCE(fal.$column, additional_table.$column)");
            $columns['use_default_' . $column] = new \Zend_Db_Expr("IF(fal.$column IS NULL, 1, 0)");
            $columns['default_' . $column] = "additional_table.$column";
        }

        $maxPosition = $this->getMaxPosition() + 1;
        $columns['position'] = new \Zend_Db_Expr("IF(fal.position IS NULL, {$maxPosition} + additional_table.position, fal.position)");

        return $columns;
    }
636941
public function getColumn() : ?string 
    {
        if ( ! $this->hasColumn()) {
            $this->setColumn($this->getDefaultColumn());
        }
        return $this->column;
    }
1311614
private function generatorClassEntity() {

        /* Lista os schemas do banco de dados */
        foreach ($this->oMetadata->getSchemas() as $valueSchema) {

            $tableNames = $this->oMetadata->getTableNames($valueSchema);

            $namespaceSchema = 'Orm\\' . $this->toCamelCase($valueSchema) . '\Entities';

            /* Lista as tabelas do banco de dados */
            foreach ($tableNames as $tableName) {

                $multiPk = $primaryKey = $bodyExchangeArray = null;

                $class = new ClassGenerator();

                $class->setNamespaceName($namespaceSchema);

                $docBlockClass = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Classe tipo model da tabela ' . $tableName . ' dentro do schema ' . $valueSchema,
                            'longDescription' => null,
                ));

                $class->setDocBlock($docBlockClass);
                $class->setName($this->toCamelCase($tableName));

                $class->addProperty('DBSCHEMA', $valueSchema, PropertyGenerator::FLAG_STATIC);
                $class->addProperty('DBTABLE', $tableName, PropertyGenerator::FLAG_STATIC);

                foreach ($this->oMetadata->getConstraints($tableName, $valueSchema) as $constraint) {
                    if (!$constraint->hasColumns()) {
                        continue;
                    }

                    if ($constraint->isPrimaryKey()) {
                        $columns = $constraint->getColumns();

                        if (count($columns) > 1) {
                            $multiPk = true;
                            $primaryKey = implode(', ', $columns);
                        } else {
                            $multiPk = false;
                            $primaryKey = $columns[0];
                        }
                        $class->addProperty('MULTIPK', $multiPk, PropertyGenerator::FLAG_STATIC);
                        $class->addProperty('PKCOLUMN', $primaryKey, PropertyGenerator::FLAG_STATIC);
                    }
                }




                /* Cria os metodos setter/getter e as variáveis das colunas da tabela */

                $table = $this->oMetadata->getTable($tableName, $valueSchema);

                /* Lista as colunas da tabela do banco de dados */
                foreach ($table->getColumns() as $column) {

                    $varName = $this->camelCase($column->getName());
                    $class->addProperty($varName, null, PropertyGenerator::FLAG_PRIVATE);

                    $methodGet = 'get' . $this->toCamelCase($column->getName());
                    $methodSet = 'set' . $this->toCamelCase($column->getName());

                    $docBlockSet = DocBlockGenerator::fromArray(array(
                                'shortDescription' => 'Setter da coluna ' . $column->getName(),
                                'longDescription' => null,
                                'tags' => array(
                                    new Tag\ParamTag($varName, $this->prepareSqlTypeDocBlock($column->getDataType())),
                                ),
                    ));

                    $docBlockGet = DocBlockGenerator::fromArray(array(
                                'shortDescription' => 'Getter da coluna ' . $column->getName(),
                                'longDescription' => null,
                                'tags' => array(
                                    new Tag\ReturnTag(array(
                                        'datatype' => $this->prepareSqlTypeDocBlock($column->getDataType()),
                                            )),
                                ),
                    ));

                    $bodyGet = 'return $this->' . $varName . ';';
                    $bodySet = '$this->' . $varName . ' = $' . $this->camelCase($column->getName()) . ';';

                    $class->addMethod($methodSet, array($this->camelCase($column->getName())), MethodGenerator::FLAG_PUBLIC, $bodySet, $docBlockSet);
                    $class->addMethod($methodGet, array(), MethodGenerator::FLAG_PUBLIC, $bodyGet, $docBlockGet);

                    $bodyExchangeArray .= '$this->' . $varName . ' = (isset($data["' . $column->getName() . '"])) ? $data["' . $column->getName() . '"] : null;' . "\n\n";
                }

                $docBlockExchangeArray = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Função para settar todos os objetos por meio de array',
                            'longDescription' => null,
                            'tags' => array(
                                new Tag\ParamTag('data', 'array'),
                            ),
                ));
                $class->addMethod('exchangeArray', array('data'), MethodGenerator::FLAG_PUBLIC, $bodyExchangeArray, $docBlockExchangeArray);

                $docBlockGetArrayCopy = DocBlockGenerator::fromArray(array(
                            'shortDescription' => 'Função para retornar os valores por meio de array dos objetos da classe',
                            'longDescription' => null,
                            'tags' => array(
                                new Tag\ReturnTag(array(
                                    'datatype' => 'mixed',
                                        )),
                            ),
                ));
                $class->addMethod('getArrayCopy', array(), MethodGenerator::FLAG_PUBLIC, 'return get_object_vars($this);', $docBlockGetArrayCopy);

                $classCode = "<?php" . PHP_EOL;

                $classCode .= $class->generate();

                /*
                  $idxConstraint = 0;
                  foreach ($this->oMetadata->getConstraints($tableName, $valueSchema) as $constraint) {

                  $typeConstraint = ($constraint->isPrimaryKey()) ? 'pk' : (($constraint->isForeignKey()) ? 'fk' : null);
                  if (!empty($typeConstraint)) {

                  $consName = $constraint->getName();
                  $contraintObj = $this->oMetadata->getConstraint($consName, $tableName, $valueSchema);

                  $constraintColumns = $contraintObj->getColumns();
                  if (count($constraintColumns) > 1) {
                  foreach ($constraintColumns as $valueConsColumns) {
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['type'] = $typeConstraint;
                  if ($typeConstraint === 'fk') {
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                  $this->aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                  }
                  }
                  } else {
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['type'] = $typeConstraint;
                  if ($typeConstraint === 'fk') {
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                  $this->aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                  }
                  }
                  }

                  $idxConstraint++;
                  }
                 * 
                 */
                file_put_contents($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Entities' . DS . $this->toCamelCase($tableName) . '.php', $classCode);
                chmod($this->ormFolder . $this->toCamelCase($valueSchema) . DS . 'Entities' . DS . $this->toCamelCase($tableName) . '.php', 0644);

                $this->generatorClassEntityTable($valueSchema, $tableName);
            }


            //gera arquivo por tabela
        }
        return $this;
    }
721997
public function getModelColumn()
    {
        if (empty($this->_modelColumn)) {
            if (!empty($this->through)) {
                if (empty($this->link)) {
                    $throughClass = $this->through;
                    $through = call_user_func([$throughClass, 'create']);

                    $name = '';
                    foreach ($through->getFields() as $fieldName => $params) {
                        if (isset($params['modelClass']) && $params['modelClass'] == $this->ownerClassName) {
                            $name = $fieldName;
                            break;
                        }
                    }

                    $this->_modelColumn = $name.'_id';
                } else {
                    list($fromId, $toId) = $this->link;
                    if (empty($this->link)) {
                        throw new Exception('throughLink is missing in configutaion');
                    }

                    $this->_modelColumn = $this->reversed ? $toId : $fromId;
                }
            } else {
                $cls = $this->ownerClassName;
                $end = $this->getModelPk();
                if ($cls == $this->modelClass) {
                    $end = $this->reversed ? 'to_id' : 'from_id';
                }
                $tmp = explode('\\', $cls);
                $column = AbstractModel::normalizeTableName(end($tmp));
                $this->_modelColumn = $column.'_'.$end;
            }
        }

        return $this->_modelColumn;
    }
435684
public function getColumnQuery() {
        // prepare column types
        $type_val = $this->getTypeVal();
        // build query
        $query = $this->db->quotekey($this->name).' '.$type_val.' '.
            $this->getNullable();
        // unify default for booleans
        if (preg_match('/bool/i', $type_val) && $this->default!==null)
            $this->default = (int) $this->default;
        // default value
        if ($this->default !== false) {
            $def_cmds = array(
                'sqlite2?|mysql|pgsql' => 'DEFAULT',
                'mssql|sybase|dblib|odbc|sqlsrv' => 'constraint DF_'.$this->table->name.'_'.$this->name.' DEFAULT',
                'ibm' => 'WITH DEFAULT',
            );
            $def_cmd = $this->findQuery($def_cmds).' '.$this->getDefault();
            $query .= ' '.$def_cmd;
        }
        if (!empty($this->after) && $this->table instanceof TableModifier) {
            // `after` feature only works for mysql
            if (preg_match('/mysql/', $this->db->driver())) {
                $after_cmd = 'AFTER '.$this->db->quotekey($this->after);
                $query .= ' '.$after_cmd;
            }
        }
        return $query;
    }
608889
protected function getInsertColumnList()
    {
        $columns = array();

        foreach ($this->class->reflFields as $name => $field) {
            if ($this->class->isVersioned && $this->class->versionField == $name) {
                continue;
            }

            if (isset($this->class->embeddedClasses[$name])) {
                continue;
            }

            if (isset($this->class->associationMappings[$name])) {
                $assoc = $this->class->associationMappings[$name];
                if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
                    foreach ($assoc['joinColumns'] as $joinColumn) {
                        $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
                    }
                }

                continue;
            }

            if ($this->class->generatorType != ClassMetadata::GENERATOR_TYPE_IDENTITY || $this->class->identifier[0] != $name) {
                $columns[]                = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform);
                $this->columnTypes[$name] = $this->class->fieldMappings[$name]['type'];
            }
        }

        return $columns;
    }
1208658
public function getColumns()
    {
        $rawColumns = substr($this->data, 64, 128);
        $columnsString = rtrim($rawColumns, "\0");
        return explode("\0", $columnsString);
    }
885938
public function getAreaLayoutColumnOffsetEditClass()
    {
        /*
         * @var ThemeGridLayout $this->arLayout
         */
        $gf = $this->arLayout->getThemeGridFrameworkObject();
        if (is_object($gf)) {
            $class = $gf->getPageThemeGridFrameworkColumnAdditionalClasses();
            if ($class) {
                $class .= ' ';
            }

            $class .= $gf->getPageThemeGridFrameworkColumnClassForSpan($this->arLayoutColumnOffset);

            return $class;
        }
    }
831541
public function generate_class()
    {

        /**
         * generates the spaces
         *
         * @param int $amount
         *
         * @return string
         */
        function gen_spaces($amount)
        {
            $spaces = '';
            for ($i = 0; $i < $amount; $i++) {
                $spaces .= ' ';
            }

            return $spaces;
        }

        if (empty($this->table_model)) {
            return false;
        }

        // general initiation of the object properties based on the
        $this->init();

        $this->generate_class_definition();
        if (strpos($this->class_name, '_') !== false) {
            $tmp = explode('_', $this->class_name);
            foreach ($tmp as $key => $part) {
                $tmp[$key] = ucfirst(strtolower($part));
            }
            $this->class_name = implode('_', $tmp);
        }

        $this->tpl_replacements['class_name'] = $this->class_name;
        $file                                 = new File();
        $file->open($this->tpl_path);

        $this->generated_code = $file->read();

        foreach ($this->tpl_replacements as $pattern => $value) {
            if (!is_string($value)) continue;

            $pattern              = '#' . strtoupper($pattern) . '#';
            $this->generated_code = str_replace($pattern, $value, $this->generated_code);
        }

        $this->generated_code = str_replace("\t", gen_spaces(self::SPACE_AMOUNT), $this->generated_code);

        return true;
    }
1067963
static function getColumnNames() {
		$class = get_called_class();
		if (!isset(self::$_columnNames[$class])) {
			self::$_columnNames[$class] = array_keys(static::$_columns);
		}

		return self::$_columnNames[$class];
	}
721925
protected function getClassName()
    {
        $name = implode('', array_map('ucwords', $this->getSortedSingularTableNames()));

        $name = preg_replace_callback('/(\_)([a-z]{1})/', function ($matches) {
            return studly_case($matches[0]);
        }, $name);

        return "Create{$name}PivotTable";
    }
68494
public function getColumnWidths()
    {
        $data = ArrayList::create();
        
        $widths = $this->getColumnWidthData();
        
        foreach ($widths->getViewports() as $viewport) {
            
            if ($value = $widths->getField($viewport)) {
                
                $gutter = (int) $this->Gutter;
                
                if ($this->ColumnUnitCSS == '%') {
                    $gutter = $gutter - ($gutter * ($value / 100));
                }
                
                $data->push(
                    ArrayData::create([
                        'Unit' => $this->ColumnUnitCSS,
                        'Width' => sprintf('%F%s', $value, $this->ColumnUnitCSS),
                        'Gutter' => $gutter,
                        'Breakpoint' => $widths->getBreakpoint($viewport)
                    ])
                );
                
            }
            
        }
        
        return $data;
    }
1197382
public function getPHPExcelColumns()
    {

        // @todo This will not work past 26 columns; fix!!!!
        $columns = array();
        $current = array(65);
        $chr = &$current[count($current) - 1];
        foreach ($this->getHeader() as $header_key) {
            $columns[$header_key] = chr($chr++);
        }

        return $columns;
    }
1345301
protected function createColumn($column)
	{
		$c=new CMssqlColumnSchema;
		$c->name=$column['COLUMN_NAME'];
		$c->rawName=$this->quoteColumnName($c->name);
		$c->allowNull=$column['IS_NULLABLE']=='YES';
		if ($column['NUMERIC_PRECISION_RADIX']!==null)
		{
			// We have a numeric datatype
			$c->size=$c->precision=$column['NUMERIC_PRECISION']!==null?(int)$column['NUMERIC_PRECISION']:null;
			$c->scale=$column['NUMERIC_SCALE']!==null?(int)$column['NUMERIC_SCALE']:null;
		}
		elseif ($column['DATA_TYPE']=='image' || $column['DATA_TYPE']=='text')
			$c->size=$c->precision=null;
		else
			$c->size=$c->precision=($column['CHARACTER_MAXIMUM_LENGTH']!== null)?(int)$column['CHARACTER_MAXIMUM_LENGTH']:null;
		$c->autoIncrement=$column['IsIdentity']==1;
		$c->comment=$column['Comment']===null ? '' : $column['Comment'];

		$c->init($column['DATA_TYPE'],$column['COLUMN_DEFAULT']);
		return $c;
	}