Class Document

Summary

Fully Qualified Name: Zend\Dom\Document

Description

Class used to initialize DomDocument from string, with proper verifications

Methods

Name Description Defined By
__construct() Constructor Document
getDomDocument() Get DOMDocument generated from set raw document Document
getEncoding() Get set document encoding Document
getErrors() Get DOMDocument generation errors Document
getStringDocument() Get raw set document Document
getType() Get raw document type Document
getXpathNamespaces() Get Document's registered XPath namespaces Document
getXpathPhpFunctions() Get Document's registered XPath PHP Functions Document
registerXpathNamespaces() Register XPath namespaces Document
registerXpathPhpFunctions() Register PHP Functions to use in internal DOMXPath Document
setEncoding() Set raw document encoding for DOMDocument generation Document

Method Details

__construct()

Constructor

Parameter Name Type Description
$document string|null String
$type string|null Force
$encoding string|null Encoding

Returns:

getDomDocument()

Get DOMDocument generated from set raw document

Returns: \DOMDocument

getEncoding()

Get set document encoding

Returns: string|null

getErrors()

Get DOMDocument generation errors

Returns: array

getStringDocument()

Get raw set document

Returns: string|null

getType()

Get raw document type

Returns: string|null

getXpathNamespaces()

Get Document's registered XPath namespaces

Returns: array

getXpathPhpFunctions()

Get Document's registered XPath PHP Functions

Returns: string|null

registerXpathNamespaces()

Register XPath namespaces

Parameter Name Type Description
$xpathNamespaces array

Returns: void

registerXpathPhpFunctions()

Register PHP Functions to use in internal DOMXPath

Parameter Name Type Description
$xpathPhpFunctions bool

Returns: void

setEncoding()

Set raw document encoding for DOMDocument generation

Parameter Name Type Description
$encoding string|null

Returns: self

Top