Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes

Zend_View_Helper_Navigation_Sitemap Class Reference

Inheritance diagram for Zend_View_Helper_Navigation_Sitemap:
Zend_View_Helper_Navigation_HelperAbstract Zend_View_Helper_HtmlElement Zend_View_Helper_Navigation_Helper Zend_View_Helper_Abstract Zend_View_Helper_Interface

Public Member Functions

 sitemap (Zend_Navigation_Container $container=null)
 setFormatOutput ($formatOutput=true)
 getFormatOutput ()
 setUseXmlDeclaration ($useXmlDecl)
 getUseXmlDeclaration ()
 setUseSitemapValidators ($useSitemapValidators)
 getUseSitemapValidators ()
 setUseSchemaValidation ($schemaValidation)
 getUseSchemaValidation ()
 setServerUrl ($serverUrl)
 getServerUrl ()
 url (Zend_Navigation_Page $page)
 getDomSitemap (Zend_Navigation_Container $container=null)
 render (Zend_Navigation_Container $container=null)

Data Fields

const SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9'
const SITEMAP_XSD = 'http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'

Protected Member Functions

 _xmlEscape ($string)

Protected Attributes

 $_formatOutput = false
 $_useXmlDeclaration = true
 $_useSitemapValidators = true
 $_useSchemaValidation = false
 $_serverUrl

Detailed Description

Definition at line 39 of file Sitemap.php.


Member Function Documentation

_xmlEscape ( string ) [protected]

Escapes string for XML usage

Parameters:
string$stringstring to escape
Returns:
string escaped string

Definition at line 261 of file Sitemap.php.

getDomSitemap ( Zend_Navigation_Container $  container = null )

Returns a DOMDocument containing the Sitemap XML for the given container

Parameters:
Zend_Navigation_Container$container[optional] container to get breadcrumbs from, defaults to what is registered in the helper
Returns:
DOMDocument DOM representation of the container
Exceptions:
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

Definition at line 328 of file Sitemap.php.

getFormatOutput (  )

Returns whether XML output should be formatted

Returns:
bool whether XML output should be formatted

Definition at line 131 of file Sitemap.php.

getServerUrl (  )

Returns server URL

Returns:
string server URL

Definition at line 244 of file Sitemap.php.

getUseSchemaValidation (  )

Returns true if sitemap should be schema validated when generated

Returns:
bool

Definition at line 203 of file Sitemap.php.

getUseSitemapValidators (  )

Returns whether sitemap should be validated using Zend_Validate_Sitemap_*

Returns:
bool whether sitemap should be validated using validators

Definition at line 179 of file Sitemap.php.

getUseXmlDeclaration (  )

Returns whether the XML declaration should be used in output

Returns:
bool whether the XML declaration should be used in output

Definition at line 155 of file Sitemap.php.

render ( Zend_Navigation_Container $  container = null )

Renders helper

Implements Zend_View_Helper_Navigation_Helper::render().

Parameters:
Zend_Navigation_Container$container[optional] container to render. Default is to render the container registered in the helper.
Returns:
string helper output

Implements Zend_View_Helper_Navigation_Helper.

Definition at line 467 of file Sitemap.php.

setFormatOutput ( formatOutput = true )

Sets whether XML output should be formatted

Parameters:
bool$formatOutput[optional] whether output should be formatted. Default is true.
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 120 of file Sitemap.php.

setServerUrl ( serverUrl )

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

E.g. http://www.example.com

Parameters:
string$serverUrlserver URL to set (only scheme and host)
Exceptions:
Zend_Uri_Exceptionif invalid server URL
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 219 of file Sitemap.php.

setUseSchemaValidation ( schemaValidation )

Sets whether sitemap should be schema validated when generated

Parameters:
bool$schemaValidationwhether sitemap should validated using XSD Schema
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 192 of file Sitemap.php.

setUseSitemapValidators ( useSitemapValidators )

Sets whether sitemap should be validated using Zend_Validate_Sitemap_*

Parameters:
bool$useSitemapValidatorswhether sitemap validators should be used
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 168 of file Sitemap.php.

setUseXmlDeclaration ( useXmlDecl )

Sets whether the XML declaration should be used in output

Parameters:
bool$useXmlDeclwhether XML delcaration should be rendered
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 144 of file Sitemap.php.

sitemap ( Zend_Navigation_Container $  container = null )

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

Parameters:
Zend_Navigation_Container$container[optional] container to operate on
Returns:
Zend_View_Helper_Navigation_Sitemap fluent interface, returns self

Definition at line 100 of file Sitemap.php.

url ( Zend_Navigation_Page $  page )

Returns an escaped absolute URL for the given page

Parameters:
Zend_Navigation_Page$pagepage to get URL from
Returns:
string

Definition at line 289 of file Sitemap.php.


The documentation for this class was generated from the following file: