Creates a Type from the data in $row.

@param array $row

@return Type
351468
protected function extractTypeFromRow(array $row)
    {
        $type = new Type();

        $type->id = (int)$row['ezcontentclass_id'];
        $type->status = (int)$row['ezcontentclass_version'];
        $type->name = $this->unserialize($row['ezcontentclass_serialized_name_list']);
        $type->description = $this->unserialize($row['ezcontentclass_serialized_description_list']);
        // Unset redundant data
        unset(
            $type->name['always-available'],
            $type->name[0],
            $type->description['always-available'],
            $type->description[0]
        );
        $type->identifier = $row['ezcontentclass_identifier'];
        $type->created = (int)$row['ezcontentclass_created'];
        $type->modified = (int)$row['ezcontentclass_modified'];
        $type->modifierId = (int)$row['ezcontentclass_modifier_id'];
        $type->creatorId = (int)$row['ezcontentclass_creator_id'];
        $type->remoteId = $row['ezcontentclass_remote_id'];
        $type->urlAliasSchema = $row['ezcontentclass_url_alias_name'];
        $type->nameSchema = $row['ezcontentclass_contentobject_name'];
        $type->isContainer = ($row['ezcontentclass_is_container'] == 1);
        $type->initialLanguageId = (int)$row['ezcontentclass_initial_language_id'];
        $type->defaultAlwaysAvailable = ($row['ezcontentclass_always_available'] == 1);
        $type->sortField = (int)$row['ezcontentclass_sort_field'];
        $type->sortOrder = (int)$row['ezcontentclass_sort_order'];
        $type->languageCodes = $this->maskGenerator->extractLanguageCodesFromMask((int)$row['ezcontentclass_language_mask']);

        $type->groupIds = array();
        $type->fieldDefinitions = array();

        return $type;
    }
1019909
public function add($row = []): CollectionInterface
    {
        //if it's an array
        if (is_array($row)) {
            //make it a model
            $row = $this->getModel($row);
        }

        //add it now
        $this->data[] = $row;

        return $this;
    }
1166387
private function mapDocument(array $row)
    {
        $message = Message::create(
            $row['subject'],
            $row['body'],
            $row['priority'],
            $row['type'],
            $row['channel'],
            $row['role'],
            $row['user'],
            \DateTime::createFromFormat('U', $row['createdAt'])
        );

        return $message;
    }
1020795
public function getCellPrototype($row = NULL)
    {
        $td = parent::getCellPrototype($row);

        if ($this->isEditable() && $row !== NULL) {
            if (!in_array('editable', $td->class)) {
                $td->class[] = 'editable';
            }

            $value = $this->editableValueCallback === NULL
                ? $this->getValue($row)
                : call_user_func_array($this->editableValueCallback, [$row, $this]);

            $td->setAttribute('data-grido-editable-value', $value);
        }

        return $td;
    }
250836
protected function buildColumnByCollection(array $row, Collection $columns, $type = 'printable')
    {
        $results = [];
        foreach ($columns->all() as $column) {
            if ($column[$type]) {
                $title = $column['title'];
                $data  = array_get($row, $column['data']);
                if ($type == 'exportable') {
                    $title    = $this->decodeContent($title);
                    $dataType = gettype($data);
                    $data     = $this->decodeContent($data);
                    settype($data, $dataType);
                }

                $results[$title] = $data;
            }
        }

        return $results;
    }
1187973
private static function createItemFromRow(array $row)
    {
        $type = intval($row['type']);
        $item = new AmazonReferenceId(
            $type,
            $row['local_id'],
            floatval($row['value']),
            ('' !== $row['pkg_shop_payment_transaction_id']) ? $row['pkg_shop_payment_transaction_id'] : null
        );
        if ('' !== $row['amazon_id']) {
            $item->setAmazonId($row['amazon_id']);
        }
        if (isset($row['capture_now']) && '1' === $row['capture_now']) {
            $item->setCaptureNow(true);
        } else {
            $item->setCaptureNow(false);
        }
        if (isset($row['request_mode']) && '' !== $row['request_mode']) {
            $item->setRequestMode(intval($row['request_mode']));
        }

        return $item;
    }
