buildColumn  Build the column name

@param  $data

@return string
332577
protected static function buildColumn($data)
    {
        $counter = 0;
        $insertQuery = "";
        $arraySize = count($data);

        foreach ($data as $key => $value)
        {
            $counter++;
            $insertQuery .= self::sanitize($key);
            if($arraySize > $counter)
                $insertQuery .= ", ";
        }
        return $insertQuery;
    }
713231
protected function buildColumns() {
		$select = [];
		$params = [];
		if(!$this->columns)
			return ['*', []];
		else {
			foreach($this->columns as $alias=>$column) {
				if($column instanceof static) {
					$sql = $column->buildSQL();
					$params = array_merge($params, $column->getParameters());
					$select[] = '('.$sql.') AS '.$this->identifierQuotes($alias);
				}
				elseif($column instanceof Raw) {
					$sql = $column->getSQL();
					$params = array_merge($params, $column->getParameters());
					$select[] = $sql.' AS '.$this->identifierQuotes($alias);
				}
				elseif((string)$alias !== (string)$column)
					$select[] = $this->identifierQuotes($column).' AS '.$this->identifierQuotes($alias);
				else
					$select[] = $this->identifierQuotes($column);
			}
		}
		return [implode(', ', $select), $params];
	}
636941
public function getColumn() : ?string 
    {
        if ( ! $this->hasColumn()) {
            $this->setColumn($this->getDefaultColumn());
        }
        return $this->column;
    }
841863
function name_data($data){
		if ($data == "gr_id") return $this->config->id["name"];
		$parts=explode("c",$data);
		if ($parts[0]=="" && ((string)intval($parts[1]))==$parts[1])
			if (sizeof($this->config->text)>intval($parts[1]))
				return $this->config->text[intval($parts[1])]["name"];
		return $data;
	}
770515
public function ___build(): string
    {
        $tables = \implode(', ', $this->tables);
        $fields = \implode(', ', $this->fields);
        $where = $orderBy = $limit = '';

        if ($this->where != '') {
            $where = \sprintf(' WHERE %s', $this->where);
        }
        if (\count($this->orderBy) > 0) {
            $orderBy = \sprintf(' ORDER BY %s', \implode(', ', $this->orderBy));
        }
        if ($this->limit != 0) {
            $limit = \sprintf(' LIMIT %s', $this->limit);
        }

        return \sprintf('UPDATE %s SET %s%s%s%s', $tables, $fields, $where, $orderBy, $limit);
    }
132832
public function addColumn($data)
	{
		if ($data instanceof Column) {
			$col = $data;
			$col->setTable($this);
			if ($col->isInheritance()) {
				$this->inheritanceColumn = $col;
			}
			if (isset($this->columnsByName[$col->getName()])) {
				throw new EngineException('Duplicate column declared: ' . $col->getName());
			}
			$this->columnList[] = $col;
			$this->columnsByName[$col->getName()] = $col;
			$this->columnsByLowercaseName[strtolower($col->getName())] = $col;
			$this->columnsByPhpName[$col->getPhpName()] = $col;
			$col->setPosition(count($this->columnList));
			$this->needsTransactionInPostgres |= $col->requiresTransactionInPostgres();
			return $col;
		} else {
			$col = new Column();
			$col->setTable($this);
			$col->loadFromXML($data);
			return $this->addColumn($col); // call self w/ different param
		}
	}
1229039
public function getColumnName($fieldName)
    {
        return isset($this->columnNames[$fieldName]) ?
                $this->columnNames[$fieldName] : $fieldName;
    }
473090
protected function compileColumnName(string $column): string
	{
		if($this->hasJsonPath($column))
		{
			$segments = explode(static::JSON_PATH_SEPARATOR, $column);

			$column = $this->escapeColumn(array_shift($segments));

			return $this->buildJsonGet($column, $segments);
		}

		return $this->escapeColumn($column);
	}
16193
protected function columns($data = null)
    {
        if (is_null($data)) {
            $this->_columns = $this->extruct(
                Query::from('INFORMATION_SCHEMA.COLUMNS', false)
                ->select('COLUMN_NAME')
                ->where('TABLE_SCHEMA', '=', Config::get('database.database'))
                ->andwhere('TABLE_NAME', '=', $this->_prifixTable)
                ->get(Query::GET_ARRAY)
                );
            //
            return $this->_columns;
        } else {
            $this->_columns = $data['columns'];
        }
    }
518022
public function &buildColumnList()
    {

        $str = "";
        $ct = 0;

        // Build Select Column List
        foreach ($this->columns as $k => $col) {
            if ($col->in_select) {
                if ($ct > 0) {
                    $str .= ",";
                }

                $str .= " ";

                if ($col->table_name) {
                    $str .= $col->table_name . ".";
                }

                $str .= $col->column_name;

                if (($col->query_name)) {
                    $str .= " " . $col->query_name;
                }

                $ct++;
            }
        }
        //die;
        return $str;
    }
