\WebinoDraw\DomElement

Class Element

Extended DOMElement

Summary

Methods
Properties
Constants
setOnReplace()
getOwnerDocument()
getParentNode()
replaceWith()
setLocator()
query()
setAttributes()
getInnerHtml()
getOuterHtml()
getProperties()
isEmpty()
appendHtml()
()
No public properties found
NODE_NAME_PROPERTY
NODE_PATH_PROPERTY
getLocator()
No protected properties found
N/A
No private methods found
$onReplace
$locator
N/A

Constants

NODE_NAME_PROPERTY

NODE_NAME_PROPERTY

NODE_PATH_PROPERTY

NODE_PATH_PROPERTY

Properties

$onReplace

$onReplace : array<mixed,callable>

Type

array<mixed,callable>

Methods

setOnReplace()

setOnReplace(callable  $callback) : $this

Parameters

callable $callback

Returns

$this

replaceWith()

replaceWith(string  $html) : \WebinoDraw\Dom\NodeInterface

Parameters

string $html

Throws

\WebinoDraw\Exception\LogicException

Returns

\WebinoDraw\Dom\NodeInterface

setLocator()

setLocator(\WebinoDraw\Dom\Locator  $locator) : $this

Parameters

\WebinoDraw\Dom\Locator $locator

Returns

$this

query()

query(string  $locator) : \WebinoDraw\Dom\NodeList

Parameters

string $locator

CSS selector or XPath (xpath=)

Returns

\WebinoDraw\Dom\NodeList

setAttributes()

setAttributes(array  $attribs, callable  $callback = null) : self

Attributes mass assignment

Parameters

array $attribs
callable $callback

Called on each attribute value

Returns

self

getInnerHtml()

getInnerHtml() : string

Returns the node body html

Returns

string

getOuterHtml()

getOuterHtml() : string

Returns the node html

Returns

string

getProperties()

getProperties(string  $prefix = null) : array

Returns the node text value and attributes in the array

Parameters

string $prefix

Returns

array

isEmpty()

isEmpty() : boolean

Returns

boolean

appendHtml()

appendHtml(string  $source) : $this

Parameters

string $source

Returns

$this

()

() : 

$this appendChild(DOMNode $newnode)

Returns