src/Storage/Storage.php
public function process(StorableInterface $object)
    {
        if (is_array($this->backends) && count($this->backends) > 0) {
            $results = [];

            $identifiers = $object->getStorableBackendIdentifiers();

            foreach ($this->backends as $identifier => $backend) {
                if (in_array($identifier, $identifiers)) {
                    $results[$identifier] = $backend->write($object);
                }
            }

            return $results;
        } else {
            throw new StorageProcessingException(
                sprintf(
                    "Tried to process an storable object '%s' with no backends",
                    $object->getStorableIdentifier()
                )
            );
        }
    }
public function process(StorableInterface $object)
    {
        if (is_array($this->backends) && count($this->backends) > 0) {
            $results = [];

            $identifiers = $object->getStorableBackendIdentifiers();

            foreach ($this->backends as $identifier => $backend) {
                if (in_array($identifier, $identifiers)) {
                    $results[$identifier] = $backend->write($object);
                }
            }

            return $results;
        } else {
            throw new StorageProcessingException(
                sprintf(
                    "Tried to process an storable object '%s' with no backends",
                    $object->getStorableIdentifier()
                )
            );
        }
    }
public function process ( StorableInterface $ object ) { if ( is_array ( $ this -> backends ) && count ( $ this -> backends ) > 0 ) { $ results = [ ] ; $ identifiers = $ object -> getStorableBackendIdentifiers ( ) ; foreach ( $ this -> backends as $ identifier => $ backend ) { if ( in_array ( $ identifier , $ identifiers ) ) { $ results [ $ identifier ] = $ backend -> write ( $ object ) ; } } return $ results ; } else { throw new StorageProcessingException ( sprintf ( "Tried to process an storable object '%s' with no backends" , $ object -> getStorableIdentifier ( ) ) ) ; } }
Runs through each storage backend and processes the Storable object
@param  StorableInterface $object
@return array
@throws \Exception
Runs through each storage backend and processes the Storable object