Skip to content

Commit

Permalink
Resolve handlers (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb authored Feb 6, 2024
1 parent 6b0d0b9 commit c4cd6e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Routing/RouteProcessor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Cubex\Routing;

use Cubex\CubexAware;
use Cubex\Events\PreExecuteEvent;
use Exception;
use Packaged\Context\Context;
Expand Down Expand Up @@ -69,6 +70,10 @@ protected function _prepareHandler(Context $c, $handler)
{
if(strpos($handler, '\\') !== false && class_exists($handler))
{
if($c instanceof CubexAware && $c->hasCubex())
{
return $c->getCubex()->resolve($handler);
}
return new $handler();
}

Expand Down

0 comments on commit c4cd6e9

Please sign in to comment.