当前位置: 首页>>代码示例>>PHP>>正文


PHP Dwoo_Compiler::compilerFactory方法代码示例

本文整理汇总了PHP中Dwoo_Compiler::compilerFactory方法的典型用法代码示例。如果您正苦于以下问题:PHP Dwoo_Compiler::compilerFactory方法的具体用法?PHP Dwoo_Compiler::compilerFactory怎么用?PHP Dwoo_Compiler::compilerFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dwoo_Compiler的用法示例。


在下文中一共展示了Dwoo_Compiler::compilerFactory方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: compilerFactory

 public static function compilerFactory()
 {
     if (!isset(static::$_instance_compiler)) {
         static::$_instance_compiler = \Dwoo_Compiler::compilerFactory();
     }
     return static::$_instance_compiler;
 }
开发者ID:nbey,项目名称:Emergence-Skeleton,代码行数:7,代码来源:Engine.php

示例2: getCompiler

 /**
  * Return the Dwoo compiler object
  *
  * @return Dwoo_Data
  */
 public function getCompiler()
 {
     if (null === $this->_compiler) {
         $this->_compiler = Dwoo_Compiler::compilerFactory();
     }
     return $this->_compiler;
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:12,代码来源:View.php

示例3: compilerFactory

 /**
  * provides a custom compiler to the dwoo renderer with optional settings
  * you can set in the agavi output_types.xml config file
  *
  * @return Dwoo_Compiler
  */
 public function compilerFactory()
 {
     if (class_exists('Dwoo_Compiler', false) === false) {
         include DWOO_DIRECTORY . 'Dwoo/Compiler.php';
     }
     $compiler = Dwoo_Compiler::compilerFactory();
     $compiler->setAutoEscape((bool) $this->getParameter('auto_escape', false));
     return $compiler;
 }
开发者ID:fjpqzm,项目名称:ganglia-web,代码行数:15,代码来源:DwooRenderer.php

示例4: getCompiledTemplate

 /**
  * returns the compiled template file name
  *
  * @param Dwoo $dwoo the dwoo instance that requests it
  * @param Dwoo_ICompiler $compiler the compiler that must be used
  * @return string
  */
 public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null)
 {
     $compiledFile = $this->getCompiledFilename($dwoo);
     if ($this->compilationEnforced !== true && isset(self::$cache['compiled'][$this->compileId]) === true) {
         // already checked, return compiled file
     } elseif ($this->compilationEnforced !== true && $this->isValidCompiledFile($compiledFile)) {
         // template is compiled
         self::$cache['compiled'][$this->compileId] = true;
     } else {
         // compiles the template
         $this->compilationEnforced = false;
         if ($compiler === null) {
             $compiler = $dwoo->getDefaultCompilerFactory($this->getResourceName());
             if ($compiler === null || $compiler === array('Dwoo_Compiler', 'compilerFactory')) {
                 if (class_exists('Dwoo_Compiler', false) === false) {
                     include DWOO_DIRECTORY . 'Dwoo/Compiler.php';
                 }
                 $compiler = Dwoo_Compiler::compilerFactory();
             } else {
                 $compiler = call_user_func($compiler);
             }
         }
         $this->compiler = $compiler;
         $compiler->setCustomPlugins($dwoo->getCustomPlugins());
         $compiler->setSecurityPolicy($dwoo->getSecurityPolicy());
         $this->makeDirectory(dirname($compiledFile));
         file_put_contents($compiledFile, $compiler->compile($dwoo, $this));
         if ($this->chmod !== null) {
             chmod($compiledFile, $this->chmod);
         }
         self::$cache['compiled'][$this->compileId] = true;
     }
     return $compiledFile;
 }
开发者ID:apeschar,项目名称:php-fw,代码行数:41,代码来源:String.php

示例5: getCompiledTemplate

 /**
  * returns the compiled template file name
  *
  * @param Dwoo_Core $dwoo the dwoo instance that requests it
  * @param Dwoo_ICompiler $compiler the compiler that must be used
  * @return string
  */
 public function getCompiledTemplate(Dwoo_Core $dwoo, Dwoo_ICompiler $compiler = null)
 {
     $compiledFile = $this->getCompiledFilename($dwoo);
     if ($this->compilationEnforced !== true && isset(self::$cache['compiled'][$this->compileId]) === true) {
         // already checked, return compiled file
     } elseif ($this->compilationEnforced !== true && $this->isValidCompiledFile($compiledFile)) {
         // template is compiled
         self::$cache['compiled'][$this->compileId] = true;
     } else {
         // compiles the template
         $this->compilationEnforced = false;
         if ($compiler === null) {
             $compiler = $dwoo->getDefaultCompilerFactory($this->getResourceName());
             if ($compiler === null || $compiler === array('Dwoo_Compiler', 'compilerFactory')) {
                 $compiler = Dwoo_Compiler::compilerFactory();
             } else {
                 $compiler = call_user_func($compiler);
             }
         }
         $this->compiler = $compiler;
         $compiler->setCustomPlugins($dwoo->getCustomPlugins());
         $compiler->setSecurityPolicy($dwoo->getSecurityPolicy());
         $this->makeDirectory(dirname($compiledFile), $dwoo->getCompileDir());
         file_put_contents($compiledFile, $compiler->compile($dwoo, $this));
         if ($this->chmod !== null) {
             chmod($compiledFile, $this->chmod);
         }
         if (extension_loaded('Zend OPcache')) {
             opcache_invalidate($compiledFile);
         } elseif (extension_loaded('apc')) {
             apc_compile_file($compiledFile);
         }
         self::$cache['compiled'][$this->compileId] = true;
     }
     return $compiledFile;
 }
开发者ID:nbey,项目名称:Emergence-Skeleton,代码行数:43,代码来源:String.php

示例6: compilerFactory

 /**
  * returns a compiler object when one is required
  * 
  * @return Dwoo_Compiler
  */
 public function compilerFactory()
 {
     $compiler = Dwoo_Compiler::compilerFactory();
     $compiler->setDelimiters($this->left_delimiter, $this->right_delimiter);
     $compiler->setAutoEscape(true);
     return $compiler;
 }
开发者ID:richardmansfield,项目名称:richardms-mahara,代码行数:12,代码来源:Dwoo_Mahara.php


注:本文中的Dwoo_Compiler::compilerFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。