protected function SassDirectiveNode::getDirective in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassDirectiveNode.php \SassDirectiveNode::getDirective()
File
- phamlp/
sass/ tree/ SassDirectiveNode.php, line 31
Class
- SassDirectiveNode
- SassDirectiveNode class. Represents a CSS directive. @package PHamlP @subpackage Sass.tree
Code
protected function getDirective() {
preg_match('/^(@[\\w-]+)(?:\\s*(\\w+))*/', $this->token->source, $matches);
array_shift($matches);
$parts = implode(' ', $matches);
return strtolower($parts);
}