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


PHP Mapper::parse方法代码示例

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


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

示例1: normalize

 protected static function normalize($request)
 {
     if (is_null($request)) {
         $request = Mapper::parse();
     }
     $request['controller'] = Inflector::hyphenToUnderscore($request['controller']);
     $request['action'] = Inflector::hyphenToUnderscore($request['action']);
     return $request;
 }
开发者ID:spaghettiphp,项目名称:spaghettiphp,代码行数:9,代码来源:Dispatcher.php

示例2: dispatch

 /**
  *  Chama o controller e a action solicitadas pela URL.
  * 
  *  @return mixed Instância do novo controller ou falso em caso de erro
  */
 public function dispatch()
 {
     $path = Mapper::parse();
     $path["controller"] = Inflector::hyphenToUnderscore($path["controller"]);
     $path["action"] = Inflector::hyphenToUnderscore($path["action"]);
     $controller_name = Inflector::camelize($path["controller"]) . "Controller";
     if ($controller =& ClassRegistry::load($controller_name, "Controller")) {
         if (!can_call_method($controller, $path['action']) && !App::path("View", "{$path['controller']}/{$path['action']}.{$path['extension']}")) {
             $this->error("missingAction", array("controller" => $path["controller"], "action" => $path["action"]));
             return false;
         }
     } else {
         if (App::path("View", "{$path['controller']}/{$path['action']}.{$path['extension']}")) {
             $controller =& ClassRegistry::load("AppController", "Controller");
         } else {
             $this->error("missingController", array("controller" => $path["controller"]));
             return false;
         }
     }
     $controller->params = $path;
     $controller->componentEvent("initialize");
     $controller->beforeFilter();
     $controller->componentEvent("startup");
     if (in_array($path["action"], $controller->methods) && can_call_method($controller, $path["action"])) {
         $params = $path["params"];
         if (!is_null($path["id"])) {
             $params = array_merge(array($path["id"]), $params);
         }
         call_user_func_array(array(&$controller, $path["action"]), $params);
     }
     if ($controller->autoRender) {
         $controller->render();
     }
     $controller->componentEvent("shutdown");
     echo $controller->output;
     $controller->afterFilter();
     return $controller;
 }
开发者ID:vfeitoza,项目名称:spaghettiphp,代码行数:43,代码来源:dispatcher.php

示例3: urlParams

 /**
  * Define os parâmetros da url
  * 
  * @return void
  */
 private function urlParams()
 {
     $this->urlParams = Mapper::parse();
 }
开发者ID:klawdyo,项目名称:spaghetti-lib,代码行数:9,代码来源:XgridHelper.php

示例4: __construct

 /**
  * Construtor
  */
 public function __construct()
 {
     $params = Mapper::parse();
     if ($params['prefix'] == $this->privatePrefix) {
         $this->isPrivate = true;
     }
 }
开发者ID:klawdyo,项目名称:spaghettiphp,代码行数:10,代码来源:XmenuHelper.php


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