Fully Qualified Name: | Zend\Dom\Query |
Query DOM structures based on CSS selectors and/or XPath
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Query |
execute() | Perform a CSS selector query | Query |
getDocument() | Retrieve current document | Query |
getDocumentErrors() | Get any DOMDocument errors found | Query |
getDocumentType() | Get document type | Query |
getEncoding() | Get document encoding | Query |
queryXpath() | Perform an XPath query | Query |
registerXpathNamespaces() | Register XPath namespaces | Query |
registerXpathPhpFunctions() | Register PHP Functions to use in internal DOMXPath | Query |
setDocument() | Set document to query | Query |
setDocumentHtml() | Register HTML document | Query |
setDocumentXhtml() | Register XHTML document | Query |
setDocumentXml() | Register XML document | Query |
setEncoding() | Set document encoding | Query |
Constructor
Parameter Name | Type | Description |
---|---|---|
$document | null|string | |
$encoding | null|string |
Returns:
Perform a CSS selector query
Parameter Name | Type | Description |
---|---|---|
$query | string | |
$contextNode | \DOMNode |
Returns: \NodeList
Retrieve current document
Returns: string
Get any DOMDocument errors found
Returns: bool|array
Get document type
Returns: string
Get document encoding
Returns: null|string
Perform an XPath query
Parameter Name | Type | Description |
---|---|---|
$xpathQuery | string|array | |
$query | string|null | CSS |
$contextNode | \DOMNode | $contextNode |
Returns: \NodeList
Register XPath namespaces
Parameter Name | Type | Description |
---|---|---|
$xpathNamespaces | array |
Returns: void
Register PHP Functions to use in internal DOMXPath
Parameter Name | Type | Description |
---|---|---|
$xpathPhpFunctions | bool |
Returns: void
Set document to query
Parameter Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document |
Returns: \Query
Register HTML document
Parameter Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document |
Returns: \Query
Register XHTML document
Parameter Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document |
Returns: \Query
Register XML document
Parameter Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null|string | Document |
Returns: \Query
Set document encoding
Parameter Name | Type | Description |
---|---|---|
$encoding | string |
Returns: \Query