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


PHP Less_Parser::has_extends方法代码示例

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


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

示例1: compile

 function compile($env)
 {
     Less_Parser::$has_extends = true;
     $this->selector = $this->selector->compile($env);
     return $this;
     //return new Less_Tree_Extend( $this->selector->compile($env), $this->option, $this->index);
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:7,代码来源:Extend.php

示例2: getCss

 /**
  * Get the current css buffer
  *
  * @return string
  */
 public function getCss()
 {
     $precision = ini_get('precision');
     @ini_set('precision', 16);
     $locale = setlocale(LC_NUMERIC, 0);
     setlocale(LC_NUMERIC, "C");
     $root = new Less_Tree_Ruleset(array(), $this->rules);
     $root->root = true;
     $root->firstRoot = true;
     $this->PreVisitors($root);
     self::$has_extends = false;
     $evaldRoot = $root->compile($this->env);
     $this->PostVisitors($evaldRoot);
     if (Less_Parser::$options['sourceMap']) {
         $generator = new Less_SourceMap_Generator($evaldRoot, Less_Parser::$contentsMap, Less_Parser::$options);
         // will also save file
         // FIXME: should happen somewhere else?
         $css = $generator->generateCSS();
     } else {
         $css = $evaldRoot->toCSS();
     }
     if (Less_Parser::$options['compress']) {
         $css = preg_replace('/(^(\\s)+)|((\\s)+$)/', '', $css);
     }
     //reset php settings
     @ini_set('precision', $precision);
     setlocale(LC_NUMERIC, $locale);
     return $css;
 }
开发者ID:Ibrahim1,项目名称:aec,代码行数:34,代码来源:Parser.php

示例3: compile

 public function compile($env) {
   Less_Parser::$has_extends = true;
   $this->selector = $this->selector->compile($env);
   return $this;
 }
开发者ID:salatproduction,项目名称:Unona-Landing-Standalone,代码行数:5,代码来源:Less.php

示例4: getCss

 /**
  * Get the current css buffer
  *
  * @return string
  */
 public function getCss()
 {
     $precision = ini_get('precision');
     @ini_set('precision', 16);
     $locale = setlocale(LC_NUMERIC, 0);
     setlocale(LC_NUMERIC, "C");
     try {
         $root = new Less_Tree_Ruleset(array(), $this->rules);
         $root->root = true;
         $root->firstRoot = true;
         $this->PreVisitors($root);
         self::$has_extends = false;
         $evaldRoot = $root->compile($this->env);
         $this->PostVisitors($evaldRoot);
         if (Less_Parser::$options['sourceMap']) {
             $generator = new Less_SourceMap_Generator($evaldRoot, Less_Parser::$contentsMap, Less_Parser::$options);
             // will also save file
             // FIXME: should happen somewhere else?
             $css = $generator->generateCSS();
         } else {
             $css = $evaldRoot->toCSS();
         }
         if (Less_Parser::$options['compress']) {
             $css = preg_replace('/(^(\\s)+)|((\\s)+$)/', '', $css);
         }
     } catch (Exception $exc) {
         // Intentional fall-through so we can reset environment
     }
     //reset php settings
     @ini_set('precision', $precision);
     setlocale(LC_NUMERIC, $locale);
     // If you previously defined $this->mb_internal_encoding
     // is required to return the encoding as it was before
     if ($this->mb_internal_encoding != '') {
         @ini_set("mbstring.internal_encoding", $this->mb_internal_encoding);
         $this->mb_internal_encoding = '';
     }
     // Rethrow exception after we handled resetting the environment
     if (!empty($exc)) {
         throw $exc;
     }
     return $css;
 }
开发者ID:PhantomOfTheOpera,项目名称:coolroom_code,代码行数:48,代码来源:Parser.php


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