Skip to content

Commit

Permalink
Merge pull request #394 from dezsi-istvan/3.x
Browse files Browse the repository at this point in the history
pre_controller can modify $class / $method
  • Loading branch information
kenjis committed Dec 26, 2022
2 parents 295d0c8 + f17962b commit 4f6c34a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions application/tests/_ci_phpunit_test/CIPHPUnitTestRequest.php
Expand Up @@ -324,7 +324,12 @@ protected function createAndCallController($class, $method, $params, $call_displ
{
ob_start();

$GLOBALS['class'] = $class;
$GLOBALS['method'] = $method;
// pre_controller can modify global $class $method variables to modify route
$this->callHook('pre_controller');
$class = $GLOBALS['class'];
$method = $GLOBALS['method'];

// Run callablePreConstructor
if ($this->callablePreConstructors !== [])
Expand Down

0 comments on commit 4f6c34a

Please sign in to comment.