protected function prepareData( $data )
    {
        if ( is_resource( $data ) )
        {
            throw new ezcCacheInvalidDataException( gettype( $data ), array( 'simple', 'array', 'object' ) );
        }
        return new ezcCacheStorageMemoryDataStruct( $data, $this->properties['location'] );
    }
protected function prepareData( $data )
    {
        if ( is_resource( $data ) )
        {
            throw new ezcCacheInvalidDataException( gettype( $data ), array( 'simple', 'array', 'object' ) );
        }
        return new ezcCacheStorageMemoryDataStruct( $data, $this->properties['location'] );
    }
protected function prepareData ( $ data ) { if ( is_resource ( $ data ) ) { throw new ezcCacheInvalidDataException ( gettype ( $ data ) , array ( 'simple' , 'array' , 'object' ) ) ; } return new ezcCacheStorageMemoryDataStruct ( $ data , $ this -> properties [ 'location' ] ) ; }
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
Wraps the data in an ezcCacheStorageMemoryDataStruct structure in order to store it .