PHP Class FluentDOM\Query\Css

It acts like the FluentDOMStyle::css() method. If you read css properties it uses the first selected node. Write actions are applied to all matches element nodes.
Inheritance: implements ArrayAccess, implements Countable, implements IteratorAggregate
Mostrar archivo Open project: fluentdom/fluentdom

Public Methods

Method Description
__construct ( Query $fd ) Store the FluentDOM instance for later use and decode the style string into an array
count ( ) : integer Get the property count of the first selected node
getIterator ( ) : Iterator Get an iterator for the properties
offsetExists ( string $name ) : boolean Allow to use isset() and array syntax to check if a css property is set on the first matched node.
offsetGet ( string $name ) : boolean | mixed Allow to use array syntax to read a css property value from first matched node.
offsetSet ( string $name, string $value ) Allow to use array syntax to change a css property value on all matched nodes.
offsetUnset ( string $name ) Allow to use unset and array syntax to remove a css property value on all matched nodes.

Private Methods

Method Description
getStyleProperties ( ) : Properties | null Get the style properties from the first node in the Query object

Method Details

__construct() public method

Store the FluentDOM instance for later use and decode the style string into an array
public __construct ( Query $fd )
$fd FluentDOM\Query

count() public method

Get the property count of the first selected node
See also: Countable::count()
public count ( ) : integer
return integer

getIterator() public method

Get an iterator for the properties
See also: IteratorAggregate::getIterator()
public getIterator ( ) : Iterator
return Iterator

offsetExists() public method

Allow to use isset() and array syntax to check if a css property is set on the first matched node.
See also: ArrayAccess::offsetExists()
public offsetExists ( string $name ) : boolean
$name string
return boolean

offsetGet() public method

Allow to use array syntax to read a css property value from first matched node.
See also: ArrayAccess::offsetGet()
public offsetGet ( string $name ) : boolean | mixed
$name string
return boolean | mixed $value

offsetSet() public method

Allow to use array syntax to change a css property value on all matched nodes.
See also: ArrayAccess::offsetSet()
public offsetSet ( string $name, string $value )
$name string
$value string

offsetUnset() public method

Allow to use unset and array syntax to remove a css property value on all matched nodes.
See also: ArrayAccess::offsetUnset()
public offsetUnset ( string $name )
$name string