PHP Class SassPropertyNode

Represents a CSS property.
Inheritance: extends SassNode
Afficher le fichier Open project: richthegeek/phpsass Class Usage Examples

Méthodes publiques

Свойство Type Description
$important
$name property name
$psuedoSelectors
$value property value or expression to evaluate

Méthodes publiques

Méthode Description
__construct ( object $token, string $syntax = 'new' ) : SassPropertyNode SassPropertyNode constructor.
getName ( ) : string Returns the name of this property.
getNamespace ( ) : string Returns the namespace for this node
getValue ( ) : string Returns the parsed value of this property.
inNamespace ( ) : boolean Returns a value indicating if this node is in a namespace
isPseudoSelector ( string $string ) : boolean Returns a value indicating if the string starts with a pseudo selector.
isa ( object $token ) : boolean Returns a value indicating if the token represents this type of node.
match ( object $token, string $syntax ) : array Returns the matches for this type of node.
parse ( SassContext $context ) : array Parse this node.
render ( ) : string Render this node.

Method Details

__construct() public méthode

SassPropertyNode constructor.
public __construct ( object $token, string $syntax = 'new' ) : SassPropertyNode
$token object source token
$syntax string property syntax
Résultat SassPropertyNode

getName() public méthode

If the property is in a namespace the namespace is prepended
public getName ( ) : string
Résultat string the name of this property

getNamespace() public méthode

Returns the namespace for this node
public getNamespace ( ) : string
Résultat string the namespace for this node

getValue() public méthode

Returns the parsed value of this property.
public getValue ( ) : string
Résultat string the parsed value of this property

inNamespace() public méthode

Returns a value indicating if this node is in a namespace
public inNamespace ( ) : boolean
Résultat boolean true if this node is in a property namespace, false if not

isPseudoSelector() public static méthode

This is used to reject pseudo selectors as property values as, for example, "a:hover" and "text-decoration:underline" look the same to the property match regex. It will also match interpolation to allow for constructs such as content:#{$pos}
See also: isa()
public static isPseudoSelector ( string $string ) : boolean
$string string the string to test
Résultat boolean true if the string starts with a pseudo selector, false if not

isa() public static méthode

Returns a value indicating if the token represents this type of node.
public static isa ( object $token ) : boolean
$token object token
Résultat boolean true if the token represents this type of node, false if not

match() public static méthode

Returns the matches for this type of node.
public static match ( object $token, string $syntax ) : array
$token object
$syntax string the property syntax being used
Résultat array matches

parse() public méthode

If the node is a property namespace return all parsed child nodes. If not return the parsed version of this node.
public parse ( SassContext $context ) : array
$context SassContext the context in which this node is parsed
Résultat array the parsed node

render() public méthode

Render this node.
public render ( ) : string
Résultat string the rendered node

Property Details

$important public_oe property

public $important

$name public_oe property

property name
public $name

$psuedoSelectors public_oe static_oe property

public static $psuedoSelectors

$value public_oe property

property value or expression to evaluate
public $value