API Documentation

View/Helper/Navigation/Sitemap.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_View
subpackage
Helper
version
$Id: Sitemap.php 20104 2010-01-06 21:26:01Z matthew $
Classes
Zend_View_Helper_Navigation_Sitemap

Description

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.

Zend_View_Helper_Navigation_Sitemap

Extends from
Zend_View_Helper_Navigation_HelperAbstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
link
http://www.sitemaps.org/protocol.php
package
Zend_View
subpackage
Helper
Constants
SITEMAP_NS
SITEMAP_XSD
Properties
$_formatOutput
$_useXmlDeclaration
$_useSitemapValidators
$_useSchemaValidation
$_serverUrl
Methods
sitemap
setFormatOutput
getFormatOutput
setUseXmlDeclaration
getUseXmlDeclaration
setUseSitemapValidators
getUseSitemapValidators
setUseSchemaValidation
getUseSchemaValidation
setServerUrl
getServerUrl
_xmlEscape
url
getDomSitemap
render

Description

Helper for printing sitemaps

Constants

SITEMAP_NS

string SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9'

Namespace for the <urlset> tag

Details

value
http://www.sitemaps.org/schemas/sitemap/0.9
SITEMAP_NS
string

SITEMAP_XSD

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

Schema URL

Details

value
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd
SITEMAP_XSD
string

Properties

$_formatOutput

bool $_formatOutput = 'false'

Whether XML output should be formatted

Details

$_formatOutput
bool
visibility
protected
default
false
final
false
static
false

$_serverUrl

string $_serverUrl = ''

Server url

Details

$_serverUrl
string
visibility
protected
default
final
false
static
false

$_useSchemaValidation

bool $_useSchemaValidation = 'false'

Whether sitemap should be schema validated when generated

Details

$_useSchemaValidation
bool
visibility
protected
default
false
final
false
static
false

$_useSitemapValidators

bool $_useSitemapValidators = 'true'

Whether sitemap should be validated using Zend_Validate_Sitemap_*

Details

$_useSitemapValidators
bool
visibility
protected
default
true
final
false
static
false

$_useXmlDeclaration

bool $_useXmlDeclaration = 'true'

Whether the XML declaration should be included in XML output

Details

$_useXmlDeclaration
bool
visibility
protected
default
true
final
false
static
false

Methods

_xmlEscape

_xmlEscape( string $string ) : string

Escapes string for XML usage

Arguments
$string
string
string to escape
Output
string
escaped string
Details
visibility
protected
final
false
static
false

getDomSitemap

getDomSitemap( Zend_Navigation_Container $container = null ) : DOMDocument

Returns a DOMDocument containing the Sitemap XML for the given container

Arguments
$container
Zend_Navigation_Container
[optional] container to get breadcrumbs from, defaults to what is registered in the helper
Output
DOMDocument
DOM representation of the container
Details
visibility
public
final
false
static
false
throws
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

getFormatOutput( ) : bool

Returns whether XML output should be formatted

Output
bool
whether XML output should be formatted
Details
visibility
public
final
false
static
false

getServerUrl

getServerUrl( ) : string

Returns server URL

Output
string
server URL
Details
visibility
public
final
false
static
false

getUseSchemaValidation

getUseSchemaValidation( ) : bool

Returns true if sitemap should be schema validated when generated

Output
bool
Details
visibility
public
final
false
static
false

getUseSitemapValidators

getUseSitemapValidators( ) : bool

Returns whether sitemap should be validated using Zend_Validate_Sitemap_*

Output
bool
whether sitemap should be validated using validators
Details
visibility
public
final
false
static
false

getUseXmlDeclaration

getUseXmlDeclaration( ) : bool

Returns whether the XML declaration should be used in output

Output
bool
whether the XML declaration should be used in output
Details
visibility
public
final
false
static
false

render

render( Zend_Navigation_Container $container = null ) : string

Renders helper

Implements {@link Zend_View_Helper_Navigation_Helper::render()}.

Arguments
$container
Zend_Navigation_Container
[optional] container to render. Default is to render the container registered in the helper.
Output
string
helper output
Details
visibility
public
final
false
static
false

setFormatOutput

setFormatOutput( bool $formatOutput = true ) : Zend_View_Helper_Navigation_Sitemap

Sets whether XML output should be formatted

Arguments
$formatOutput
bool
[optional] whether output should be formatted. Default is true.
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false

setServerUrl

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

Arguments
$serverUrl
string
server URL to set (only scheme and host)
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false
throws
if invalid server URL

setUseSchemaValidation

setUseSchemaValidation( bool $schemaValidation ) : Zend_View_Helper_Navigation_Sitemap

Sets whether sitemap should be schema validated when generated

Arguments
$schemaValidation
bool
whether sitemap should validated using XSD Schema
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false

setUseSitemapValidators

setUseSitemapValidators( bool $useSitemapValidators ) : Zend_View_Helper_Navigation_Sitemap

Sets whether sitemap should be validated using Zend_Validate_Sitemap_*

Arguments
$useSitemapValidators
bool
whether sitemap validators should be used
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false

setUseXmlDeclaration

setUseXmlDeclaration( bool $useXmlDecl ) : Zend_View_Helper_Navigation_Sitemap

Sets whether the XML declaration should be used in output

Arguments
$useXmlDecl
bool
whether XML delcaration should be rendered
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false

sitemap

sitemap( Zend_Navigation_Container $container = null ) : Zend_View_Helper_Navigation_Sitemap

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

Arguments
$container
Zend_Navigation_Container
[optional] container to operate on
Output
Zend_View_Helper_Navigation_Sitemap
fluent interface, returns self
Details
visibility
public
final
false
static
false

url

url( Zend_Navigation_Page $page ) : string

Returns an escaped absolute URL for the given page

Arguments
$page
Zend_Navigation_Page
page to get URL from
Output
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.