CSSMagic  1.0
Criação de CSS dinâmico sem uso de pré-processadores, apenas com PHP 7
Public Member Functions | Protected Attributes
Selector Class Reference

Public Member Functions

 __construct (string $selector_id)
 
 getSelectorId ()
 
 addRule (Rule $rule)
 
 getAllRules ()
 
 getRule (string $rule_id)
 
 hasRule (string $rule_id)
 
 removeRule (string $rule_id)
 

Protected Attributes

 $selector_id = ''
 
 $rules = []
 

Detailed Description

Representa um seletor CSS

Definition at line 8 of file Selector.php.

Constructor & Destructor Documentation

__construct ( string  $selector_id)

Construtor da classe.

Parameters
string$selector_idO seletor CSS
Returns
void

Definition at line 25 of file Selector.php.

Member Function Documentation

addRule ( Rule  $rule)

Adiciona uma nova regra ao seletor.

Parameters
{

Definition at line 42 of file Selector.php.

getAllRules ( )

Retorna todas as regras.

Returns
array

Definition at line 50 of file Selector.php.

getRule ( string  $rule_id)

Retorna uma regra espec¡fica.

Parameters
string$rule_idA tag CSS da regra.
Returns
CSSMagic

Definition at line 59 of file Selector.php.

getSelectorId ( )

Retorna o seletor

Returns
string

Definition at line 33 of file Selector.php.

hasRule ( string  $rule_id)

Verifica se determinada regra existe.

Parameters
string$rule_idA tag CSS da regra.
Returns
boolean

Definition at line 68 of file Selector.php.

removeRule ( string  $rule_id)

Remove determinada regra.

Parameters
string$rule_idA tag CSS da regra.
Returns
void

Definition at line 77 of file Selector.php.

Field Documentation

$rules = []
protected

O conjunto de regras CSS do seletor.

Definition at line 18 of file Selector.php.

$selector_id = ''
protected

O seletor

Definition at line 13 of file Selector.php.


The documentation for this class was generated from the following file: