Last active
December 23, 2019 15:50
-
-
Save jsifalda/4bf8cf8d28a6e52995f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class AppExtension extends Nette\DI\CompilerExtension implements Flame\Modules\Providers\IRouterProvider | |
{ | |
/** | |
* Returns array of ServiceDefinition, | |
* that will be appended to setup of router service | |
* | |
* @example https://github.com/nette/sandbox/blob/master/app/router/RouterFactory.php - createRouter() | |
*/ | |
public function getRoutesDefinition() | |
{ | |
$routeList = new RouteList; | |
$routeList[] = new Flame\Modules\Application\Routers\NetteRouteMock('index.php', 'App:Homepage:default', Nette\Application\Routers\Route::ONE_WAY); | |
$routeList[] = new Nette\Application\Routers\Route('<module>/<presenter>/<action>[/<id>]', array( | |
'module' => 'App', | |
'Presenter' => 'Homepage', | |
'action' => 'default', | |
'id' => null | |
)) | |
); | |
return $routelist; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment