示例#1
0
文件: Cola.php 项目: hihus/colaphp
 /**
  * Get dispatch info
  *
  * @param boolean $init
  * @return array
  */
 public function getDispatchInfo($init = false)
 {
     if (null === $this->dispatchInfo && $init) {
         $this->router || ($this->router = new Cola_Router());
         if ($urls = self::getConfig('_urls')) {
             $this->router->rules += $urls;
         }
         $this->pathInfo || ($this->pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '');
         $this->dispatchInfo = $this->router->match($this->pathInfo);
     }
     return $this->dispatchInfo;
 }