當前位置: 首頁>>代碼示例>>PHP>>正文


PHP lessc_parser類代碼示例

本文整理匯總了PHP中lessc_parser的典型用法代碼示例。如果您正苦於以下問題:PHP lessc_parser類的具體用法?PHP lessc_parser怎麽用?PHP lessc_parser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了lessc_parser類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: injectVariables

 /**
  * Override default lessc method
  */
 public function injectVariables($args)
 {
     $this->pushEnv();
     $parser = new \lessc_parser($this, __METHOD__);
     foreach ($args as $name => $strValue) {
         if ($name[0] != '@') {
             $name = '@' . $name;
         }
         $parser->count = 0;
         $parser->buffer = (string) $strValue;
         if (!$parser->propertyValue($value)) {
             throw new \Exception("failed to parse passed in variable {$name}: {$strValue}");
         }
         $this->overrides[$name] = $value;
     }
 }
開發者ID:OneataBogdan,項目名稱:lead_coriolan,代碼行數:19,代碼來源:Less.php

示例2: __construct

 public function __construct($lessc, $sourceName = null)
 {
     $this->eatWhiteDefault = true;
     // reference to less needed for vPrefix, mPrefix, and parentSelector
     $this->lessc = $lessc;
     $this->sourceName = $sourceName;
     // name used for error messages
     $this->writeComments = false;
     if (!self::$operatorString) {
         self::$operatorString = '(' . implode('|', array_map(array('lessc', 'preg_quote'), array_keys(self::$precedence))) . ')';
         $commentSingle = lessc::preg_quote(self::$commentSingle);
         $commentMultiLeft = lessc::preg_quote(self::$commentMultiLeft);
         $commentMultiRight = lessc::preg_quote(self::$commentMultiRight);
         self::$commentMulti = $commentMultiLeft . '.*?' . $commentMultiRight;
         self::$whitePattern = '/' . $commentSingle . '[^\\n]*\\s*|(' . self::$commentMulti . ')\\s*|\\s+/Ais';
     }
 }
開發者ID:MATsxm,項目名稱:Meet-Gavern,代碼行數:17,代碼來源:lessparser.php

示例3: implode

 function __construct($lessc, $sourceName = null)
 {
     // reference to less needed for vPrefix, mPrefix, and parentSelector
     $this->lessc = $lessc;
     $this->sourceName = $sourceName;
     // name used for error messages
     if (!self::$operatorString) {
         self::$operatorString = '(' . implode('|', array_map(array('lessc', 'preg_quote'), array_keys(self::$precedence))) . ')';
     }
 }
開發者ID:blindest,項目名稱:Yii-CMS-2.0,代碼行數:10,代碼來源:lessc.php


注:本文中的lessc_parser類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。