View/Helper/Navigation/Sitemap.php

Show: PublicProtectedPrivateinherited
Table of Contents
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\Helper
Helper 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

>VConstantstring  SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9'
Namespace for the tag
SITEMAP_NS
string

>VConstantstring  SITEMAP_XSD = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'
Schema URL
SITEMAP_XSD
string

Properties

>VPropertyprotectedstring $_serverUrl
Server url
Details
Type
string
>VPropertyprotectedbool $_useSchemaValidation = false
Whether sitemap should be schema validated when generated
Default valuefalseDetails
Type
bool
>VPropertyprotectedbool $_useSitemapValidators = true
Whether sitemap should be validated using Zend_Validate_Sitemap_*
Default valuetrueDetails
Type
bool
>VPropertyprotectedbool $_useXmlDeclaration = true
Whether the XML declaration should be included in XML output
Default valuetrueDetails
Type
bool

Methods

methodprotected_xmlEscape(string $string) : string

Escapes string for XML usage

Parameters
NameTypeDescription
$stringstring

string to escape

Returns
TypeDescription
stringescaped string
methodpublicgetDomSitemap(\Zend_Navigation_Container $container = null) : \DOMDocument

Returns a DOMDocument containing the Sitemap XML for the given container

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

[optional] container to get

                                          breadcrumbs from, defaults
                                          to what is registered in the
                                          helper
Returns
TypeDescription
\DOMDocumentDOM representation of the container
Throws
ExceptionDescription
\Zend_View_Exceptionif 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
methodpublicgetServerUrl() : string

Returns server URL

Returns
TypeDescription
stringserver URL
methodpublicgetUseSchemaValidation() : bool

Returns true if sitemap should be schema validated when generated

Returns
TypeDescription
bool
methodpublicgetUseSitemapValidators() : bool

Returns whether sitemap should be validated using Zend_Validate_Sitemap_*

Returns
TypeDescription
boolwhether sitemap should be validated using validators
methodpublicgetUseXmlDeclaration() : bool

Returns whether the XML declaration should be used in output

Returns
TypeDescription
boolwhether the XML declaration should be used in output
methodpublicrender(\Zend_Navigation_Container $container = null) : string

Renders helper

Implements {@link Zend_View_Helper_Navigation_Helper::render()}.
Parameters
NameTypeDescription
$container\Zend_Navigation_Container

[optional] container to

                                          render. Default is to
                                          render the container
                                          registered in the helper.
Returns
TypeDescription
stringhelper output
methodpublicsetServerUrl(string $serverUrl) : \Zend_View_Helper_Navigation_Sitemap

Sets server url (scheme and host-related stuff without request URI)

E.g. http://www.example.com
Parameters
NameTypeDescription
$serverUrlstring

server URL to set (only

                                         scheme and host)
Returns
TypeDescription
\Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
Throws
ExceptionDescription
\Zend_Uri_Exceptionif invalid server URL
methodpublicsetUseSchemaValidation(bool $schemaValidation) : \Zend_View_Helper_Navigation_Sitemap

Sets whether sitemap should be schema validated when generated

Parameters
NameTypeDescription
$schemaValidationbool

whether sitemap should validated using XSD Schema

Returns
TypeDescription
\Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
methodpublicsetUseSitemapValidators(bool $useSitemapValidators) : \Zend_View_Helper_Navigation_Sitemap

Sets whether sitemap should be validated using Zend_Validate_Sitemap_*

Parameters
NameTypeDescription
$useSitemapValidatorsbool

whether sitemap validators should be used

Returns
TypeDescription
\Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
methodpublicsetUseXmlDeclaration(bool $useXmlDecl) : \Zend_View_Helper_Navigation_Sitemap

Sets whether the XML declaration should be used in output

Parameters
NameTypeDescription
$useXmlDeclbool

whether XML delcaration should be rendered

Returns
TypeDescription
\Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
methodpublicsitemap(\Zend_Navigation_Container $container = null) : \Zend_View_Helper_Navigation_Sitemap

View helper entry point: Retrieves helper and optionally sets container to operate on

Parameters
NameTypeDescription
$container\Zend_Navigation_Container

[optional] container to

                                          operate on
Returns
TypeDescription
\Zend_View_Helper_Navigation_Sitemapfluent interface, returns self
methodpublicurl(\Zend_Navigation_Page $page) : string

Returns an escaped absolute URL for the given page

Parameters
NameTypeDescription
$page\Zend_Navigation_Page

page to get URL from

Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .