handleColumnPosition

@param string $position

@return  string
519908
protected static function handleColumnPosition($position)
    {
        $query = static::getQuery();

        if (!$position) {
            return null;
        }

        $posColumn = '';

        $position = trim($position);

        if (strpos(strtoupper($position), 'AFTER') !== false) {
            list($position, $posColumn) = explode(' ', $position, 2);

            $posColumn = $query->quoteName($posColumn);
        }

        return $position . ' ' . $posColumn;
    }
674771
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getPersonId();
                break;
            case 2:
                return $this->getTeamId();
                break;
            case 3:
                return $this->getCreatedAt();
                break;
            case 4:
                return $this->getUpdatedAt();
                break;
            case 5:
                return $this->getVersion();
                break;
            case 6:
                return $this->getVersionCreatedAt();
                break;
            case 7:
                return $this->getVersionCreatedBy();
                break;
            case 8:
                return $this->getPersonIdVersion();
                break;
            case 9:
                return $this->getTeamIdVersion();
                break;
            default:
                return null;
                break;
        } // switch()
    }
1271359
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getCreatedAt();
                break;
            case 2:
                return $this->getUpdatedAt();
                break;
            case 3:
                return $this->getVersion();
                break;
            case 4:
                return $this->getVersionCreatedAt();
                break;
            case 5:
                return $this->getVersionCreatedBy();
                break;
            case 6:
                return $this->getPersonTeamLinkIds();
                break;
            case 7:
                return $this->getPersonTeamLinkVersions();
                break;
            default:
                return null;
                break;
        } // switch()
    }
68927
public function offsetGet($position)
    {
        if (!isset($this->errors[$position])) {
            throw new OutOfBoundsException('The offset '.$position.' does not exist.');
        }

        return $this->errors[$position];
    }
1329711
public function position($position, $style='none')
	{
		if (!is_array($style))
		{
			$style = array('style' => $style);
		}

		$contents = '';
		foreach ($this->byPosition($position) as $mod)
		{
			$contents .= $this->render($mod, $style);
		}

		return $contents;
	}
38030
public function getLastEol($position = self::CURRENT_POSITION)
    {
        if (self::CURRENT_POSITION === $position) {
            $position = $this->position;
        }

        return strrpos(substr($this->data, 0, $position), "\n", 0);
    }
967176
protected function getPosition($id)
    {
        $cols = [
            self::COLUMN_LEFT,
            self::COLUMN_RIGHT,
            'width' => new Expression(self::COLUMN_RIGHT . ' - ' . self::COLUMN_LEFT . ' + 1'),
        ];

        $select = $this->getSelect();

        $where = new Where;
        $where->equalTo($this->getPrimaryKey(), $id);
        $select->columns($cols)->where($where);

        $row = $this->fetchResult($select)->current();

        return $row;
    }
595214
public function getTabByPosition($position)
    {
        if (is_numeric($position) && $position < count($this->tabs)) {
            return $this->tabs[$position];
        }

        return null;
    }
1057765
public function position($position = null)
    {
        return is_null($position) ? $this->position : $this->position = $position;
    }
420618
public function position(string $position): Log
    {
        $acceptablePositions = [
            'top right',
            'top left',
            'bottom right',
            'bottom left'
        ];

        if (array_search(strtolower($position), $acceptablePositions) === false) {
            $acceptablePositions = implode(', ', $acceptablePositions);
            throw new \Exception("position can only be: ${acceptablePositions}");
        }

        $this->position = $position;
        Alertify::flash();
        return $this;
    }
697882
private function validatePosition(array $position)
    {
        if (empty($position)
            || count($position) != 2
            || count($position) != count(array_filter($position, 'is_numeric'))
        ) {
            return false;
        }

        return true;
    }
1214578
public function rowFirstCellIndex($position = null)
    {
        if ($position === null) {
            $position = $this->position();
        }

        $structure = $this->structure();
        if (empty($structure)) {
            return null;
        }
        $firstList = [];
        $i = 0;
        $p = 0;
        foreach ($structure as $row) {
            $firstList[$i] = $p;
            if ($p > $position) {
                // Previous p
                return $firstList[($i-1)];
            }

            $numCells = isset($row['columns']) ? count($row['columns']) : 0;

            $p += $numCells;

            $i++;
        }
        return $firstList[($i-1)];
    }
580931
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getId();
                break;
            case 1:
                return $this->getFeatureId();
                break;
            case 2:
                return $this->getFeatureTypeId();
                break;
            default:
                return null;
                break;
        } // switch()
    }
297277
public function rowNumColumns($position = null)
    {
        if ($position === null) {
            $position = $this->position();
        }

        $row = $this->rowData($position);
        if ($row === null) {
            return null;
        } else {
            return array_sum($row['columns']);
        }
    }
399324
public function getByPosition($pos)
    {
        switch ($pos) {
            case 0:
                return $this->getCode();
                break;
            case 1:
                return $this->getAtosCode();
                break;
            case 2:
                return $this->getDecimals();
                break;
            default:
                return null;
                break;
        } // switch()
    }
484291
public function eol($position = self::CURRENT_POSITION)
    {
        return (("\r" === $this->getChar($position)) || ("\n" === $this->getChar($position)));
    }
1262270
public function rowData($position = null)
    {
        if ($position === null) {
            $position = $this->position();
        }

        $rowIndex = $this->rowIndex($position);
        if (isset($this->structure[$rowIndex])) {
            return $this->structure[$rowIndex];
        } else {
            return null;
        }
    }