From 053b8ecfad9c509cbc9e749667ef19ad0981f1d1 Mon Sep 17 00:00:00 2001 From: Brooke Bryan Date: Wed, 8 Nov 2023 23:58:10 +0000 Subject: [PATCH] Bind dispatch to the resource manager --- src/Dispatch.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Dispatch.php b/src/Dispatch.php index 7d08117..997bea4 100644 --- a/src/Dispatch.php +++ b/src/Dispatch.php @@ -212,10 +212,10 @@ public function handleRequest(Request $request): Response switch($type) { case ResourceManager::MAP_RESOURCES: - $manager = ResourceManager::resources(); + $manager = ResourceManager::resources([], $this); break; case ResourceManager::MAP_ALIAS: - $manager = ResourceManager::alias(array_shift($pathParts)); + $manager = ResourceManager::alias(array_shift($pathParts), [], $this); break; case ResourceManager::MAP_VENDOR: $vendor = array_shift($pathParts); @@ -227,10 +227,10 @@ public function handleRequest(Request $request): Response { $package = array_shift($pathParts); } - $manager = ResourceManager::vendor($vendor, $package); + $manager = ResourceManager::vendor($vendor, $package, [], $this); break; case ResourceManager::MAP_PUBLIC: - $manager = ResourceManager::public(); + $manager = ResourceManager::public([], $this); break; case ResourceManager::MAP_COMPONENT: @@ -253,7 +253,7 @@ public function handleRequest(Request $request): Response { try { - $manager = ResourceManager::componentClass($class); + $manager = ResourceManager::componentClass($class, [], $this); } catch(RuntimeException $e) {