// A function was not found. Let's check callable objects if( ($p = strpos($sFunctionName,'_')) !== false) { $calledObj = substr($sFunctionName, 0, $p); if(isset($aCallableObjects[$calledObj])) { $calledMethod = substr($sFunctionName,$p+1 ); // Include any external dependencies associated with this object if (isset($aCallableObjects[$calledObj]['include'])) { //ob_start(); require_once($aCallableObjects[$calledObj]['include']); //ob_end_clean(); } if (class_exists($calledObj,false)) { $aCalledObject = new $calledObj; if (method_exists($aCalledObject, $calledMethod) || method_exists($aCalledObject, "__call")) { // Attemping to call the object $objTempResponse = call_user_func_array(array(&$aCalledObject, $calledMethod), $aArgs); if (!$this->_objXajax->getFlag("allowAllResponseTypes") && !is_a($objTempResponse, 'xajaxResponse')) { $this->_outputError("No xajaxResponse Was Returned By Method $calledMethod of " . $calledObject); return; } else if ($this->_objXajax->getFlag("allowAllResponseTypes") && !is_a($objTempResponse, 'xajaxResponse')) { print $objTempResponse; exit; } if ($objTempResponse != $objResponse) { // Load any previous response commands into the new response object $objTempResponse->loadCommands($objResponse, true); } // We're successful; output the response now! $this->_outputResponse($objTempResponse); return; } else { $this->_outputError("Method $calledMethod of $calledObject does not exist"); return; } } else { $this->_outputError("Class $calledObj is not defined"); return; } } else { $this->_outputError("Class $calledObj is not registered"); return; } }