Skip to content

Commit

Permalink
Bind dispatch to the resource manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Nov 8, 2023
1 parent 8db7c0f commit 053b8ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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:

Expand All @@ -253,7 +253,7 @@ public function handleRequest(Request $request): Response
{
try
{
$manager = ResourceManager::componentClass($class);
$manager = ResourceManager::componentClass($class, [], $this);
}
catch(RuntimeException $e)
{
Expand Down

0 comments on commit 053b8ec

Please sign in to comment.