backend->fetch( $identifier ); if ( is_object( $data ) && $object === false ) { return $data->data; } if ( is_object( $data ) && $object !== false ) { return $data; } else { return false; } } /** * Wraps the data in an ezcCacheStorageMemoryDataStruct structure in order * to store it. * * @throws ezcCacheInvalidDataException * If the data submitted can not be handled by this storage (resource). * * @param mixed $data Simple type or array * @return ezcCacheStorageMemoryDataStruct Prepared data */ protected function prepareData( $data ) { if ( is_resource( $data ) ) { throw new ezcCacheInvalidDataException( gettype( $data ), array( 'simple', 'array', 'object' ) ); } return new ezcCacheStorageMemoryDataStruct( $data, $this->properties['location'] ); } } ?>