Sulu\Bundle\PreviewBundle\Preview\Preview::fetch PHP Method

fetch() protected method

Fetch the object.
protected fetch ( string $token ) : mixed
$token string
return mixed
    protected function fetch($token)
    {
        if (!$this->exists($token)) {
            throw new TokenNotFoundException($token);
        }
        $cacheEntry = explode("\n", $this->dataCache->fetch($token), 2);
        return $this->getProvider($cacheEntry[0])->deserialize($cacheEntry[1], $cacheEntry[0]);
    }