PHP Класс FluentDOM\Query\Data

Наследование: implements IteratorAggregate, implements Countable
Показать файл Открыть проект

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

Метод Описание
__construct ( DOMElement $node ) Create object with attached element node.
__get ( string $name ) : mixed Read a data attribute from the attached node.
__isset ( string $name ) : boolean Validate if the attached node has the data attribute.
__set ( string $name, mixed $value ) Change a data attribute on the attached node.
__unset ( string $name ) Remove a data attribute from the attached node.
count ( ) : integer countable Interface: return the number of data attributes
getIterator ( ) : Iterator IteratorAggregate Interface: allow to iterate the data attributes
toArray ( ) : array Convert data attributes into an array

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

Метод Описание
decodeName ( string $name ) : string Convert the given attribute name with hyphens to camel case.
decodeValue ( string $value ) : mixed Decode the attribute value into a php variable/array/object
encodeName ( string $name ) : string Normalize a property name from camel case to lowercase with hyphens.
encodeValue ( mixed $value ) : string Encode php variable into a string. Array or Objects will be serialized using json encoding.
isDataProperty ( string $name ) : boolean Validate if the given attribute name is a data property name

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

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

Create object with attached element node.
public __construct ( DOMElement $node )
$node DOMElement

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

Read a data attribute from the attached node.
public __get ( string $name ) : mixed
$name string
Результат mixed

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

Validate if the attached node has the data attribute.
public __isset ( string $name ) : boolean
$name string
Результат boolean

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

Change a data attribute on the attached node.
public __set ( string $name, mixed $value )
$name string
$value mixed

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

Remove a data attribute from the attached node.
public __unset ( string $name )
$name string

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

countable Interface: return the number of data attributes
public count ( ) : integer
Результат integer

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

IteratorAggregate Interface: allow to iterate the data attributes
public getIterator ( ) : Iterator
Результат Iterator

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

Convert data attributes into an array
public toArray ( ) : array
Результат array