API Documentation

Navigation/Page/Mvc.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_Navigation
subpackage
Page
version
$Id: Mvc.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Navigation_Page_Mvc

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_Navigation_Page_Mvc

Extends from
Zend_Navigation_Page
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_Navigation
subpackage
Page
Properties
$_action
$_controller
$_module
$_params
$_route
$_resetParams
$_hrefCache
$_urlHelper
Methods
isActive
getHref
setAction
getAction
setController
getController
setModule
getModule
setParams
getParams
setRoute
getRoute
setResetParams
getResetParams
setUrlHelper
toArray

Description

Represents a page that is defined using module, controller, action, route name and route params to assemble the href

Properties

$_action

string $_action = ''

Action name to use when assembling URL

Details

$_action
string
visibility
protected
default
final
false
static
false

$_controller

string $_controller = ''

Controller name to use when assembling URL

Details

$_controller
string
visibility
protected
default
final
false
static
false

$_hrefCache

string $_hrefCache = ''

Cached href

The use of this variable minimizes execution time when getHref() is called more than once during the lifetime of a request. If a property is updated, the cache is invalidated.

Details

$_hrefCache
string
visibility
protected
default
final
false
static
false

$_module

string $_module = ''

Module name to use when assembling URL

Details

$_module
string
visibility
protected
default
final
false
static
false

$_params

array $_params = 'array'

Params to use when assembling URL

Details

$_params
array
visibility
protected
default
array
final
false
static
false
see
getHref()

$_resetParams

bool $_resetParams = 'true'

Whether params should be reset when assembling URL

Details

$_resetParams
bool
visibility
protected
default
true
final
false
static
false
see
getHref()

$_route

string $_route = ''

Route name to use when assembling URL

Details

$_route
string
visibility
protected
default
final
false
static
false
see
getHref()

$_urlHelper

Zend_Controller_Action_Helper_Url $_urlHelper = 'null'

Action helper for assembling URLs

Details

$_urlHelper
Zend_Controller_Action_Helper_Url
visibility
protected
default
null
final
false
static
true
see
getHref()

Methods

getAction

getAction( ) : string|null

Returns action name to use when assembling URL

Output
string|null
action name
Details
visibility
public
final
false
static
false
see
getHref()

getController

getController( ) : string|null

Returns controller name to use when assembling URL

Output
string|null
controller name or null
Details
visibility
public
final
false
static
false
see
getHref()

getHref

getHref( ) : string

Returns href for this page

This method uses {@link Zend_Controller_Action_Helper_Url} to assemble the href based on the page's properties.

Output
string
page href
Details
visibility
public
final
false
static
false

getModule

getModule( ) : string|null

Returns module name to use when assembling URL

Output
string|null
module name or null
Details
visibility
public
final
false
static
false
see
getHref()

getParams

getParams( ) : array

Returns params to use when assembling URL

Output
array
page params
Details
visibility
public
final
false
static
false
see
getHref()

getResetParams

getResetParams( ) : bool

Returns whether params should be reset when assembling URL

Output
bool
whether params should be reset when assembling URL
Details
visibility
public
final
false
static
false
see
getHref()

getRoute

getRoute( ) : string

Returns route name to use when assembling URL

Output
string
route name
Details
visibility
public
final
false
static
false
see
getHref()

isActive

isActive( bool $recursive = false ) : bool

Returns whether page should be considered active or not

This method will compare the page properties against the request object that is found in the front controller.

Arguments
$recursive
bool
[optional] whether page should be considered active if any child pages are active. Default is false.
Output
bool
whether page should be considered active or not
Details
visibility
public
final
false
static
false

setAction

setAction( string $action ) : Zend_Navigation_Page_Mvc

Sets action name to use when assembling URL

Arguments
$action
string
action name
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()
throws
if invalid $action is given

setController

setController( string|null $controller ) : Zend_Navigation_Page_Mvc

Sets controller name to use when assembling URL

Arguments
$controller
stringnull
controller name
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()
throws
if invalid controller name is given

setModule

setModule( string|null $module ) : Zend_Navigation_Page_Mvc

Sets module name to use when assembling URL

Arguments
$module
stringnull
module name
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()
throws
if invalid module name is given

setParams

setParams( array|null $params = null ) : Zend_Navigation_Page_Mvc

Sets params to use when assembling URL

Arguments
$params
arraynull
[optional] page params. Default is null which sets no params.
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()

setResetParams

setResetParams( bool $resetParams ) : Zend_Navigation_Page_Mvc

Sets whether params should be reset when assembling URL

Arguments
$resetParams
bool
whether params should be reset when assembling URL
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()

setRoute

setRoute( string $route ) : Zend_Navigation_Page_Mvc

Sets route name to use when assembling URL

Arguments
$route
string
route name to use when assembling URL
Output
Zend_Navigation_Page_Mvc
fluent interface, returns self
Details
visibility
public
final
false
static
false
see
getHref()
throws
if invalid $route is given

setUrlHelper

setUrlHelper( Zend_Controller_Action_Helper_Url $uh ) : void

Sets action helper for assembling URLs

Arguments
$uh
Zend_Controller_Action_Helper_Url
URL helper
Details
visibility
public
final
false
static
true
see
getHref()

toArray

toArray( ) : array

Returns an array representation of the page

Output
array
associative array containing all page properties
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.