70693
public static function createFromArray(array $rows)
    {
        $logs = [];

        foreach ($rows as $row) {
            $logs[] = TaskLogEntity::createFromArray($row);
        }

        return new static($logs);
    }
223882
private function getNumberOfColumns(array $row)
    {
        $columns = count($row);
        foreach ($row as $column) {
            $columns += $column instanceof TableCell ? ($column->getColspan() - 1) : 0;
        }

        return $columns;
    }
85654
protected function checkRow(array $row) {
		foreach ($row as $column => $str) {
			$width = Colors::width( $str, $this->isAsciiPreColorized( $column ) );
			if (!isset($this->_width[$column]) || $width > $this->_width[$column]) {
				$this->_width[$column] = $width;
			}
		}

		return $row;
	}
874596
private function coerceDataTypesToDatabase(array &$row): void {
    foreach($row as $col => &$value) {
      if(array_key_exists($col, $this->types)) {
        switch($this->types[$col]) {
          case Timestamp::class:
            $value = date('c', $value);
          break;
        }
      }
    }
  }
159122
public function create(array $row = null)
    {
        $result = clone $this->tableGateway->getResultSetPrototype()->getArrayObjectPrototype();
        if (!$result instanceof RowGatewayInterface) {
            throw new \RuntimeException('ArrayObject Prototype is not instanceof RowGatewayInterface');
        }
        $row && $result->populate($row + $result->toArray(), isset($row[current($this->getPrimary())]));
        return $result;
    }
926722
protected function row(Row $row, array $cells)
	{
		$html = '<tr';
		$this->addAttributes($html, $row->getAttributes());
		$html .= '>' . implode('', $cells) . '</tr>';

		return $html;
	}
266877
protected function getDefaultStyleArrayForRow($row)
    {
        $style = $this->getDefaultStyleForFilledCells();

        if ($this->getOption(self::OPTION_ZEBRA)) {
            if (($row % 2) == 0) {
                $bgColor = $this->getOption(self::OPTION_ZEBRA_COLOR_EVEN);
            } else {
                $bgColor = $this->getOption(self::OPTION_ZEBRA_COLOR_ODD);
            }

            if ($bgColor) {
                $style['fill'] = [
                    'fillType' => Fill::FILL_SOLID,
                    'color' => ['argb' => $bgColor],
                ];
            }
        }

        return $style;
    }
623057
private static function createModel( $row )
    {
        $table_name = get_called_class();
        
        $model = new $table_name();
        
        $model->setExists( true );
        
        foreach ( $row as $key => $value )
        {
            if ( !is_int($key) )
            {
                $model->$key = $value;
                $model->_snapshot[$key] = $value;
            }
        }
        
        return $model;
    }
144569
function factory($row) {
		$mapper=clone($this);
		$mapper->reset();
		foreach ($row as $key=>$val) {
			if (array_key_exists($key,$this->fields))
				$var='fields';
			elseif (array_key_exists($key,$this->adhoc))
				$var='adhoc';
			else
				continue;
			$mapper->{$var}[$key]['value']=$val;
			$mapper->{$var}[$key]['initial']=$val;
			if ($var=='fields' && $mapper->{$var}[$key]['pkey'])
				$mapper->{$var}[$key]['previous']=$val;
		}
		$mapper->query=[clone($mapper)];
		if (isset($mapper->trigger['load']))
			\Base::instance()->call($mapper->trigger['load'],$mapper);
		return $mapper;
	}
258564
public function setRow(TableRow $row = null)
    {
        $this->row = $row;

        if (null !== $row && !in_array($this, $row->getCells())) {
            $row->addCell($this);
        }

        return $this;
    }
278683
protected function pdoResultToArray($row)
    {
        if (is_object($row)) {
            $row = (array)$row;
        }

        $data = [];

        foreach ($row as $key=>$value) {
            if (!is_numeric($key)) {
                $data[$key] = $value;
            }
        }

        return $data;
    }