diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 9a15612..652de50 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */ diff --git a/src/Exception/PageNotFoundException.php b/src/Exception/PageNotFoundException.php index 1ae6b71..7d5843b 100644 --- a/src/Exception/PageNotFoundException.php +++ b/src/Exception/PageNotFoundException.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */ diff --git a/src/Exception/RouterException.php b/src/Exception/RouterException.php index a900ea2..f3b5925 100644 --- a/src/Exception/RouterException.php +++ b/src/Exception/RouterException.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */ diff --git a/src/Middleware.php b/src/Middleware.php index ee8597f..cd7efc1 100644 --- a/src/Middleware.php +++ b/src/Middleware.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */ diff --git a/src/Router.php b/src/Router.php index fc649f5..4f28d3d 100644 --- a/src/Router.php +++ b/src/Router.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */ @@ -875,13 +875,13 @@ private function middleware_class_find(string $class): string if(!isset($this->current_route) || \class_exists($class)){ return $class; } - $namespace = $this->current_route['namespaces']['middleware']; + $namespace = $this->current_route['options']['namespaces']['middleware']; $class_full_name = \rtrim($namespace, '\\') . '\\' . \ltrim($class, '\\'); if(\class_exists($class_full_name)){ return $class_full_name; } - if(!empty($this->current_route['paths']['middleware'])){ - $path = \rtrim($this->current_route['paths']['middleware'], '/\\') . \DIRECTORY_SEPARATOR . \ltrim($class, '\\/') . '.php'; + if(!empty($this->current_route['options']['paths']['middleware'])){ + $path = \rtrim($this->current_route['options']['paths']['middleware'], '/\\') . \DIRECTORY_SEPARATOR . \ltrim($class, '\\/') . '.php'; if(\is_file($path)){ require $path; if(\class_exists($class_full_name)){ diff --git a/src/Uri.php b/src/Uri.php index 7ba7e44..e774f18 100644 --- a/src/Uri.php +++ b/src/Uri.php @@ -7,7 +7,7 @@ * @author Muhammet ŞAFAK * @copyright Copyright © 2022 Muhammet ŞAFAK * @license ./LICENSE MIT - * @version 1.1.2 + * @version 1.1.3 * @link https://www.muhammetsafak.com.tr */