Exemplo n.º 1
0
 protected function registerUrlHandlers()
 {
     parent::registerUrlHandlers();
     // Add a simple home page URL handler. We're using one of the simplest handlers the
     // ClassMappedUrlHandler, but you should look at the other handlers particularly
     // the MvpUrlHandler and CrudUrlHandler
     $login = new ClassMappedUrlHandler(__NAMESPACE__ . '\\Presenters\\IndexPresenter');
     $login->setPriority(11);
     $this->addUrlHandlers(["/" => new ClassMappedUrlHandler('\\Your\\WebApp\\Presenters\\IndexPresenter', ['portal/' => new ClassMappedUrlHandler('Your\\WebApp\\Presenters\\Portal\\PortalPresenter', ['gallery/' => new CrudUrlHandler('Gallery', 'Your\\WebApp\\Presenters\\Gallery', ['change']), 'image/' => new CrudUrlHandler('Image', 'Your\\WebApp\\Presenters\\Image'), 'users/' => new ClassMappedUrlHandler(UsersPresenter::class), 'logout/' => new ClassMappedUrlHandler('Your\\WebApp\\Presenters\\Logout\\LogoutPresenter')]), 'img/' => new ImageUrlHandler(ImgPresenter::class), 'users/' => new CrudUrlHandler('CustomUser', 'Your\\WebApp\\Presenters\\MyProfile')]), "/login/" => $login]);
 }