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; } }
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; }