Get the type from the row in case it was not set

@param array $row Loaded row
@return string Data type for the row
9081
protected function getFieldType(array &$row)
    {
        if (isset($row[$this->_modelField]) && ($row[$this->_modelField] === self::APPOINTMENTS_NAME)) {
            return 'appointment';
        }

        if (isset($row['gtf_id_field']) && $row['gtf_id_field']) {
            $row[\Gems_Model::FIELD_ID] = $row['gtf_id_field'];
        }

        if (isset($row[\Gems_Model::FIELD_ID])) {
            return $this->db->fetchOne(
                    "SELECT gtf_field_type FROM gems__track_fields WHERE gtf_id_field = ?",
                    $row[\Gems_Model::FIELD_ID]
                    );
        }

        if (! $this->has('gtf_field_type', 'default')) {
            $this->set('gtf_field_type', 'default', 'text');
        }
        return $this->get('gtf_field_type', 'default');
    }
274685
public function getHighestColumn($row = null)
    {
        if ($row == null) {
            $colRow = $this->getHighestRowAndColumn();
            return $colRow['column'];
        }

        $columnList = array(1);
        foreach ($this->getCellList() as $coord) {
            sscanf($coord, '%[A-Z]%d', $c, $r);
            if ($r != $row) {
                continue;
            }
            $columnList[] = PHPExcel_Cell::columnIndexFromString($c);
        }
        return PHPExcel_Cell::stringFromColumnIndex(max($columnList) - 1);
    }
741545
public function marshal($row)
    {
        foreach ($this->_props as $key=>$prop) {
            if (isset($row[$key])) {
                $row[$key] = $prop->type->marshal($row[$key]);
            }
        }

        return $row;
    }
1334819
public function renderDataCell($row)
	{
		if ($this->grid->json) {
            $data = $this->grid->dataProvider->data[$row];
            $options = $this->htmlOptions;
            if ($this->cssClassExpression !== null) {
                $class = $this->evaluateExpression($this->cssClassExpression, array('row' => $row, 'data' => $data));
                if (!empty($class)) {
                    if (isset($options['class'])) {
                        $options['class'] .= ' ' . $class;
                    } else {
                        $options['class'] = $class;
                    }
                }
            }

            return array(
                'attrs' => CHtml::renderAttributes($options),
                'content' => $this->renderDataCellContent($row, $data),
            );
		}

		parent::renderDataCell($row);
	}
166580
public function getCell($row, $col) {
		if ($row < 2 && $this->hasOnlyCols($this->count()))
			return $this->getItem($col);
		$row=$this->getItem($row);
		if (isset($row)) {
			$col=$row->getItem($col);
		}
		return $col;
	}
1084603
public function getDataCellContent($row)
	{
		$data=$this->grid->dataProvider->data[$row];
		$tr=array();
		ob_start();
		foreach($this->buttons as $id=>$button)
		{
			$this->renderButton($id,$button,$row,$data);
			$tr['{'.$id.'}']=ob_get_contents();
			ob_clean();
		}
		ob_end_clean();
		return strtr($this->template,$tr);
	}
645240
public function extractUrlWildcardFromRow(array $row)
    {
        $urlWildcard = new UrlWildcard();

        $urlWildcard->id = (int)$row['id'];
        $urlWildcard->destinationUrl = $this->cleanUrl($row['destination_url']);
        $urlWildcard->sourceUrl = $this->cleanUrl($row['source_url']);
        $urlWildcard->forward = (int)$row['type'] === 1;

        return $urlWildcard;
    }
1000291
public function getRow(int $row) : BufferedSQLResultRow {
		if (\array_key_exists($row, $this->rows)) {
			return $this->rows[$row];
		} else {
			throw new \OutOfBoundsException('Row ' . $row . ' does not exist in SQL result');
		}
	}
77691
private function getObjectResult(array $columns, array $row)
    {
        $obj = new \stdClass();
        foreach ($columns as $key => $column) {
            $obj->{$column} = $row[$key];
        }

        return $obj;
    }
1208397
protected function guessHeader(array $row)
    {
        $containsOnlyColumnNames = $this->containsOnlyColumnNames($row);
        $columnsAreUnique = $this->columnsAreUnique($row);

        if ($containsOnlyColumnNames && $columnsAreUnique) {
            return $row;
        }

        if (!$this->getOption(self::FORCE_HEADER_LINE)) {
            return range(0, count($row)-1);
        }

        if (!$containsOnlyColumnNames) {
            $hint = implode(', ', $this->collectInvalidColumns($row));
            throw new DetectionFailedException("No header found because the following columns do not like a column name: [$hint]");
        }

        // !$columnsAreUnique)
        $hint = implode(', ', $this->collectDoubledColumns($row));
        throw new DetectionFailedException("No header found because the following columns occurs more than once: [$hint]");

    }
1099339
private function getAgentFromRow(array $row)
    {
        if (isset($row['headers']['User-Agent'])) {
            return $row['headers']['User-Agent'];
        }

        if (class_exists('\http\Header')) {
            // pecl_http versions 2.x/3.x
            $headers = \http\Header::parse($row['headers']);
        } elseif (function_exists('\http_parse_headers')) {
            // pecl_http version 1.x
            $headers = \http_parse_headers($row['headers']);
        } else {
            return '';
        }

        if (isset($headers['User-Agent'])) {
            return $headers['User-Agent'];
        }

        return '';
    }
108686
public function getPastRowFromCurrent(Row $row)
    {
        $pastData = $this->getPastDataTable();
        if (empty($pastData)) {
            return null;
        }

        $label = $row->getColumn('label');
        return $label ? $pastData->getRowFromLabel($label) : $pastData->getFirstRow();
    }
1043081
protected function calculateRowHeight($row)
    {
        $rowsPerCell = array_map(function ($size, $columnWidth) {
            if (is_array($columnWidth)) {
                $rows = 0;
                foreach ($columnWidth as $width) {
                    $rows += ceil($width / ($size - 2));
                }

                return $rows;
            }

            return ceil($columnWidth / ($size - 2));
        }, $this->_columnWidths, array_map(function ($val) {
            if (is_array($val)) {
                $encodings = array_fill(0, count($val), $this->app->encoding);
                return array_map('mb_strwidth', $val, $encodings);
            }

            return mb_strwidth($val, $this->app->encoding);
        }, $row)
        );

        return max($rowsPerCell);
    }
780538
protected function inferRow($row)
    {
        $rowFields = [];
        foreach ($row as $k => $v) {
            $rowFields[$k] = FieldsFactory::infer($v, (object) ['name' => $k], $this->lenient);
        }

        return $rowFields;
    }
495070
public function getValue(array $row, array $rows = [])
    {
        if (isset($row[$this->getName()])) {
            $rawValue = $row[$this->getName()];
        } else {
            $rawValue = null;
        }
        // if a callback is set
        $callback = $this->getDisplayCallback();
        if (!is_null($callback)) {
            if (!is_callable($callback)) {
                throw new \Exception('displayCallback is not callable');
            }

            return $callback($rawValue, $row, $rows);
        } else {
            switch ($this->getDisplayFormat()) {
                case static::FORMAT_DATE:
                    $formatParams = $this->getDisplayFormatParams();
                    if (is_null($formatParams)) {
                        $formatParams = 'Y-m-d H:i:s';
                    }
                    if (!is_null($rawValue) && is_object($rawValue) && get_class($rawValue) == 'DateTime') {
                        return $rawValue->format($formatParams);
                    } else {
                        return '';
                    }
                    break;
                case static::FORMAT_TEXT:
                default:
                    if (is_array($rawValue)) {
                        return implode(',', $rawValue);
                    } else {
                        return $rawValue;
                    }
                    break;
            }
        }
    }
986574
protected function parseRow($row)
    {
        list($k, $v) = explode(':', $row, 2);

        if (preg_match('/^db\d+$/', $k)) {
            $v = $this->parseDatabaseStats($v);
        }

        return array($k, $v);
    }
318068
protected function getCheckedState($row, $data)
	{
		return ($this->value === null)
			? CHtml::value($data, $this->name)
			: $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
	}