You are here

protected function SassDirectiveNode::getDirective in Sassy 7.3

Same name and namespace in other branches
  1. 7 phamlp/sass/tree/SassDirectiveNode.php \SassDirectiveNode::getDirective()

File

phpsass/tree/SassDirectiveNode.php, line 31

Class

SassDirectiveNode
SassDirectiveNode class. Represents a CSS directive. @package PHamlP @subpackage Sass.tree

Code

protected function getDirective() {
  return $this->token->source;
  preg_match('/^(@[\\w-]+)(?:\\s*(\\w+))*/', $this->token->source, $matches);
  array_shift($matches);
  $parts = implode(' ', $matches);
  return strtolower($parts);
}