<?php
/*
Class: xajaxResponsePlugin
Base class for all xajax response plugins.
A response plugin provides additional services not already provided by the
<xajaxResponse> class with regard to sending response commands to the
client. In addition, a response command may send javascript to the browser
at page load to aid in the processing of it's response commands.
*/
class xajaxResponsePlugin extends xajaxPlugin
{
/*
Object: objResponse
A reference to the current <xajaxResponse> object that is being used
to build the response that will be sent to the client browser.
*/
var $objResponse;
/*
Function: setResponse
Called by the <xajaxResponse> object that is currently being used
to build the response that will be sent to the client browser.
objResponse - (object): A reference to the <xajaxResponse> object
*/
function setResponse(&$objResponse)
{
$this->objResponse =& $objResponse;
}
/*
Function: addCommand
Used internally to add a command to the response command list. This
will call <xajaxResponse->addPluginCommand> using the reference provided
in <xajaxResponsePlugin->setResponse>.
*/
function addCommand($aAttributes, $sData)
{
$this->objResponse->addPluginCommand($this, $aAttributes, $sData);
}
/*
Function: getName
Called by the <xajaxPluginManager> when the user script requests a plugin.
This name must match the plugin name requested in the called to
<xajaxResponse->plugin>.
*/
function getName()
{
//SkipDebug
$objLanguageManager =& xajaxLanguageManager::getInstance();
trigger_error(
$objLanguageManager->getText('XJXPLG:GNERR:01')
, E_USER_ERROR
);
//EndSkipDebug
}
/*
Function: process
Called by <xajaxResponse> when a user script requests the service of a
response plugin. The parameters provided by the user will be used to
determine which response command and parameters will be sent to the
client upon completion of the xajax request process.
*/
function process()
{
//SkipDebug
$objLanguageManager =& xajaxLanguageManager::getInstance();
trigger_error(
$objLanguageManager->getText('XJXPLG:PERR:01')
, E_USER_ERROR
);
//EndSkipDebug
}
}