View/Helper/Navigation/Sitemap.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_View
- Subpackage
- Helper
- Version
- $Id$
\Zend_View_Helper_Navigation_Sitemap
Package: Zend_View\HelperHelper for printing sitemaps
- Parent(s)
- \Zend_View_Helper_Navigation_HelperAbstract
<
\Zend_View_Helper_HtmlElement
<
\Zend_View_Helper_Abstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Link
- http://www.sitemaps.org/protocol.php
Constants
Properties



bool $_useSchemaValidation = falseWhether sitemap should be schema validated when generated
Default valuefalseDetails- Type
- bool



bool $_useSitemapValidators = trueWhether sitemap should be validated using Zend_Validate_Sitemap_*
Default valuetrueDetails- Type
- bool



bool $_useXmlDeclaration = trueWhether the XML declaration should be included in XML output
Default valuetrueDetails- Type
- bool
Methods



_xmlEscape(string $string) : stringEscapes string for XML usage
Parameters| Name | Type | Description |
|---|
| $string | string | string to escape |
|---|
Returns| Type | Description |
|---|
| string | escaped string |



getDomSitemap(\Zend_Navigation_Container $container = null) : \DOMDocumentReturns a DOMDocument containing the Sitemap XML for the given container
Parameters| Name | Type | Description |
|---|
| $container | \Zend_Navigation_Container | [optional] container to get
breadcrumbs from, defaults
to what is registered in the
helper
|
|---|
Returns| Type | Description |
|---|
| \DOMDocument | DOM representation of the
container |
Throws| Exception | Description |
|---|
| \Zend_View_Exception | if schema validation is on
and the sitemap is invalid
according to the sitemap
schema, or if sitemap
validators are used and the
loc element fails validation |



getUseSitemapValidators() : boolReturns whether sitemap should be validated using Zend_Validate_Sitemap_*
Returns| Type | Description |
|---|
| bool | whether sitemap should be validated using validators |



getUseXmlDeclaration() : boolReturns whether the XML declaration should be used in output
Returns| Type | Description |
|---|
| bool | whether the XML declaration should be used in output |



render(\Zend_Navigation_Container $container = null) : stringImplements {@link Zend_View_Helper_Navigation_Helper::render()}.
Parameters| Name | Type | Description |
|---|
| $container | \Zend_Navigation_Container | [optional] container to
render. Default is to
render the container
registered in the helper.
|
|---|
Returns| Type | Description |
|---|
| string | helper output |



setServerUrl(string $serverUrl) : \Zend_View_Helper_Navigation_SitemapSets server url (scheme and host-related stuff without request URI)
E.g. http://www.example.com
Parameters| Name | Type | Description |
|---|
| $serverUrl | string | server URL to set (only
scheme and host)
|
|---|
ReturnsThrows


setUseSchemaValidation(bool $schemaValidation) : \Zend_View_Helper_Navigation_SitemapSets whether sitemap should be schema validated when generated
Parameters| Name | Type | Description |
|---|
| $schemaValidation | bool | whether sitemap should
validated using XSD Schema |
|---|
Returns 


setUseSitemapValidators(bool $useSitemapValidators) : \Zend_View_Helper_Navigation_SitemapSets whether sitemap should be validated using Zend_Validate_Sitemap_*
Parameters| Name | Type | Description |
|---|
| $useSitemapValidators | bool | whether sitemap validators
should be used |
|---|
Returns 


setUseXmlDeclaration(bool $useXmlDecl) : \Zend_View_Helper_Navigation_SitemapSets whether the XML declaration should be used in output
Parameters| Name | Type | Description |
|---|
| $useXmlDecl | bool | whether XML delcaration
should be rendered |
|---|
Returns