本文整理汇总了PHP中xajaxPluginManager::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP xajaxPluginManager::getInstance方法的具体用法?PHP xajaxPluginManager::getInstance怎么用?PHP xajaxPluginManager::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xajaxPluginManager
的用法示例。
在下文中一共展示了xajaxPluginManager::getInstance方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
function &_getSections($sType)
{
$objPluginManager =& xajaxPluginManager::getInstance();
$objPluginManager->configure('deferScriptGeneration', 'deferred');
$aSections = array();
// buffer output
ob_start();
$objPluginManager->generateClientScript();
$sScript = ob_get_clean();
// parse out blocks
$aParts = explode('</' . $sType . '>', $sScript);
foreach ($aParts as $sPart) {
$aValues = explode('<' . $sType, $sPart, 2);
if (2 == count($aValues)) {
list($sJunk, $sPart) = $aValues;
$aValues = explode('>', $sPart, 2);
if (2 == count($aValues)) {
list($sJunk, $sPart) = $aValues;
if (0 < strlen($sPart)) {
$aSections[] = $sPart;
}
}
}
}
$objPluginManager->configure('deferScriptGeneration', $this->bDeferScriptGeneration);
return $aSections;
}
示例2: xajaxResponse
function xajaxResponse()
{
//SkipDebug
if (0 < func_num_args()) {
$objLanguageManager = xajaxLanguageManager::getInstance();
trigger_error($objLanguageManager->getText('XJXRSP:EDERR:01'), E_USER_ERROR);
}
//EndSkipDebug
$this->aCommands = array();
$objResponseManager = xajaxResponseManager::getInstance();
$this->sCharacterEncoding = $objResponseManager->getCharacterEncoding();
$this->bOutputEntities = $objResponseManager->getOutputEntities();
$this->objPluginManager = xajaxPluginManager::getInstance();
}
示例3: __wakeup
function __wakeup()
{
ob_start();
$sLocalFolder = dirname(__FILE__);
//SkipAIO
require $sLocalFolder . '/xajaxPluginManager.inc.php';
require $sLocalFolder . '/xajaxLanguageManager.inc.php';
require $sLocalFolder . '/xajaxArgumentManager.inc.php';
require $sLocalFolder . '/xajaxResponseManager.inc.php';
require $sLocalFolder . '/xajaxRequest.inc.php';
require $sLocalFolder . '/xajaxResponse.inc.php';
//EndSkipAIO
// this is the list of folders where xajax will look for plugins
// that will be automatically included at startup.
$aPluginFolders = array();
$aPluginFolders[] = dirname($sLocalFolder) . '/xajax_plugins';
//SkipAIO
$aPluginFolders[] = $sLocalFolder . '/plugin_layer';
//EndSkipAIO
// Setup plugin manager
$this->objPluginManager =& xajaxPluginManager::getInstance();
$this->objPluginManager->loadPlugins($aPluginFolders);
$this->objLanguageManager =& xajaxLanguageManager::getInstance();
$this->objArgumentManager =& xajaxArgumentManager::getInstance();
$this->objResponseManager =& xajaxResponseManager::getInstance();
$this->sCoreIncludeOutput = ob_get_clean();
}
示例4: _getScriptFilename
echo '<';
echo '/script>';
echo $sCrLf;
}
}
}
/*
Function: _getScriptFilename
Returns the name of the script file, based on the current settings.
sFilename - (string): The base filename.
Returns:
string - The filename as it should be specified in the script tags
on the browser.
*/
private function _getScriptFilename($sFilename)
{
if ($this->bUseUncompressedScripts) {
return str_replace('.js', '_uncompressed.js', $sFilename);
}
return $sFilename;
}
}
/*
Register the xajaxIncludeClientScriptPlugin object with the xajaxPluginManager.
*/
$objPluginManager = xajaxPluginManager::getInstance();
$objPluginManager->registerPlugin(new xajaxIncludeClientScriptPlugin(), 99);
示例5: getJavascriptInclude
/**
* Returns a string containing a Javascript include of the xajax.js file
* along with a check to see if the file loaded after six seconds
* (typically called internally by xajax from get/printJavascript).
* (executes Javascript include plugin)
*
* @param string the relative address of the folder where xajax has been
* installed. For instance, if your PHP file is
* "http://www.myserver.com/myfolder/mypage.php"
* and xajax was installed in
* "http://www.myserver.com/anotherfolder", then $sJsURI
* should be set to "../anotherfolder". Defaults to assuming
* xajax is in the same folder as your PHP file.
* @param string the relative folder/file pair of the xajax Javascript
* engine located within the xajax installation folder.
* Defaults to xajax_js/xajax.js.
* @return string
*/
function getJavascriptInclude($sJsURI = "", $sJsFile = NULL)
{
$objPluginManager =& xajaxPluginManager::getInstance();
$objInclude = $objPluginManager->getIncludePlugin();
$objInclude->setXajax($this);
$objInclude->setFunctions($this->aFunctions);
return $objInclude->getJavascriptInclude($sJsURI, $sJsFile);
}
示例6:
/**
* Provides access to the xajaxResponse plugin system. If you use PHP 4 or
* 5, pass the plugin name as the first argument, the plugin's method name
* as the second argument, and subsequent arguments (if any) after that.
* Optionally, if you use PHP 5, you can pass just the plugin name as the
* first argument and the plugin object will be returned which you can use
* to call the appropriate method.
*
* @param string name of the plugin to call
*/
function &plugin($sName)
{
$objManager =& xajaxPluginManager::getInstance();
$objPlugin =& $objManager->getResponsePlugin($sName);
$objPlugin->setResponseObject($this);
$aArgs = func_get_args();
array_shift($aArgs);
if (!empty($aArgs)) {
$sMethodName = array_shift($aArgs);
call_user_func_array(array(&$objPlugin, $sMethodName), $aArgs);
}
return $objPlugin;
}
示例7: printJavascript
function printJavascript($sJsURI = "", $aJsFiles = array())
{
if (0 < strlen($sJsURI)) {
$this->configure("javascript URI", $sJsURI);
}
if (0 < count($aJsFiles)) {
$this->configure("javascript files", $aJsFiles);
}
$objPluginManager =& xajaxPluginManager::getInstance();
$objPluginManager->generateClientScript();
}
示例8: getName
echo "\n<script type='text/javascript' src='" . $this->sJavascriptURI . "dhtmlHistory.js' " . $this->sDefer . "charset='UTF-8'>\n";
}
}
function getName()
{
return "dhtmlHistoryPlugin";
}
function addWaypoint($sWaypointName, $aWaypointData)
{
$sWaypointData = base64_encode(serialize($aWaypointData));
$this->objResponse->script("dhtmlHistory.add('{$sWaypointName}({$sWaypointData})','')");
//$this->addCommand(array('cmd'=>'js'),"dhtmlHistory.add('$sWaypointName','$sWaypointData')" );
}
}
// register rsh plugin
$pluginManager =& xajaxPluginManager::getInstance();
$pluginManager->registerPlugin(new dhtmlHistoryPlugin());
/**
* xajax 0.5 plugin for backbutton and bookmark
*
* helper functions
*
*/
/**
* Adds a waypoint into the backbutton history
*
* @param unknown_type $objResponse
* @param string $sWaypointName
* @param mixed $sWaypointData
*/
function dhtmlHistoryAdd(&$objResponse, $sWaypointName, $sWaypointData)
示例9: func_get_args
function &plugin()
{
$aArgs = func_get_args();
if (0 < count($aArgs)) {
$sName = array_shift($aArgs);
$objPluginManager =& xajaxPluginManager::getInstance();
$objPlugin =& $objPluginManager->getPlugin($sName);
if (false !== $objPlugin) {
$objPlugin->setResponse($this);
if (0 < count($aArgs)) {
$sMethod = array_shift($aArgs);
$aFunction = array(&$objPlugin, $sMethod);
call_user_func_array($aFunction, $aArgs);
}
return $objPlugin;
} else {
$bReturn = false;
return $bReturn;
}
} else {
trigger_error("Error: Plugin name is missing or invalid.", E_USER_ERROR);
}
$bReturn = false;
return $bReturn;
}