PHP Class FluentDOM\Nodes\Creator

Datei anzeigen Open project: fluentdom/fluentdom

Public Methods

Method Description
__clone ( ) If the creator is cloned, a clone of the dom document is needed, too.
__construct ( string $version = '1.0', string $encoding = 'UTF-8' )
__get ( string $name ) : mixed
__invoke ( string $name, $parameters ) : Node
__isset ( string $name ) : boolean
__set ( string $name, mixed $value )
cdata ( string $content ) : FluentDOM\CdataSection
comment ( string $content ) : FluentDOM\Comment
each ( array | Traversable $traversable, callable $map = NULL ) : FluentDOM\Appendable
element ( string $name, $parameters ) : Element Create an Element node and configure it.
pi ( string $target, string $content ) : DOMProcessingInstruction
registerNamespace ( string $prefix, string $namespaceUri )

Method Details

__clone() public method

If the creator is cloned, a clone of the dom document is needed, too.
public __clone ( )

__construct() public method

public __construct ( string $version = '1.0', string $encoding = 'UTF-8' )
$version string
$encoding string

__get() public method

public __get ( string $name ) : mixed
$name string
return mixed

__invoke() public method

public __invoke ( string $name, $parameters ) : Node
$name string
$parameters
return FluentDOM\Nodes\Creator\Node

__isset() public method

public __isset ( string $name ) : boolean
$name string
return boolean

__set() public method

public __set ( string $name, mixed $value )
$name string
$value mixed

cdata() public method

public cdata ( string $content ) : FluentDOM\CdataSection
$content string
return FluentDOM\CdataSection

comment() public method

public comment ( string $content ) : FluentDOM\Comment
$content string
return FluentDOM\Comment

each() public method

public each ( array | Traversable $traversable, callable $map = NULL ) : FluentDOM\Appendable
$traversable array | Traversable
$map callable
return FluentDOM\Appendable

element() public method

The first argument is the node name. All other arguments are flexible. - Arrays are set as attributes - Attribute and Namespace nodes are set as attributes - Nodes are appended as child nodes - FluentDOM\Appendable instances are appended - Strings or objects castable to string are appended as text nodes
public element ( string $name, $parameters ) : Element
$name string
$parameters
return FluentDOM\Element

pi() public method

public pi ( string $target, string $content ) : DOMProcessingInstruction
$target string
$content string
return DOMProcessingInstruction

registerNamespace() public method

public registerNamespace ( string $prefix, string $namespaceUri )
$prefix string
$namespaceUri string