Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Controller_Action_Helper_AjaxContext Class Reference

Public Member Functions

 __construct ()
 Constructor.
 
 initContext ($format=null)
 Initialize AJAX context switching.
 
- Public Member Functions inherited from Zend_Controller_Action_Helper_ContextSwitch
 __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.
 
- Public Member Functions inherited from Zend_Controller_Action_Helper_Abstract
 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()
 

Protected Attributes

 $_contextKey = 'ajaxable'
 
- Protected Attributes inherited from Zend_Controller_Action_Helper_ContextSwitch
 $_contexts = array()
 
 $_autoJsonSerialization = true
 
 $_contextKey = 'contexts'
 
 $_contextParam = 'format'
 
 $_currentContext
 
 $_defaultContext = 'xml'
 
 $_disableLayout = true
 
 $_specialConfig
 
 $_unconfigurable
 
 $_viewRenderer
 
 $_viewSuffixOrig
 
- Protected Attributes inherited from Zend_Controller_Action_Helper_Abstract
 $_actionController = null
 $_actionController
 
 $_frontController = null
 

Additional Inherited Members

- Public Attributes inherited from Zend_Controller_Action_Helper_ContextSwitch
const TRIGGER_INIT = 'TRIGGER_INIT'
 Trigger type constants.
 
const TRIGGER_POST = 'TRIGGER_POST'
 
- Protected Member Functions inherited from Zend_Controller_Action_Helper_ContextSwitch
 _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.
 

Constructor & Destructor Documentation

__construct ( )

Constructor.

Add HTML context

Returns
void

Member Function Documentation

initContext (   $format = null)

Initialize AJAX context switching.

Checks for XHR requests; if detected, attempts to perform context switch.

Parameters
string$format
Returns
void

Member Data Documentation

$_contextKey = 'ajaxable'
protected