propertyValue() публичный Метод

consume a list of values for a property
public propertyValue ( &$value, $keyName = null )
Пример #1
0
 /**
  * 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;
     }
 }
Пример #2
0
 protected 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->errors[trim($name, '@')] = "Failed to parse this variable.";
         }
         $this->set($name, $value);
     }
 }