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 license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Dom
- Version
- $Id$
\Zend_Dom_Query
Package: Zend_Dom\Query











Query DOM structures based on CSS selectors and/or XPath
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties

false|array $_documentErrors = falseDOMDocument errors, if any
Default value
falseDetails- Type
- false | array
Methods

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

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

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

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

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

registerXpathNamespaces(array $xpathNamespaces) : voidRegister XPath namespaces
Parameters
| Name | Type | Description |
|---|---|---|
| $xpathNamespaces | array |

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

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

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

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

setEncoding(string $encoding) : \Zend_Dom_QuerySet document encoding
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $encoding | string |
| Type | Description |
|---|---|
| \Zend_Dom_Query |