当前位置: 首页>>代码示例>>PHP>>正文


PHP xajax::setWrapperPrefix方法代码示例

本文整理汇总了PHP中xajax::setWrapperPrefix方法的典型用法代码示例。如果您正苦于以下问题:PHP xajax::setWrapperPrefix方法的具体用法?PHP xajax::setWrapperPrefix怎么用?PHP xajax::setWrapperPrefix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xajax的用法示例。


在下文中一共展示了xajax::setWrapperPrefix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: router

 public static function router($app, $module, $event, $params, $ajax_conf = array(), $name_utility = '')
 {
     $security = APP_PATH . $app . DS . 'security.php';
     include $security;
     # Es una utilidad?
     if ($name_utility) {
         $pathScript = ROOT_PATH . DS . 'resources' . DS . 'utility' . DS . $name_utility . '.php';
         include $pathScript;
     } else {
         $pathModel = APP_PATH . $app . DS . $module . DS . 'dataModel.php';
         $pathHandler = APP_PATH . $app . DS . $module . DS . 'handlerEvent.php';
         $pathIndex = APP_PATH . $app . DS . $module . DS . 'index.php';
         if (file_exists($pathIndex)) {
             include $pathModel;
             include $pathHandler;
             if (class_exists('controller')) {
                 global $objAjax;
                 switch (AJAX_ENGINE) {
                     case 'xajax':
                         require PLUGINS_PATH . 'xajax/xajax_core/xajax.inc.php';
                         # Agilizar el rendimiento
                         $objxAjax = new xajax();
                         $objxAjax->setFlag("debug", $ajax_conf[AJAX_ENGINE]['debug']);
                         $objxAjax->setFlag('decodeUTF8Input', $ajax_conf[AJAX_ENGINE]['decodeUTF8Input']);
                         $objxAjax->setWrapperPrefix($ajax_conf[AJAX_ENGINE]['wrapper_prefix']);
                         $GLOBALS['objAjax'] = $objxAjax;
                         define('PATH_XAJAX_JS', 'plugin/xajax/');
                         break;
                 }
                 $controller = new controller();
                 $controller->processRequest();
                 if (method_exists($controller, $event)) {
                     $reflectionMethod = new ReflectionMethod('controller', $event);
                     $reflectionMethod->invokeArgs($controller, $params);
                 } else {
                     if ($event != 'default_event') {
                         $msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b>&nbsp;' . OPF_myLang::getPhrase('ROUTER_METHOD_NOT_FOUND') . '&nbsp;&quot;' . $event . '&quot;</div>';
                         die($msgError);
                     }
                 }
                 include $pathIndex;
             } else {
                 $msgError = '<div class="error"><b>' . OPF_myLang::getPhrase('ERROR_LABEL') . ':</b>&nbsp;' . OPF_myLang::getPhrase('ROUTER_CLASS_NOT_FOUND') . '&nbsp;&quot;' . 'controller' . '&quot;</div>';
                 die($msgError);
             }
         } else {
             die('Error: 404 / The module "' . $app . '/' . $module . '" does not exist.');
         }
     }
 }
开发者ID:nextbook438,项目名称:osezno-php-framework,代码行数:50,代码来源:router.php

示例2: xajax

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
require_once ROOT_PATH . 'includes/xajax/xajax.inc.php';
$xajax_todo = new xajax("todo.server.php");
$_wrapper = 'x_';
//$xajax_todo->debugOn();
//$xajax_todo->statusMessagesOn();
$xajax_todo->setWrapperPrefix($_wrapper);
$xajax_todo->registerFunction("changeStatus");
$xajax_todo->registerFunction("incStatusBar");
$xajax_todo->registerFunction("getFormData");
$xajax_todo->registerFunction("restoreToDo");
$xajax_todo->registerFunction("deleteToDo");
$xajax_todo->registerFunction("getOpenTodos");
$xajax_todo->registerFunction("clear_todo_id");
// Functions for Employees-Part
$xajax_todo->registerFunction("changeEmplStatus");
$xajax_todo->registerFunction("setNewProjectList");
$xajax_todo->registerFunction("setNewToDoList");
$xajax_todo->registerFunction("getEmplData");
// Functions for Project-Part
$xajax_todo->registerFunction("changeProjectStatus");
$xajax_todo->registerFunction("setNewMemberList");
开发者ID:blowfishJ,项目名称:galaxyCode,代码行数:31,代码来源:todo.common.php


注:本文中的xajax::setWrapperPrefix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。