Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=null) | |
Constructor. | |
init () | |
Initialize at start of action controller. | |
setOptions (array $options) | |
Configure object from array of options. | |
setConfig (Zend_Config $config) | |
Set object state from config object. | |
direct () | |
Strategy pattern: return object. | |
initContext ($format=null) | |
Initialize context detection and switching. | |
initJsonContext () | |
JSON context extra initialization. | |
setAutoJsonSerialization ($flag) | |
Should JSON contexts auto-serialize? | |
getAutoJsonSerialization () | |
Get JSON context auto-serialization flag. | |
setSuffix ($context, $suffix, $prependViewRendererSuffix=true) | |
Customize view script suffix to use when switching context. | |
getSuffix ($type) | |
Retrieve suffix for given context type. | |
hasContext ($context, $throwException=false) | |
Does the given context exist? | |
addHeader ($context, $header, $content) | |
Add header to context. | |
setHeader ($context, $header, $content) | |
Customize response header to use when switching context. | |
addHeaders ($context, array $headers) | |
Add multiple headers at once for a given context. | |
setHeaders ($context, array $headers) | |
Set multiple headers at once for a given context. | |
getHeader ($context, $header) | |
Retrieve context header. | |
getHeaders ($context) | |
Retrieve context headers. | |
removeHeader ($context, $header) | |
Remove a single header from a context. | |
clearHeaders ($context) | |
Clear all headers for a given context. | |
setCallback ($context, $trigger, $callback) | |
Set a callback for a given context and trigger. | |
setCallbacks ($context, array $callbacks) | |
Set callbacks for a given context. | |
getCallback ($context, $trigger) | |
Get a single callback for a given context and trigger. | |
getCallbacks ($context) | |
Get all callbacks for a given context. | |
removeCallback ($context, $trigger) | |
Clear a callback for a given context and trigger. | |
clearCallbacks ($context) | |
Clear all callbacks for a given context. | |
setContextParam ($name) | |
Set name of parameter to use when determining context format. | |
getContextParam () | |
Return context format request parameter name. | |
setDefaultContext ($type) | |
Indicate default context to use when no context format provided. | |
getDefaultContext () | |
Return default context. | |
setAutoDisableLayout ($flag) | |
Set flag indicating if layout should be disabled. | |
getAutoDisableLayout () | |
Retrieve auto layout disable flag. | |
addContext ($context, array $spec) | |
Add new context. | |
setContext ($context, array $spec) | |
Overwrite existing context. | |
addContexts (array $contexts) | |
Add multiple contexts. | |
setContexts (array $contexts) | |
Set multiple contexts, after first removing all. | |
getContext ($context) | |
Retrieve context specification. | |
getContexts () | |
Retrieve context definitions. | |
removeContext ($context) | |
Remove a context. | |
clearContexts () | |
Remove all contexts. | |
getCurrentContext () | |
Return current context, if any. | |
postDispatch () | |
Post dispatch processing. | |
postJsonContext () | |
JSON post processing. | |
addActionContext ($action, $context) | |
Add one or more contexts to an action. | |
setActionContext ($action, $context) | |
Set a context as available for a given controller action. | |
addActionContexts (array $contexts) | |
Add multiple action/context pairs at once. | |
setActionContexts (array $contexts) | |
Overwrite and set multiple action contexts at once. | |
hasActionContext ($action, $context) | |
Does a particular controller action have the given context(s)? | |
getActionContexts ($action=null) | |
Get contexts for a given action or all actions in the controller. | |
removeActionContext ($action, $context) | |
Remove one or more contexts for a given controller action. | |
clearActionContexts ($action=null) | |
Clear all contexts for a given controller action or all actions. | |
![]() | |
setActionController (Zend_Controller_Action $actionController=null) | |
setActionController() | |
getActionController () | |
Retrieve current action controller. | |
getFrontController () | |
Retrieve front controller instance. | |
init () | |
Hook into action controller initialization. | |
preDispatch () | |
Hook into action controller preDispatch() workflow. | |
postDispatch () | |
Hook into action controller postDispatch() workflow. | |
getRequest () | |
getRequest() - | |
getResponse () | |
getResponse() - | |
getName () | |
getName() | |
Public Attributes | |
const | TRIGGER_INIT = 'TRIGGER_INIT' |
Trigger type constants. | |
const | TRIGGER_POST = 'TRIGGER_POST' |
Protected Member Functions | |
_setSuffix (array $spec) | |
Set suffix from array. | |
_setHeaders (array $options) | |
Set headers from context => headers pairs. | |
_validateTrigger ($trigger) | |
Validate trigger and return in normalized form. | |
_setCallbacks (array $options) | |
Set callbacks from array of context => callbacks pairs. | |
_getViewRenderer () | |
Retrieve ViewRenderer. | |
Protected Attributes | |
$_contexts = array() | |
$_autoJsonSerialization = true | |
$_contextKey = 'contexts' | |
$_contextParam = 'format' | |
$_currentContext | |
$_defaultContext = 'xml' | |
$_disableLayout = true | |
$_specialConfig | |
$_unconfigurable | |
$_viewRenderer | |
$_viewSuffixOrig | |
![]() | |
$_actionController = null | |
$_actionController | |
$_frontController = null | |
__construct | ( | $options = null | ) |
|
protected |
Retrieve ViewRenderer.
|
protected |
Set callbacks from array of context => callbacks pairs.
array | $options |
|
protected |
Set headers from context => headers pairs.
array | $options |
|
protected |
Set suffix from array.
array | $spec |
|
protected |
Validate trigger and return in normalized form.
string | $trigger |
Zend_Controller_Action_Exception |
addActionContext | ( | $action, | |
$context | |||
) |
Add one or more contexts to an action.
string | $action | |
string | array | $context |
addActionContexts | ( | array | $contexts | ) |
Add multiple action/context pairs at once.
array | $contexts |
addContext | ( | $context, | |
array | $spec | ||
) |
Add new context.
string | $context | Context type |
array | $spec | Context specification |
Zend_Controller_Action_Exception |
addContexts | ( | array | $contexts | ) |
Add multiple contexts.
array | $contexts |
addHeader | ( | $context, | |
$header, | |||
$content | |||
) |
Add header to context.
string | $context | |
string | $header | |
string | $content |
Zend_Controller_Action_Exception |
addHeaders | ( | $context, | |
array | $headers | ||
) |
Add multiple headers at once for a given context.
string | $context | |
array | $headers |
clearActionContexts | ( | $action = null | ) |
Clear all contexts for a given controller action or all actions.
string | $action |
clearCallbacks | ( | $context | ) |
Clear all callbacks for a given context.
string | $context |
clearContexts | ( | ) |
Remove all contexts.
clearHeaders | ( | $context | ) |
Clear all headers for a given context.
string | $context |
direct | ( | ) |
Strategy pattern: return object.
getActionContexts | ( | $action = null | ) |
Get contexts for a given action or all actions in the controller.
string | $action |
getAutoDisableLayout | ( | ) |
Retrieve auto layout disable flag.
getAutoJsonSerialization | ( | ) |
Get JSON context auto-serialization flag.
getCallback | ( | $context, | |
$trigger | |||
) |
Get a single callback for a given context and trigger.
string | $context | |
string | $trigger |
getCallbacks | ( | $context | ) |
Get all callbacks for a given context.
string | $context |
getContext | ( | $context | ) |
Retrieve context specification.
string | $context |
getContextParam | ( | ) |
Return context format request parameter name.
getContexts | ( | ) |
Retrieve context definitions.
getCurrentContext | ( | ) |
Return current context, if any.
getDefaultContext | ( | ) |
Return default context.
getHeader | ( | $context, | |
$header | |||
) |
Retrieve context header.
Returns the value of a given header for a given context type
string | $context | |
string | $header |
getHeaders | ( | $context | ) |
Retrieve context headers.
Returns all headers for a context as key/value pairs
string | $context |
getSuffix | ( | $type | ) |
Retrieve suffix for given context type.
string | $type | Context type |
Zend_Controller_Action_Exception |
hasActionContext | ( | $action, | |
$context | |||
) |
Does a particular controller action have the given context(s)?
string | $action | |
string | array | $context |
Zend_Controller_Action_Exception |
hasContext | ( | $context, | |
$throwException = false |
|||
) |
Does the given context exist?
string | $context | |
boolean | $throwException |
Zend_Controller_Action_Exception | if context does not exist and throwException is true |
init | ( | ) |
Initialize at start of action controller.
Reset the view script suffix to the original state, or store the original state.
initContext | ( | $format = null | ) |
Initialize context detection and switching.
mixed | $format |
Zend_Controller_Action_Exception |
initJsonContext | ( | ) |
JSON context extra initialization.
Turns off viewRenderer auto-rendering
postDispatch | ( | ) |
Post dispatch processing.
Execute postDispatch callback for current context, if available
Zend_Controller_Action_Exception |
postJsonContext | ( | ) |
removeActionContext | ( | $action, | |
$context | |||
) |
Remove one or more contexts for a given controller action.
string | $action | |
string | array | $context |
removeCallback | ( | $context, | |
$trigger | |||
) |
Clear a callback for a given context and trigger.
string | $context | |
string | $trigger |
removeContext | ( | $context | ) |
Remove a context.
string | $context |
removeHeader | ( | $context, | |
$header | |||
) |
Remove a single header from a context.
string | $context | |
string | $header |
setActionContext | ( | $action, | |
$context | |||
) |
Set a context as available for a given controller action.
string | $action | |
string | array | $context |
setActionContexts | ( | array | $contexts | ) |
Overwrite and set multiple action contexts at once.
array | $contexts |
setAutoDisableLayout | ( | $flag | ) |
Set flag indicating if layout should be disabled.
boolean | $flag |
setAutoJsonSerialization | ( | $flag | ) |
Should JSON contexts auto-serialize?
boolean | $flag |
setCallback | ( | $context, | |
$trigger, | |||
$callback | |||
) |
Set a callback for a given context and trigger.
string | $context | |
string | $trigger | |
string | array | $callback |
Zend_Controller_Action_Exception |
setCallbacks | ( | $context, | |
array | $callbacks | ||
) |
Set callbacks for a given context.
Callbacks should be in trigger/callback pairs.
string | $context | |
array | $callbacks |
setConfig | ( | Zend_Config | $config | ) |
Set object state from config object.
Zend_Config | $config |
setContext | ( | $context, | |
array | $spec | ||
) |
Overwrite existing context.
string | $context | Context type |
array | $spec | Context specification |
setContextParam | ( | $name | ) |
Set name of parameter to use when determining context format.
string | $name |
setContexts | ( | array | $contexts | ) |
Set multiple contexts, after first removing all.
array | $contexts |
setDefaultContext | ( | $type | ) |
Indicate default context to use when no context format provided.
string | $type |
Zend_Controller_Action_Exception |
setHeader | ( | $context, | |
$header, | |||
$content | |||
) |
Customize response header to use when switching context.
Passing an empty header value to the setters disables the response header.
string | $type | Context type for which to set suffix |
string | $header | Header to set |
string | $content | Header content |
setHeaders | ( | $context, | |
array | $headers | ||
) |
Set multiple headers at once for a given context.
string | $context | |
array | $headers |
setOptions | ( | array | $options | ) |
Configure object from array of options.
array | $options |
setSuffix | ( | $context, | |
$suffix, | |||
$prependViewRendererSuffix = true |
|||
) |
Customize view script suffix to use when switching context.
Passing an empty suffix value to the setters disables the view script suffix change.
string | $context | Context type for which to set suffix |
string | $suffix | Suffix to use |
boolean | $prependViewRendererSuffix | Whether or not to prepend the new suffix to the viewrenderer suffix |
Zend_Controller_Action_Exception |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const TRIGGER_INIT = 'TRIGGER_INIT' |
Trigger type constants.
const TRIGGER_POST = 'TRIGGER_POST' |