示例#1
0
文件: route.php 项目: Ermile/Saloos
 function max($max)
 {
     $url = \lib\router::get_url(-1);
     if (count($url) > 0 && \lib\router::get_class() == $url[0]) {
         array_shift($url);
     }
     if (count($url) > 0 && \lib\router::get_method() == $url[0]) {
         array_shift($url);
     }
     if (count($url) > $max) {
         $this->status = false;
     }
 }
示例#2
0
文件: config.php 项目: Ermile/Saloos
 public function ALL($route = null)
 {
     if ($route === null) {
         $this_url = '';
         if (\lib\router::get_class() != 'home') {
             $this_url = \lib\router::get_class();
         }
         if (\lib\router::get_method() != 'home') {
             $this_url .= '/' . \lib\router::get_method();
         }
         $route = array($this_url);
     } else {
         $route = func_get_args();
     }
     $this->REST(...$route)->SERVER();
     return $this;
 }