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


PHP Command::getCommand方法代码示例

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


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

示例1: init

 function init()
 {
     $db = DataBase::getinstance();
     $db->begin();
     if (!$db->istable('plugin_referrer')) {
         $db->exec(file_get_contents(PLUGIN_DIR . 'referrer/referrer.sql'));
     }
     $db->commit();
     Command::getCommand('show')->attach($this);
 }
开发者ID:riaf,项目名称:kinowiki,代码行数:10,代码来源:referrer.inc.php

示例2: __construct

 /**
  * Constructor 
  */
 public function __construct()
 {
     // settings of the page being excuted.
     if (empty(Vars::$get['plugin']) && (empty(Vars::$get['cmd']) || mb_strtolower(Vars::$get['cmd']) == 'show')) {
         if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '') {
             $this->page = Page::getInstance(rawurldecode($_SERVER['PATH_INFO']));
         } else {
             if (isset(Vars::$get['page']) && Vars::$get['page'] != '') {
                 $this->page = Page::getInstance(Vars::$get['page']);
             } else {
                 if (isset(Vars::$get['n']) && Vars::$get['n'] != '') {
                     $this->page = Page::getinstancebynum(Vars::$get['n']);
                 } else {
                     if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
                         $this->page = Page::getInstance(rawurldecode($_SERVER['QUERY_STRING']));
                     } else {
                         $this->page = Page::getInstance(DEFAULTPAGE);
                     }
                 }
             }
         }
     } else {
         $this->page = Page::getInstance('');
     }
     // get a controller to execute
     if (isset(Vars::$get['cmd']) && Vars::$get['cmd'] != '') {
         $this->controller = Command::getCommand(Vars::$get['cmd']);
     } else {
         if (isset(Vars::$get['plugin']) && Vars::$get['plugin'] != '') {
             $this->controller = Plugin::getPlugin(Vars::$get['plugin']);
         } else {
             $this->controller = Command::getCommand('show');
         }
     }
 }
开发者ID:kaz6120,项目名称:BitWiki,代码行数:38,代码来源:BitWiki.php

示例3: __construct

 /**
  * コンストラクタ
  */
 function __construct()
 {
     //実行中ページの設定
     if (empty(Vars::$get['plugin']) && (empty(Vars::$get['cmd']) || mb_strtolower(Vars::$get['cmd']) == 'show')) {
         if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '') {
             $this->page = Page::getinstance(rawurldecode($_SERVER['PATH_INFO']));
         } else {
             if (isset(Vars::$get['page']) && Vars::$get['page'] != '') {
                 $this->page = Page::getinstance(Vars::$get['page']);
             } else {
                 if (isset(Vars::$get['n']) && Vars::$get['n'] != '') {
                     $this->page = Page::getinstancebynum(Vars::$get['n']);
                 } else {
                     if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') {
                         $this->page = Page::getinstance(rawurldecode($_SERVER['QUERY_STRING']));
                     } else {
                         $this->page = Page::getinstance(DEFAULTPAGE);
                     }
                 }
             }
         }
     } else {
         $this->page = Page::getinstance('');
     }
     //実行するControllerの取得
     if (isset(Vars::$get['cmd']) && Vars::$get['cmd'] != '') {
         $this->controller = Command::getCommand(Vars::$get['cmd']);
     } else {
         if (isset(Vars::$get['plugin']) && Vars::$get['plugin'] != '') {
             $this->controller = Plugin::getPlugin(Vars::$get['plugin']);
         } else {
             $this->controller = Command::getCommand('show');
         }
     }
 }
开发者ID:riaf,项目名称:kinowiki,代码行数:38,代码来源:kinowiki.inc.php

示例4: init

 function init()
 {
     Command::getCommand('show')->attach($this);
 }
开发者ID:kaz6120,项目名称:BitWiki,代码行数:4,代码来源:backlink.inc.php


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