/** * {@inheritdoc} */ public function group(string $identifier, \Closure $callback) { parent::group($this->prefix($identifier), $callback); }
<?php use hydro\routing\storage\Collection; use hydro\routing\generation\Architect; use hydro\routing\generation\Interpolator; $architect = new Architect(new Collection(), new Interpolator()); $architect->group('index', function (Architect $architect) { $architect->add('homepage', '/', ['GET' => controllers\index\HomeController::class]); $architect->add('about', '/about', ['GET' => controllers\index\AboutController::class]); }); $architect->group('users', function (Architect $architect) { $architect->add('search', '/users/search/{criteria:char}?', ['GET' => controllers\users\UserSearchController::class]); }); return $architect->finalize();