Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function connect(Application $app)
 {
     /** @var $ctr ControllerCollection */
     $ctr = parent::connect($app);
     $ctr->match('/profile/edit', [$this, 'editProfile'])->bind('membersProfileEdit')->method(Request::METHOD_GET . '|' . Request::METHOD_POST);
     $ctr->match('/profile/register', [$this, 'registerProfile'])->bind('membersProfileRegister')->method(Request::METHOD_GET . '|' . Request::METHOD_POST);
     $ctr->match('/profile/verify', [$this, 'verifyProfile'])->bind('membersProfileVerify')->method(Request::METHOD_GET);
     $ctr->match('/profile/view', [$this, 'viewProfile'])->bind('membersProfileView')->method(Request::METHOD_GET);
     // Own the rest of the base route
     $ctr->match('/', [$this, 'defaultRoute'])->bind('membersDefaultBase');
     $ctr->match('/{url}', [$this, 'defaultRoute'])->bind('membersDefault')->assert('url', '.+');
     $ctr->after([$this, 'after']);
     return $ctr;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function connect(Application $app)
 {
     /** @var $ctr ControllerCollection */
     $ctr = parent::connect($app);
     $ctr->value(Zone::KEY, Zone::BACKEND);
     $memberBaseUrl = '/extend/members';
     $ctr->match($memberBaseUrl, [$this, 'admin'])->bind('membersAdmin')->method(Request::METHOD_GET);
     $ctr->match($memberBaseUrl . '/add', [$this, 'userAdd'])->bind('membersAdminUserAdd')->method(Request::METHOD_GET . '|' . Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/action/userDelete', [$this, 'userDelete'])->bind('membersAdminUserDel')->method(Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/action/userEnable', [$this, 'userEnable'])->bind('membersAdminUserEnable')->method(Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/action/userDisable', [$this, 'userDisable'])->bind('membersAdminUserDisable')->method(Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/action/roleAdd', [$this, 'roleAdd'])->bind('membersAdminUserRoleAdd')->method(Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/action/roleDel', [$this, 'roleDel'])->bind('membersAdminUserRoleDel')->method(Request::METHOD_POST);
     $ctr->match($memberBaseUrl . '/edit/{guid}', [$this, 'userEdit'])->bind('membersAdminUserEdit')->method(Request::METHOD_GET . '|' . Request::METHOD_POST);
     $ctr->before([$this, 'before']);
     return $ctr;
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function connect(Application $app)
 {
     /** @var $ctr ControllerCollection */
     $ctr = parent::connect($app);
     // Member login
     $ctr->match('/login', [$this, 'login'])->bind('authenticationLogin')->method('GET|POST');
     // Member login
     $ctr->match('/login/process', [$this, 'processLogin'])->bind('authenticationProcessLogin')->method('GET');
     // Member logout
     $ctr->match('/logout', [$this, 'logout'])->bind('authenticationLogout')->method('GET');
     // OAuth callback URI
     $ctr->match('/oauth2/callback', [$this, 'oauthCallback'])->bind('authenticationCallback')->method('GET');
     $ctr->match('/reset', [$this, 'resetPassword'])->bind('authenticationPasswordReset')->method('GET|POST');
     // Own the rest of the base route
     $ctr->match('/', [$this, 'defaultRoute'])->bind('authenticationDefaultBase');
     $ctr->match('/{url}', [$this, 'defaultRoute'])->bind('authenticationDefault')->assert('url', '.+');
     $ctr->after([$this, 'after']);
     return $ctr;
 }