getRoutes() as $route) { $path = trim((string) $route['path']); $target = trim((string) $route['target']); if ($path !== '' && $target !== '') { Router::addRoute($path, $target); } } }