Twig_Environment::getCacheFilename PHP 메소드

getCacheFilename() 공개 메소드

Gets the cache filename for a given template.
public getCacheFilename ( string $name ) : string
$name string The template name
리턴 string The cache file name
    public function getCacheFilename($name)
    {
        if (false === $this->cache) {
            return false;
        }

        $class = substr($this->getTemplateClass($name), strlen($this->templateClassPrefix));

        return $this->getCache().'/'.substr($class, 0, 2).'/'.substr($class, 2, 2).'/'.substr($class, 4).'.php';
    }

Same methods

Twig_Environment::getCacheFilename ( $name )

Usage Example

예제 #1
0
 public function addTemplate($path)
 {
     $this->environment->loadTemplate($path);
     $this->templates[] = $this->environment->getCacheFilename($path);
 }
All Usage Examples Of Twig_Environment::getCacheFilename