Skip to content

Instantly share code, notes, and snippets.

@jsifalda
Last active December 23, 2019 15:50
Show Gist options
  • Save jsifalda/4bf8cf8d28a6e52995f6 to your computer and use it in GitHub Desktop.
Save jsifalda/4bf8cf8d28a6e52995f6 to your computer and use it in GitHub Desktop.
<?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