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