Dom/Query.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Dom
- Version
- $Id: Query.php 25033 2012-08-17 19:50:08Z matthew $
\Zend_Dom_Query
Query DOM structures based on CSS selectors and/or XPath
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


false|array $_documentErrors = false
DOMDocument errors, if any
false
Details- Type
- false | array
Methods


__construct(null | string $document = null, $encoding = null) : void
Constructor
Name | Type | Description |
---|---|---|
$document | null | string | |
$encoding |


_getNodeList(\DOMDocument $document, string | array $xpathQuery) : array
Prepare node list
Name | Type | Description |
---|---|---|
$document | \DOMDocument | |
$xpathQuery | string | array |
Type | Description |
---|---|
array |


getDocumentErrors() : false | array
Get any DOMDocument errors found
Type | Description |
---|---|
false | array |


query(string $query) : \Zend_Dom_Query_Result
Perform a CSS selector query
Name | Type | Description |
---|---|---|
$query | string |
Type | Description |
---|---|
\Zend_Dom_Query_Result |


queryXpath(string | array $xpathQuery, string $query = null) : \Zend_Dom_Query_Result
Perform an XPath query
Name | Type | Description |
---|---|---|
$xpathQuery | string | array | |
$query | string | CSS selector query |
Type | Description |
---|---|
\Zend_Dom_Query_Result |


registerXpathNamespaces(array $xpathNamespaces) : void
Register XPath namespaces
Name | Type | Description |
---|---|---|
$xpathNamespaces | array |


setDocument(string $document, null | string $encoding = null) : \Zend_Dom_Query
Set document to query
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null | string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |


setDocumentHtml(string $document, null | string $encoding = null) : \Zend_Dom_Query
Register HTML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null | string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |


setDocumentXhtml(string $document, null | string $encoding = null) : \Zend_Dom_Query
Register XHTML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null | string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |


setDocumentXml(string $document, null | string $encoding = null) : \Zend_Dom_Query
Register XML document
Name | Type | Description |
---|---|---|
$document | string | |
$encoding | null | string | Document encoding |
Type | Description |
---|---|
\Zend_Dom_Query |


setEncoding(string $encoding) : \Zend_Dom_Query
Set document encoding
Name | Type | Description |
---|---|---|
$encoding | string |
Type | Description |
---|---|
\Zend_Dom_Query |