PHP Class Pop\Dom\Child

Author: Nick Sagona, III ([email protected])
Inheritance: extends Pop\Dom\AbstractNode
Afficher le fichier Open project: nicksagona/PopPHP Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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
Résultat Child

__toString() public méthode

Render Dom child object to string
public __toString ( ) : string
Résultat string

factory() public static méthode

Static factory method to create child objects
public static factory ( array $c ) : Child
$c array
Résultat Child

getAttribute() public méthode

Get the attribute of the child object.
public getAttribute ( string $name ) : string
$name string
Résultat string

getAttributes() public méthode

Get the attributes of the child object.
public getAttributes ( ) : array
Résultat array

getNodeName() public méthode

Method to return the child node name.
public getNodeName ( ) : string
Résultat string

getNodeValue() public méthode

Method to return the child node value.
public getNodeValue ( ) : string
Résultat string

render() public méthode

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
Résultat void

setAttributes() public méthode

Set an attribute or attributes for the child element object.
public setAttributes ( array | string $a, string $v = null ) : Child
$a array | string
$v string
Résultat Child

setNodeName() public méthode

Method to set the child node name.
public setNodeName ( string $name ) : Child
$name string
Résultat Child

setNodeValue() public méthode

Method to set the child node value.
public setNodeValue ( string $value ) : Child
$value string
Résultat Child

Property Details

$attributes protected_oe property

Child element attributes
protected array $attributes
Résultat array

$childrenFirst protected_oe property

Flag to render children before node value or not.
protected bool $childrenFirst
Résultat boolean

$nodeName protected_oe property

Child element node name
protected string $nodeName
Résultat string

$nodeValue protected_oe property

Child element node value
protected string $nodeValue
Résultat string