コード例 #1
0
ファイル: SandboxedModule.php プロジェクト: jasmun/Noco100
 protected function compileDisplayFooter(IfwPsn_Vendor_Twig_Compiler $compiler)
 {
     parent::compileDisplayFooter($compiler);
     $compiler->write("protected function checkSecurity()\n", "{\n")->indent()->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")->indent()->write(!$this->usedTags ? "array(),\n" : "array('" . implode('\', \'', $this->usedTags) . "'),\n")->write(!$this->usedFilters ? "array(),\n" : "array('" . implode('\', \'', $this->usedFilters) . "'),\n")->write(!$this->usedFunctions ? "array()\n" : "array('" . implode('\', \'', $this->usedFunctions) . "')\n")->outdent()->write(");\n")->outdent()->write("}\n\n");
 }
コード例 #2
0
ファイル: Parser.php プロジェクト: jasmun/Noco100
 public function embedTemplate(IfwPsn_Vendor_Twig_Node_Module $template)
 {
     $template->setIndex(mt_rand());
     $this->embeddedTemplates[] = $template;
 }