Extract Bookmark object from $row.

@param array $row
@return \eZ\Publish\SPI\Persistence\Bookmark\Bookmark
2437
private function extractBookmarkFromRow(array $row): Bookmark
    {
        $bookmark = new Bookmark();
        $bookmark->id = (int)$row['id'];
        $bookmark->name = $row['name'];
        $bookmark->userId = (int)$row['user_id'];
        $bookmark->locationId = (int)$row['node_id'];

        return $bookmark;
    }
321521
private function extractNotificationFromRow(array $row): Notification
    {
        $notification = new Notification();
        $notification->id = (int)$row['id'];
        $notification->ownerId = (int)$row['owner_id'];
        $notification->type = $row['type'];
        $notification->created = (int)$row['created'];
        $notification->isPending = (bool) $row['is_pending'];
        if ($row['data'] !== null) {
            $notification->data = json_decode($row['data'], true);
            if (json_last_error() !== JSON_ERROR_NONE) {
                throw new RuntimeException('Error while decoding notification data: ' . json_last_error_msg());
            }
        }

        return $notification;
    }
877403
public function render(Row $row)
	{
		/**
		 * Renderer function may be used
		 */
		try {
			return $this->useRenderer($row);
		} catch (DataGridColumnRendererException $e) {
			/**
			 * Do not use renderer
			 */
		}

		/**
		 * Or replacements may be applied
		 */
		list($do_replace, $replaced) = $this->applyReplacements($row);

		if ($do_replace) {
			return $replaced;
		}

		return $this->getColumnValue($row);
	}
1036956
private function getJobFromRow(array $row)
    {
        $type = $row['type'];

        /** @var Job $job */
        $job = new $type($this->jsonDecode($row['data']));
        $job->setChannel($row['channel']);
        $job->setBatchId($row['batch_id']);
        $job->setQueue($this, (integer) $row['id']);

        return $job;
    }
563138
public function map($row){
        $class = $this->modelClass;
        $model = new $class($this->db, $row, false);
        $model->setAttribute('table', $this->table)->setAttribute('pk', $this->pk);
        return $model;
    }
84699
public function getTrueRow($row)
    {
        if ($row) {
            array_walk(
                $row,
                function (&$item, $key) {
                    if ('' === $item) {
                        $item = null;
                    }

                    if ($item === '""') {
                        $item = '';
                    }

                    $isZeroFirstString = strlen($item) > 1 && substr($item, 0, 1) == "0";

                    if (is_numeric($item) && !$isZeroFirstString) {
                        if (intval($item) == $item) {
                            $item = intval($item);
                        } else {
                            $item = floatval($item);
                        }
                    }
                }
            );

            return array_combine($this->columns, $row);
        }

        return null;
    }
1133955
public function loadFromRow($row)
    {
        // Loop over the columns, sanitise and store it into the new properties of this object.
        foreach ($row as $column => &$value) {
            // Only save columns beginning with a normal letter.
            if (preg_match('/^[a-z]/i', $column)) {
                $this->$column = & $value;
            }
        }
        $this->postConstruct();
        if (DatabaseLayer::getInstance()->useCache() && $this->_caching_enabled) {
            $cache = DatabaseLayer::getInstance()->getCache();
            $cache->save($this->getCacheIdentifier(), serialize($this));
        }
        return $this;
    }
901762
public function extractRelationsFromRows(array $rows)
    {
        $relations = array();

        foreach ($rows as $row) {
            $id = (int)$row['ezcontentobject_link_id'];
            if (!isset($relations[$id])) {
                $relations[$id] = $this->extractRelationFromRow($row);
            }
        }

        return $relations;
    }
1130131
public function createFromArray(array $row)
    {
        $entities = $this->unitOfWork->getEntityRegistry()->getEntityBuilder()->castToEntity([$row], $this->className);

        return array_shift($entities);
    }
83791
public function extractUrlWildcardsFromRows(array $rows)
    {
        $urlWildcards = array();

        foreach ($rows as $row) {
            $urlWildcards[] = $this->extractUrlWildcardFromRow($row);
        }

        return $urlWildcards;
    }
1011317
public function get(string $path, array $row): ?string
    {
        if (!$this->supports($row)) {
            return null;
        }

        $content = $row[$this->colName];
        $chunks  = explode('.', $path);
        if (!array_key_exists($chunks[0], $content)) {
            return null;
        }
        $content = $content[$chunks[0]];

        if (null === ($extractor = $this->extractors[$chunks[1]] ?? null)) {
            throw new \InvalidArgumentException('Sub extractor ' . $chunks[1] . ' not found');
        }

        switch (true) {
            case $extractor instanceof MultiStringExtractorInterface:
                return $extractor->get(implode('.', \array_slice($chunks, 2)), $content);
            case $extractor instanceof StringExtractorInterface:
                return $extractor->get($content);
            default:
        }

        throw new \InvalidArgumentException('Unknown extractor type ' . \get_class($extractor));
    }
572055
public static function formatRowByType(array $row, string $className): array
    {
        $rowAry   = [];
        $entities = EntityCollector::getCollector();
        if (!isset($entities[$className])) {
            return $row;
        }

        if (strpos($className, '\\') === false) {
            $className = $entities[$className];
        }
        foreach ($row as $name => $value) {
            $field = $entities[$className]['column'][$name];
            $type  = $entities[$className]['field'][$field]['type'];

            $rowAry[$name] = self::trasferTypes($type, $value);
        }

        return $rowAry;
    }
1227424
def extract_row(self,  row):
        
        new_row = []
        for col in range(self.get_grid_width()):
            new_row.append(self.get_tile(row, col))    
        return new_row
70063
public function process(array $row)
    {
        foreach ($row as &$item) {
            if ($item instanceof DateTimeInterface) {
                $item = $item->format($this->format);
            }
        }

        return $row;
    }
947320
private function resolveHasChildren(Row $row)
    {
        $queryBuilder = new QueryBuilder($this->qomFactory);

        $queryBuilder
            ->select('node', 'jcr:uuid', 'uuid')
            ->from($this->qomFactory->selector('node', 'nt:unstructured'))
            ->where($this->qomFactory->childNode('node', $row->getPath()))
            ->setMaxResults(1);

        $result = $queryBuilder->execute();

        return count(iterator_to_array($result->getRows())) > 0;
    }
82604
public function process(array $row)
    {
        foreach ($row as &$item) {
            if (is_bool($item)) {
                $item = $item ? 1 : 0;
            }
        }

        return $row;
    }
956772
private function extractUserPreferenceFromRow(array $row): UserPreference
    {
        $userPreference = new UserPreference();
        $userPreference->id = (int)$row['id'];
        $userPreference->userId = (int)$row['user_id'];
        $userPreference->name = $row['name'];
        $userPreference->value = $row['value'];

        return $userPreference;
    }