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.
boolean $_closeSessionOnExit = 'true'
Whether or not to close the session before exiting
int $_code = '302'
HTTP status code for redirects
boolean $_exit = 'true'
Whether or not calls to _redirect() should exit script execution
boolean $_prependBase = 'true'
Whether or not _redirect() should attempt to prepend the base URL to the passed URL (if it's a relative URL)
string $_redirectUrl = 'null'
Url to which to redirect
boolean $_useAbsoluteUri = 'false'
Whether or not to use an absolute URI when redirecting
__call(
string $method, array $args
)
:
mixed
Overloading
Overloading for old 'goto', 'setGoto', and 'gotoAndExit' methods
_checkCode(
int $code
)
:
true
Validate HTTP status redirect code
_prependBase(
string $url
)
:
string
Determine if the baseUrl should be prepended, and prepend if necessary
_redirect(
$url
)
:
void
Set redirect in response object
direct(
string $action, string $controller
=
null, string $module
=
null, array $params
=
array
)
:
void
direct(): Perform helper when called as $this->_helper->redirector($action, $controller, $module, $params)
getCloseSessionOnExit(
)
:
boolean
Retrieve flag for whether or not {@link redirectAndExit()} shall close the session before exiting.
getCode(
)
:
int
Retrieve HTTP status code to emit on {@link _redirect()} call
getExit(
)
:
boolean
Retrieve flag for whether or not {@link _redirect()} will exit when finished.
getPrependBase(
)
:
boolean
Retrieve flag for whether or not {@link _redirect()} will prepend the base URL on relative URLs
getRedirectUrl(
)
:
string
Retrieve currently set URL for redirect
getUseAbsoluteUri(
)
:
boolean
Return use absolute URI flag
gotoRoute(
array $urlOptions
=
array, string $name
=
null, boolean $reset
=
false, boolean $encode
=
true
)
:
void
Redirect to a route-based URL
Uses route's assemble method tobuild the URL; route is specified by $name; default route is used if none provided.
gotoRouteAndExit(
array $urlOptions
=
array, string $name
=
null, boolean $reset
=
false
)
:
void
Redirect to a route-based URL, and immediately exit
Uses route's assemble method tobuild the URL; route is specified by $name; default route is used if none provided.
gotoSimple(
string $action, string $controller
=
null, string $module
=
null, array $params
=
array
)
:
void
Perform a redirect to an action/controller/module with params
gotoSimpleAndExit(
mixed $action, mixed $controller
=
null, mixed $module
=
null, array $params
=
array
)
:
void
Perform a redirect to an action/controller/module with params, forcing an immdiate exit
gotoUrl(
string $url, array $options
=
array
)
:
void
Perform a redirect to a url
gotoUrlAndExit(
string $url, array $options
=
array
)
:
void
Set a URL string for a redirect, perform redirect, and immediately exit
redirectAndExit(
)
:
void
exit(): Perform exit for redirector
setCloseSessionOnExit(
boolean $flag
)
:
Zend_Controller_Action_Helper_Redirector
Set flag for whether or not {@link redirectAndExit()} shall close the session before exiting.
setCode(
int $code
)
:
Zend_Controller_Action_Helper_Redirector
Retrieve HTTP status code for {@link _redirect()} behaviour
setExit(
boolean $flag
)
:
Zend_Controller_Action_Helper_Redirector
Retrieve exit flag for {@link _redirect()} behaviour
setGotoRoute(
array $urlOptions
=
array, string $name
=
null, boolean $reset
=
false, boolean $encode
=
true
)
:
void
Build a URL based on a route
setGotoSimple(
string $action, string $controller
=
null, string $module
=
null, array $params
=
array
)
:
void
Set a redirect URL of the form /module/controller/action/params
setGotoUrl(
string $url, array $options
=
array
)
:
void
Set a redirect URL string
By default, emits a 302 HTTP status header, prepends base URL as defined in request object if url is relative, and halts script execution by calling exit().
$options is an optional associative array that can be used to control redirect behaviour. The available option keys are: - exit: boolean flag indicating whether or not to halt script execution when done - prependBase: boolean flag indicating whether or not to prepend the base URL when a relative URL is provided - code: integer HTTP status code to use with redirect. Should be between 300 and 307.
_redirect() sets the Location header in the response object. If you set the exit flag to false, you can override this header later in code execution.
If the exit flag is true (true by default), _redirect() will write and close the current session, if any.
setPrependBase(
boolean $flag
)
:
Zend_Controller_Action_Helper_Redirector
Retrieve 'prepend base' flag for {@link _redirect()} behaviour
setUseAbsoluteUri(
boolean $flag
=
true
)
:
Zend_Controller_Action_Helper_Redirector
Set use absolute URI flag