700501
public function create($data)
    {
        $classDescriptor = new ClassDescriptor();

        $classDescriptor->setFullyQualifiedStructuralElementName($data->getFqsen());
        $classDescriptor->setName($data->getName());
        $classDescriptor->setPackage(
            $this->extractPackageFromDocBlock($data->getDocBlock()) ?: $this->getBuilder()->getDefaultPackage()
        );
        $classDescriptor->setLine($data->getLocation()->getLineNumber());
        $classDescriptor->setParent($data->getParent());
        $classDescriptor->setAbstract($data->isAbstract());
        $classDescriptor->setFinal($data->isFinal());
        $classDescriptor->setNamespace(substr((string) $data->getFqsen(), 0, -strlen($data->getName()) - 1));

        foreach ($data->getInterfaces() as $interfaceClassName) {
            $classDescriptor->getInterfaces()->set((string) $interfaceClassName, $interfaceClassName);
        }

        $this->assembleDocBlock($data->getDocBlock(), $classDescriptor);

        $this->addConstants($data->getConstants(), $classDescriptor);
        $this->addProperties($data->getProperties(), $classDescriptor);
        $this->addMethods($data->getMethods(), $classDescriptor);
        $this->addUses($data->getUsedTraits(), $classDescriptor);

        return $classDescriptor;
    }
199819
private function build(array $data)
    {
        foreach ($this->layout as $key => $c) {
            if (!isset($data[$key]) || 0 === strlen($value = $data[$key])) {
                continue;
            }

            if (isset($c['prepend'])) $value = $c['prepend'] . $value;
            if (isset($c['append'])) $value .= $c['append'];

            $angle = isset($c['a']) ? $c['a'] : 0;
            $color = isset($c['c']) ? $c['c'] : 'black';
            $font = isset($c['f']) ? $c['f'] : 'swiss_normal';

            $this->text($value, $c['s'], $c['x'], $c['y'], $color, $font, $angle);
        }

        // Primary barcode
        $matrix = imagecreatefromstring($this->getBarcodeDatamatrix($data[Config::T8902]));
        imagecopy($this->image, $matrix, 57, 398, 0, 0, imagesx($matrix), imagesy($matrix));
        imagedestroy($matrix);

        // Mondial relay
        if (isset($data[Config::T200]) && $data[Config::T200] === 'SHD') {
            $this->text('Mondial Relay', 40, 475, 420);

            // Barcode
            $barcode = imagecreatefromstring($this->getBarcode128($data[Config::T8913]));
            imagecopy($this->image, $barcode, 425, 462, 0, 0, imagesx($barcode), imagesy($barcode));
            imagedestroy($barcode);

            $this->text('GLS' . $data[Config::T8913], 32, 500, 670);
        }

        // Secondary barcode
        $matrix = imagecreatefromstring($this->getBarcodeDatamatrix($data[Config::T8903]));
        imagecopy($this->image, $matrix, 895, 400, 0, 0, imagesx($matrix), imagesy($matrix));
        imagedestroy($matrix);

        // Pages
        if (isset($data[Config::T8904]) && isset($data[Config::T8905])) {
            $pages = $data[Config::T8904] . '/' . $data[Config::T8905];
            $this->text($pages, 20, 792, 780);
        }

        // Service label
        $service = null;
        if (isset($data[Config::T750])) {
            $service = $data[Config::T750];
        } elseif (isset($data[Config::T200]) && $data[Config::T200] === 'T13') {
            $service = '13.00SERVICE';
        }
        if ($service) {
            $this->text($service, 38, 30, 870);
        }

        // Téléphones
        if (isset($data[Config::T1230])) {
            $this->text($data[Config::T1230], 38, 30, 1175);
        } elseif (isset($data[Config::T871])) {
            $this->text($data[Config::T871], 38, 30, 1175);
        }

        // Ref. destinataire
        if (isset($data[Config::T859]) && !empty($value = $data[Config::T859])) {
            $this->text('Ref Dest : ' . $value, 22, 600, 1230);
        }

        // Pays / Code postal / Ville destinataire
        $this->text($data[Config::T100] . ' ' . $data[Config::T330] . ' ' . $data[Config::T864], 30, 30, 1518);

        // Expediteur
        $this->text('Expediteur', 28, 1110, 810, 'black', 'swiss_bold', 270);

        // Pays / Code postal / Ville expéditeur
        $value = $data[Config::T821] . ' ' . $data[Config::T822] . ' ' . $data[Config::T823];
        $this->text($value, 28, 925, 830, 'black', 'swiss_normal', 270);
    }
515392
public function col_country($data) {
        if (!empty($this->countries[$data->country])) {
            return $this->countries[$data->country];
        }
        return '';
    }
1148948
protected static function buildEntity($data)
    {
        $entities = static::getDefinedEntitiesArray();

        if (isset($data['entity']))
        {
            if (in_array($data['entity'], $entities))
            {
                $class = static::getEntityClass($data['entity']);
                $entity = new $class;
            }
            else
            {
                $entity = new static;
            }
        }
        else
        {
            $entity = new static;
        }

        $entity->fill($data);

        return $entity;
    }
1320353
public function unserialize($data)
    {
        $data = unserialize($data);
        $args = self::parseArray($data);
        $this->__construct($args['name']);

        foreach ($args as $property => $value)
        {
            if (!empty($value))
                $this->set($property, $value);
        }
            
        return $col;
    }
1008998
public function setColumns(array $data)
    {
        unset($this->query['columns']);
        foreach ($data as $field => $value) {
            $this->addColumn($field, $value);
        }
        return $this;
    }
227171
public static function sumColumns(array $data)
    {
        $columns = self::arrayColumns($data);

        if ($columns !== false){
            return self::columnSum($data, $columns);
        } else {
            return false;
        }
    }