getVars() public method

public getVars ( )
示例#1
0
文件: Twig.php 项目: carew/carew
 private function setTwigGlobals(Document $document)
 {
     $twigGlobals = $this->twig->getGlobals();
     $globals = $twigGlobals['carew'];
     $globals->fromArray($document->getVars());
     $globals->relativeRoot = $document->getRootPath();
     $globals->currentPath = $document->getPath();
     $globals->document = $document;
     return $this;
 }