Object/provider/FileSystemCache.php
public function get($id)
    {
        if ($this->accessible($id)) {
            $collection = new CacheCollection();
            $collection->setTimestampOffset($this->timestamp);
            $collection->unserialize(file_get_contents($this->getPath($id)));
            
            if ($collection->getId() !== $id) {
                throw new MappingException(sprintf("The file %s does not containt the right cache element", $this->getPath($id)), 500);
            } else {
                return $collection;
            }
        } else {
            if (! $this->exist($id)) {
                return null;
            } else {
                
                $read = $this->readable($id);
                $write = $this->writable($id);
                
                if ($read && ! $write) {
                    throw new AccessDeniedException(sprintf("The file %s is on read only state", $this->getPath($id)), 403);
                } else if (! $read && ! $write) {
                    throw new AccessDeniedException(sprintf("The file %s cannot be read or write", $this->getPath($id)), 403);
                } else {
                    throw new AccessDeniedException(sprintf("The file %s cannot be read", $this->getPath($id)), 403);
                }
            }
        }
    }
public function get($id)
    {
        if ($this->accessible($id)) {
            $collection = new CacheCollection();
            $collection->setTimestampOffset($this->timestamp);
            $collection->unserialize(file_get_contents($this->getPath($id)));
            
            if ($collection->getId() !== $id) {
                throw new MappingException(sprintf("The file %s does not containt the right cache element", $this->getPath($id)), 500);
            } else {
                return $collection;
            }
        } else {
            if (! $this->exist($id)) {
                return null;
            } else {
                
                $read = $this->readable($id);
                $write = $this->writable($id);
                
                if ($read && ! $write) {
                    throw new AccessDeniedException(sprintf("The file %s is on read only state", $this->getPath($id)), 403);
                } else if (! $read && ! $write) {
                    throw new AccessDeniedException(sprintf("The file %s cannot be read or write", $this->getPath($id)), 403);
                } else {
                    throw new AccessDeniedException(sprintf("The file %s cannot be read", $this->getPath($id)), 403);
                }
            }
        }
    }
Get

Return a cache
element

@param string $id - the cache element name

@return CacheCollection - the CacheCollection element

@see \Cscfa\Bundle\CacheSystemBundle\Object\provider\CacheProviderInterface::get()