diff --git a/src/Nono/Application.php b/src/Nono/Application.php index 0421342..215dc23 100644 --- a/src/Nono/Application.php +++ b/src/Nono/Application.php @@ -141,7 +141,7 @@ public function run() * @param array $params * @throws \Exception */ - private function call($action, $params) + protected function call($action, $params) { if ($action instanceof \Closure) { $action(...$params); @@ -162,7 +162,7 @@ private function call($action, $params) * * @param \Exception $e */ - private function handleException(\Exception $e) + protected function handleException(\Exception $e) { echo $e->getMessage(); } diff --git a/src/Nono/Router.php b/src/Nono/Router.php index f124609..332b691 100644 --- a/src/Nono/Router.php +++ b/src/Nono/Router.php @@ -69,7 +69,7 @@ public function route($verb, $uri) * @var string $verb * @return array */ - private function routes($verb) + protected function routes($verb) { return isset($this->routes[$verb]) ? $this->routes[$verb] : []; } @@ -83,7 +83,7 @@ private function routes($verb) * @param array $routes * @return array */ - private function match($uri, $routes) + protected function match($uri, $routes) { if (!preg_match($this->combine($routes), $uri, $m)) { return []; @@ -105,7 +105,7 @@ private function match($uri, $routes) * @var string $str * @return string */ - private function pattern($str) + protected function pattern($str) { return preg_replace('~\{([a-zA-Z0-9]+)\}~', '([^/]+)', $str); } @@ -119,7 +119,7 @@ private function pattern($str) * @var array $routes * @return string */ - private function combine($routes) + protected function combine($routes) { $str = $mark = ''; foreach ($routes as $id => $data) {