PHP Class PhpCss\Ast\Selector\Group

This is the root element of a standard selector string like: "element, .class" Because it is a list the some standard interfaces are implemented for easier usage.
Inheritance: extends PhpCss\Ast\Selector, implements ArrayAccess, implements Countable, implements IteratorAggregate
Exibir arquivo Open project: ThomasWeinert/PhpCss

Public Methods

Method Description
__construct ( array $sequences = [] ) Create the object and assign sequences if provided. They can be added later of course.
accept ( PhpCss\Ast\Visitor $visitor ) : null | void Accept visitors, because this element has children, enter and leave are called.
count ( ) : integer Return the sequence list count.
getIterator ( ) : Traversable Return an iterator for the sequences
offsetExists ( integer $offset ) : boolean Check if a sequence at the given position is available in the list.
offsetGet ( integer $offset ) : Sequence Return the sequence at the given position.
offsetSet ( integer | null $offset, Sequence $sequence ) Set/Add and sequence at the given position or top the end
offsetUnset ( integer $offset ) Remove the sequence at the given position

Method Details

__construct() public method

Create the object and assign sequences if provided. They can be added later of course.
public __construct ( array $sequences = [] )
$sequences array

accept() public method

Accept visitors, because this element has children, enter and leave are called.
public accept ( PhpCss\Ast\Visitor $visitor ) : null | void
$visitor PhpCss\Ast\Visitor
return null | void

count() public method

Return the sequence list count.
See also: Countable::count()
public count ( ) : integer
return integer

getIterator() public method

Return an iterator for the sequences
See also: IteratorAggregate::getIterator()
public getIterator ( ) : Traversable
return Traversable

offsetExists() public method

Check if a sequence at the given position is available in the list.
See also: ArrayAccess::offsetExists()
public offsetExists ( integer $offset ) : boolean
$offset integer
return boolean

offsetGet() public method

Return the sequence at the given position.
See also: ArrayAccess::offsetGet()
public offsetGet ( integer $offset ) : Sequence
$offset integer
return Sequence

offsetSet() public method

Set/Add and sequence at the given position or top the end
See also: ArrayAccess::offsetSet()
public offsetSet ( integer | null $offset, Sequence $sequence )
$offset integer | null
$sequence Sequence

offsetUnset() public method

Remove the sequence at the given position
See also: ArrayAccess::offsetUnset()
public offsetUnset ( integer $offset )
$offset integer