Neos\Flow\Persistence\Generic\Backend\AbstractBackend::processArray PHP Метод

processArray() защищенный Метод

Note: Objects contained in the array will have a matching entry created, the objects must be persisted elsewhere!
protected processArray ( array $array = null, string $parentIdentifier, array $previousArray = null ) : array
$array array The array to persist
$parentIdentifier string
$previousArray array the previously persisted state of the array
Результат array An array with "flat" values representing the array
    protected function processArray(array $array = null, $parentIdentifier, array $previousArray = null)
    {
        if ($previousArray !== null && is_array($previousArray['value'])) {
            $this->removeDeletedArrayEntries($array, $previousArray['value']);
        }
        if ($array === null) {
            return null;
        }
        $values = [];
        foreach ($array as $key => $value) {
            if ($value instanceof \DateTimeInterface) {
                $values[] = ['type' => 'DateTime', 'index' => $key, 'value' => $this->processDateTime($value)];
            } elseif ($value instanceof \SplObjectStorage) {
                throw new PersistenceException('SplObjectStorage instances in arrays are not supported - missing feature?!?', 1261048721);
            } elseif ($value instanceof \ArrayObject) {
                throw new PersistenceException('ArrayObject instances in arrays are not supported - missing feature?!?', 1283524345);
            } elseif (is_object($value)) {
                $values[] = ['type' => $this->getType($value), 'index' => $key, 'value' => $this->processObject($value, $parentIdentifier)];
            } elseif (is_array($value)) {
                $values[] = ['type' => 'array', 'index' => $key, 'value' => $this->processNestedArray($parentIdentifier, $value)];
            } else {
                $values[] = ['type' => $this->getType($value), 'index' => $key, 'value' => $value];
            }
        }
        return $values;
    }