You are here

public static function SassDirectiveNode::extractDirective in Sassy 7

Same name and namespace in other branches
  1. 7.3 phpsass/tree/SassDirectiveNode.php \SassDirectiveNode::extractDirective()

* Returns the directive *

Parameters

object token: * @return string the directive

1 call to SassDirectiveNode::extractDirective()
SassParser::parseDirective in phamlp/sass/SassParser.php
* Parses a directive *

File

phamlp/sass/tree/SassDirectiveNode.php, line 75

Class

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

Code

public static function extractDirective($token) {
  preg_match(self::MATCH, $token->source, $matches);
  return strtolower($matches[1]);
}