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;
    }
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;
    }
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 ; }
Store an SplObjectStorage as a set of records.

Note: Objects contained in the SplObjectStorage will have a matching
entry created, the objects must be persisted elsewhere!

@param \SplObjectStorage $splObjectStorage The SplObjectStorage to persist
@param string $parentIdentifier
@param array $previousObjectStorage the previously persisted state of the SplObjectStorage
@return array An array with "flat" values representing the SplObjectStorage
@throws PersistenceException
Store an SplObjectStorage as a set of records .