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


PHP MbqMain::cmd方法代码示例

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


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

示例1: action

 /**
  * action
  */
 public static function action()
 {
     parent::action();
     if (self::hasLogin()) {
         header('Mobiquo_is_login: true');
     } else {
         header('Mobiquo_is_login: false');
     }
     self::$oMbqConfig->calCfg();
     /* you should do some modify within this function in multiple different type applications! */
     if (!self::$oMbqConfig->pluginIsOpen()) {
         MbqError::alert('', "Plugin is not in service!");
     }
     if (isset($_GET['method_name']) && $_GET['method_name']) {
         //for more flexibility
         self::$cmd = $_GET['method_name'];
     }
     if (isset($_POST['method_name']) && $_POST['method_name']) {
         //for upload_attach and other post method
         self::$cmd = $_POST['method_name'];
         foreach ($_POST as $k => $v) {
             self::$input[$k] = $v;
         }
     }
     if (self::$cmd) {
         self::$cmd = (string) self::$cmd;
         //MbqError::alert('', self::$cmd);
         if (preg_match('/[A-Za-z0-9_]{1,128}/', self::$cmd)) {
             $arr = explode('_', self::$cmd);
             foreach ($arr as &$v) {
                 $v = ucfirst(strtolower($v));
             }
             $actionClassName = 'MbqAct' . implode('', $arr);
             if (self::$oClk->hasReg($actionClassName)) {
                 self::$oAct = self::$oClk->newObj($actionClassName);
                 self::$oAct->actionImplement();
             } else {
                 //MbqError::alert('', "Not support action for ".self::$cmd."!", '', MBQ_ERR_NOT_SUPPORT);
                 MbqError::alert('', "Sorry!This feature is not available in this forum.Method name:" . self::$cmd, '', MBQ_ERR_NOT_SUPPORT);
             }
         } else {
             MbqError::alert('', "Need valid cmd!");
         }
     } else {
         MbqError::alert('', "Need not empty cmd!");
     }
 }
开发者ID:ZerGabriel,项目名称:wbb,代码行数:50,代码来源:mobiquoCommon.php

示例2: action

 /**
  * action
  */
 public static function action()
 {
     parent::action();
     if (self::hasLogin()) {
         header('Mobiquo_is_login: true');
     } else {
         header('Mobiquo_is_login: false');
     }
     self::$oMbqConfig->calCfg();
     /* you should do some modify within this function in multiple different type applications! */
     if (!self::$oMbqConfig->pluginIsOpen()) {
         MbqError::alert('', self::$oMbqConfig->getPluginClosedMessage());
     }
     self::$cmd = self::getCurrentCmd();
     if (self::$cmd) {
         self::$cmd = (string) self::$cmd;
         //MbqError::alert('', self::$cmd);
         if (preg_match('/[A-Za-z0-9_]{1,128}/', self::$cmd)) {
             $arr = explode('_', self::$cmd);
             foreach ($arr as &$v) {
                 $v = ucfirst(strtolower($v));
             }
             $actionClassName = 'MbqAct' . implode('', $arr);
             if (self::$oClk->hasReg($actionClassName)) {
                 self::$oAct = self::$oClk->newObj($actionClassName);
                 self::$oAct->actionImplement(self::$oAct->getInput());
             } else {
                 //MbqError::alert('', "Not support action for ".self::$cmd."!", '', MBQ_ERR_NOT_SUPPORT);
                 MbqError::alert('', "Sorry!This feature is not available in this forum.Method name:" . self::$cmd, '', MBQ_ERR_NOT_SUPPORT);
             }
         } else {
             MbqError::alert('', "Need valid cmd!");
         }
     } else {
         if (empty($_POST) && empty($_GET)) {
             include MBQ_PATH . 'pluginstatus.php';
         } else {
             MbqError::alert('', "Need not empty cmd!");
         }
     }
 }
开发者ID:keweiliu6,项目名称:test-kunena3,代码行数:44,代码来源:mobiquoCommon.php


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