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

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

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