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.
Helper for printing sitemaps
string
SITEMAP_NS
= 'http://www.sitemaps.org/schemas/sitemap/0.9'
Namespace for the <urlset> tag

bool
$_formatOutput= 'false'
Whether XML output should be formatted
false
Details
bool
$_useSchemaValidation= 'false'
Whether sitemap should be schema validated when generated
false
Details
bool
$_useSitemapValidators= 'true'
Whether sitemap should be validated using Zend_Validate_Sitemap_*
true
Details
_xmlEscape(
string $string
)
:
string
Escapes string for XML usage
Name | Type | Description |
---|---|---|
$string | string | string to escape |
Type | Description |
---|---|
string | escaped string |

getDomSitemap(
\Zend_Navigation_Container $container
=
null
)
:
\DOMDocument
Returns a DOMDocument containing the Sitemap XML for the given container
Name | Type | Description |
---|---|---|
$container | \Zend_Navigation_Container | [optional] container to get breadcrumbs from, defaults to what is registered in the helper |
Type | Description |
---|---|
\DOMDocument | DOM representation of the container |
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 |

getFormatOutput(
)
:
bool
Returns whether XML output should be formatted
Type | Description |
---|---|
bool | whether XML output should be formatted |

getUseSchemaValidation(
)
:
bool
Returns true if sitemap should be schema validated when generated
Type | Description |
---|---|
bool |

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

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

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

setFormatOutput(
bool $formatOutput
=
true
)
:
\Zend_View_Helper_Navigation_Sitemap
Sets whether XML output should be formatted
Name | Type | Description |
---|---|---|
$formatOutput | bool | [optional] whether output should be formatted. Default is true. |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |

setServerUrl(
string $serverUrl
)
:
\Zend_View_Helper_Navigation_Sitemap
Sets server url (scheme and host-related stuff without request URI)
E.g. http://www.example.com
Name | Type | Description |
---|---|---|
$serverUrl | string | server URL to set (only scheme and host) |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_Uri_Exception | if invalid server URL |

setUseSchemaValidation(
bool $schemaValidation
)
:
\Zend_View_Helper_Navigation_Sitemap
Sets whether sitemap should be schema validated when generated
Name | Type | Description |
---|---|---|
$schemaValidation | bool | whether sitemap should validated using XSD Schema |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |

setUseSitemapValidators(
bool $useSitemapValidators
)
:
\Zend_View_Helper_Navigation_Sitemap
Sets whether sitemap should be validated using Zend_Validate_Sitemap_*
Name | Type | Description |
---|---|---|
$useSitemapValidators | bool | whether sitemap validators should be used |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |

setUseXmlDeclaration(
bool $useXmlDecl
)
:
\Zend_View_Helper_Navigation_Sitemap
Sets whether the XML declaration should be used in output
Name | Type | Description |
---|---|---|
$useXmlDecl | bool | whether XML delcaration should be rendered |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |

sitemap(
\Zend_Navigation_Container $container
=
null
)
:
\Zend_View_Helper_Navigation_Sitemap
View helper entry point: Retrieves helper and optionally sets container to operate on
Name | Type | Description |
---|---|---|
$container | \Zend_Navigation_Container | [optional] container to operate on |
Type | Description |
---|---|
\Zend_View_Helper_Navigation_Sitemap | fluent interface, returns self |

url(
\Zend_Navigation_Page $page
)
:
string
Returns an escaped absolute URL for the given page
Name | Type | Description |
---|---|---|
$page | \Zend_Navigation_Page | page to get URL from |
Type | Description |
---|---|
string |