PHP Класс Pop\Dom\Child

Автор: Nick Sagona, III ([email protected])
Наследование: extends Pop\Dom\AbstractNode
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$attributes array Child element attributes
$childrenFirst boolean Flag to render children before node value or not.
$nodeName string Child element node name
$nodeValue string Child element node value

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

Метод Описание
__construct ( string $name, string $value = null, mixed $childNode = null, boolean $first = false, string $indent = null ) : Child Constructor
__toString ( ) : string Render Dom child object to string
factory ( array $c ) : Child Static factory method to create child objects
getAttribute ( string $name ) : string Get the attribute of the child object.
getAttributes ( ) : array Get the attributes of the child object.
getNodeName ( ) : string Method to return the child node name.
getNodeValue ( ) : string Method to return the child node value.
render ( boolean $ret = false, integer $depth, string $indent = null ) : void Method to render the child and its child nodes.
setAttributes ( array | string $a, string $v = null ) : Child Set an attribute or attributes for the child element object.
setNodeName ( string $name ) : Child Method to set the child node name.
setNodeValue ( string $value ) : Child Method to set the child node value.

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

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

Instantiate the form element object
public __construct ( string $name, string $value = null, mixed $childNode = null, boolean $first = false, string $indent = null ) : Child
$name string
$value string
$childNode mixed
$first boolean
$indent string
Результат Child

__toString() публичный метод

Render Dom child object to string
public __toString ( ) : string
Результат string

factory() публичный статический метод

Static factory method to create child objects
public static factory ( array $c ) : Child
$c array
Результат Child

getAttribute() публичный метод

Get the attribute of the child object.
public getAttribute ( string $name ) : string
$name string
Результат string

getAttributes() публичный метод

Get the attributes of the child object.
public getAttributes ( ) : array
Результат array

getNodeName() публичный метод

Method to return the child node name.
public getNodeName ( ) : string
Результат string

getNodeValue() публичный метод

Method to return the child node value.
public getNodeValue ( ) : string
Результат string

render() публичный метод

Method to render the child and its child nodes.
public render ( boolean $ret = false, integer $depth, string $indent = null ) : void
$ret boolean
$depth integer
$indent string
Результат void

setAttributes() публичный метод

Set an attribute or attributes for the child element object.
public setAttributes ( array | string $a, string $v = null ) : Child
$a array | string
$v string
Результат Child

setNodeName() публичный метод

Method to set the child node name.
public setNodeName ( string $name ) : Child
$name string
Результат Child

setNodeValue() публичный метод

Method to set the child node value.
public setNodeValue ( string $value ) : Child
$value string
Результат Child

Описание свойств

$attributes защищенное свойство

Child element attributes
protected array $attributes
Результат array

$childrenFirst защищенное свойство

Flag to render children before node value or not.
protected bool $childrenFirst
Результат boolean

$nodeName защищенное свойство

Child element node name
protected string $nodeName
Результат string

$nodeValue защищенное свойство

Child element node value
protected string $nodeValue
Результат string