public function getRepository($class, $id, $key, $vars = [])
    {
        $classKey = str_replace('\\', '', $class);
        $cacheKey = "repositories.{$classKey}.{$id}.{$key}";

        if ($object = $this->cache->get($cacheKey)) {
            return $object;
        }

        $repository = new $class(
            $this->http,
            $this->cache,
            $this->factory,
            $vars
        );

        $this->cache->set($cacheKey, $repository);

        return $repository;
    }
public function getRepository($class, $id, $key, $vars = [])
    {
        $classKey = str_replace('\\', '', $class);
        $cacheKey = "repositories.{$classKey}.{$id}.{$key}";

        if ($object = $this->cache->get($cacheKey)) {
            return $object;
        }

        $repository = new $class(
            $this->http,
            $this->cache,
            $this->factory,
            $vars
        );

        $this->cache->set($cacheKey, $repository);

        return $repository;
    }
public function getRepository ( $ class , $ id , $ key , $ vars = [ ] ) { $ classKey = str_replace ( '\\' , '' , $ class ) ; $ cacheKey = "repositories.{$classKey}.{$id}.{$key}" ; if ( $ object = $ this -> cache -> get ( $ cacheKey ) ) { return $ object ; } $ repository = new $ class ( $ this -> http , $ this -> cache , $ this -> factory , $ vars ) ; $ this -> cache -> set ( $ cacheKey , $ repository ) ; return $ repository ; }
Attempts to get a repository from the cache.

@param string $class The repository to look for.
@param string $id    The snowflake to look for.
@param string $key   The key to look for.
@param array  $vars  An array of args to pass to the repository.

@return AbstractRepository
Attempts to get a repository from the cache .