PHP Класс SassRuleNode

Represents a CSS rule.
Наследование: extends SassNode
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( object $token ) : SassRuleNode SassRuleNode constructor.
addSelectors ( string $selectors, boolean $explode = true ) Adds selector(s) to the rule.
extend ( ) Extend this nodes selectors $extendee is the subject of the @extend directive $extender is the selector that contains the @extend directive $selector a selector or selector sequence that is to be extended
getIsContinued ( ) : boolean Returns a value indicating if the selectors for this rule are to be continued.
getSelectors ( ) : array Returns the selectors
isPlaceholder ( $selector )
parse ( SassContext $context ) : array Parse this node and its children into static nodes.
render ( ) : string Render this node and its children to CSS.
resolveSelectors ( SassContext $context ) : array Resolves selectors.

Защищенные методы

Метод Описание
getParentSelectors ( mixed $context ) : array Returns the parent selector(s) for this node.

Приватные методы

Метод Описание
explode ( string $string ) : array Explodes a string of selectors into an array.
hasParentReference ( string $selector ) : boolean Determines if there is a parent reference in the selector
isPsuedo ( string $selector ) : boolean Tests whether the selector is a psuedo selector
isSequence ( string $selector ) : boolean Tests whether the selector is a sequence selector
mergeSequence ( string $extender, string $extendee, string $selector ) : array Merges selector sequences
parentReferencePos ( string $selector ) : mixed Returns the position of the first parent reference in the selector.
resolveParentReferences ( string $selector, mixed $context ) : string Resolves parent references in the selector

Описание методов

__construct() публичный Метод

SassRuleNode constructor.
public __construct ( object $token ) : SassRuleNode
$token object source token
Результат SassRuleNode

addSelectors() публичный Метод

If the selectors are to continue for the rule the selector must end in a comma
public addSelectors ( string $selectors, boolean $explode = true )
$selectors string selector
$explode boolean

extend() публичный Метод

Extend this nodes selectors $extendee is the subject of the @extend directive $extender is the selector that contains the @extend directive $selector a selector or selector sequence that is to be extended
public extend ( )

getIsContinued() публичный Метод

Returns a value indicating if the selectors for this rule are to be continued.
public getIsContinued ( ) : boolean
Результат boolean rue if the selectors for this rule are to be continued false if not

getParentSelectors() защищенный Метод

This in an empty array if there is no parent selector.
protected getParentSelectors ( mixed $context ) : array
$context mixed
Результат array the parent selector for this node

getSelectors() публичный Метод

Returns the selectors
public getSelectors ( ) : array
Результат array selectors

isPlaceholder() публичный Метод

public isPlaceholder ( $selector )

parse() публичный Метод

Parse this node and its children into static nodes.
public parse ( SassContext $context ) : array
$context SassContext the context in which this node is parsed
Результат array the parsed node and its children

render() публичный Метод

Render this node and its children to CSS.
public render ( ) : string
Результат string the rendered node

resolveSelectors() публичный Метод

Interpolates SassScript in selectors and resolves any parent references or appends the parent selectors.
public resolveSelectors ( SassContext $context ) : array
$context SassContext the context in which this node is parsed Change: 7/Dec/11 - change to make selector ordering conform to Ruby compiler.
Результат array