public function SassPropertyNode::__construct in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassPropertyNode.php \SassPropertyNode::__construct()
* SassPropertyNode constructor. *
Parameters
object source token: * @param string property syntax * @return SassPropertyNode
Overrides SassNode::__construct
File
- phamlp/sass/ tree/ SassPropertyNode.php, line 77 
Class
- SassPropertyNode
- SassPropertyNode class. Represents a CSS property. @package PHamlP @subpackage Sass.tree
Code
public function __construct($token, $syntax = 'new') {
  parent::__construct($token);
  $matches = self::match($token, $syntax);
  $this->name = $matches[self::NAME];
  $this->value = $matches[self::VALUE];
  if ($matches[self::SCRIPT] === self::IS_SCRIPT) {
    $this
      ->addWarning('Setting CSS properties with "=" is deprecated; use "{name}: {value};"', array(
      '{name}' => $this->name,
      '{value}' => $this->value,
    ));
  }
}