protected function loadStorage($resource)
    {
        $template = $this->parser->parse($resource);

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->template_loader->load($template);
        if (!$storage instanceof MatterStorage) {
            throw new \RuntimeException(sprintf('The template "%s" does not have matter.', $template));
        }

        return $this->cache[$key] = $storage;
    }
protected function loadStorage($resource)
    {
        $template = $this->parser->parse($resource);

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->template_loader->load($template);
        if (!$storage instanceof MatterStorage) {
            throw new \RuntimeException(sprintf('The template "%s" does not have matter.', $template));
        }

        return $this->cache[$key] = $storage;
    }
protected function loadStorage ( $ resource ) { $ template = $ this -> parser -> parse ( $ resource ) ; $ key = $ template -> getLogicalName ( ) ; if ( isset ( $ this -> cache [ $ key ] ) ) { return $ this -> cache [ $ key ] ; } $ storage = $ this -> template_loader -> load ( $ template ) ; if ( ! $ storage instanceof MatterStorage ) { throw new \ RuntimeException ( sprintf ( 'The template "%s" does not have matter.' , $ template ) ) ; } return $ this -> cache [ $ key ] = $ storage ; }
Loads a resource from the template loader

@param string $resource the name of the resource to load

@throws \RuntimeException if the template loader does not return a MatterStorage
Loads a resource from the template loader