protected function SassPropertyNode::getNamespace in Sassy 7
Same name and namespace in other branches
- 7.3 phpsass/tree/SassPropertyNode.php \SassPropertyNode::getNamespace()
* Returns the namespace for this node *
Return value
string the namespace for this node
File
- phamlp/
sass/ tree/ SassPropertyNode.php, line 145
Class
- SassPropertyNode
- SassPropertyNode class. Represents a CSS property. @package PHamlP @subpackage Sass.tree
Code
protected function getNamespace() {
$namespace = array();
$parent = $this->parent;
do {
if ($parent instanceof SassPropertyNode) {
$namespace[] = $parent->name;
}
$parent = $parent->parent;
} while (is_object($parent));
return join('-', array_reverse($namespace));
}