@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function getName() |
| 79 | 79 | { |
| 80 | - return $this->firstname.' '.$this->lastname; |
|
| 80 | + return $this->firstname . ' ' . $this->lastname; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -96,16 +96,16 @@ discard block |
||
| 96 | 96 | if ($socialAuth->getPlatform() == 'facebook') { |
| 97 | 97 | switch ($size) { |
| 98 | 98 | case 'small': // 50px x 50px |
| 99 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=square'; |
|
| 99 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=square'; |
|
| 100 | 100 | break; |
| 101 | 101 | case 'medium': // 200px x 200px |
| 102 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large'; |
|
| 102 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large'; |
|
| 103 | 103 | break; |
| 104 | 104 | case 'large': // 200px x 200px |
| 105 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture?type=large'; |
|
| 105 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture?type=large'; |
|
| 106 | 106 | break; |
| 107 | 107 | default: |
| 108 | - return '//graph.facebook.com/'.$socialAuth->getSocialId().'/picture'; |
|
| 108 | + return '//graph.facebook.com/' . $socialAuth->getSocialId() . '/picture'; |
|
| 109 | 109 | break; |
| 110 | 110 | } |
| 111 | 111 | } elseif ($socialAuth->getPlatform() == 'onebody') { |
@@ -114,16 +114,16 @@ discard block |
||
| 114 | 114 | $extension = pathinfo($socialAuth->getMeta()['photo-file-name'], PATHINFO_EXTENSION); |
| 115 | 115 | switch ($size) { |
| 116 | 116 | case 'small': // 50px x 50px |
| 117 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension; |
|
| 117 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension; |
|
| 118 | 118 | break; |
| 119 | 119 | case 'medium': // 150px x 150px |
| 120 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/small/'.$photoFingerprint.'.'.$extension; |
|
| 120 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/small/' . $photoFingerprint . '.' . $extension; |
|
| 121 | 121 | break; |
| 122 | 122 | case 'large': // 500px x 500px |
| 123 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/medium/'.$photoFingerprint.'.'.$extension; |
|
| 123 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/medium/' . $photoFingerprint . '.' . $extension; |
|
| 124 | 124 | break; |
| 125 | 125 | default: |
| 126 | - return $baseUrl.'/system/production/people/photos/'.$socialAuth->getSocialId().'/tn/'.$photoFingerprint.'.'.$extension; |
|
| 126 | + return $baseUrl . '/system/production/people/photos/' . $socialAuth->getSocialId() . '/tn/' . $photoFingerprint . '.' . $extension; |
|
| 127 | 127 | break; |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -132,16 +132,16 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | switch ($size) { |
| 134 | 134 | case 'small': // 50px x 50px |
| 135 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm'; |
|
| 135 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm'; |
|
| 136 | 136 | break; |
| 137 | 137 | case 'medium': // 200px x 200px |
| 138 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=200&d=mm'; |
|
| 138 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=200&d=mm'; |
|
| 139 | 139 | break; |
| 140 | 140 | case 'large': // 500px x 500px |
| 141 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=500&d=mm'; |
|
| 141 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=500&d=mm'; |
|
| 142 | 142 | break; |
| 143 | 143 | default: |
| 144 | - return '//www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))).'?s=50&d=mm'; |
|
| 144 | + return '//www.gravatar.com/avatar/' . md5(strtolower(trim($this->email))) . '?s=50&d=mm'; |
|
| 145 | 145 | break; |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | public function getLoginAuth(ServerRequestInterface $request, ResponseInterface $response, $args) |
| 80 | 80 | { |
| 81 | - $this->logger->info("Login auth GET '/login/".$args['provider']."'"); |
|
| 81 | + $this->logger->info("Login auth GET '/login/" . $args['provider'] . "'"); |
|
| 82 | 82 | |
| 83 | 83 | // login |
| 84 | 84 | $authUrl = $this->auth->getCallbackUrl($this->router); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | public function getLoginCallback(ServerRequestInterface $request, ResponseInterface $response, $args) |
| 90 | 90 | { |
| 91 | - $this->logger->info("Login auth GET '/login/".$args['provider']."/callback'"); |
|
| 91 | + $this->logger->info("Login auth GET '/login/" . $args['provider'] . "/callback'"); |
|
| 92 | 92 | |
| 93 | 93 | // login |
| 94 | 94 | try { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $path = $this->router->pathFor('login-callback', ['provider' => $this->getAuthProviderSlug()]); |
| 45 | 45 | |
| 46 | - $url = $this->baseUrl.$path; |
|
| 46 | + $url = $this->baseUrl . $path; |
|
| 47 | 47 | |
| 48 | 48 | return $helper->getLoginUrl($url, $this->permissions); |
| 49 | 49 | } |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | $accessToken = $helper->getAccessToken(); |
| 57 | 57 | } catch (FacebookResponseException $e) { |
| 58 | 58 | // When Graph returns an error |
| 59 | - echo 'Graph returned an error: '.$e->getMessage(); |
|
| 59 | + echo 'Graph returned an error: ' . $e->getMessage(); |
|
| 60 | 60 | |
| 61 | 61 | return false; |
| 62 | 62 | } catch (FacebookSDKException $e) { |
| 63 | 63 | // When validation fails or other local issues |
| 64 | - echo 'Facebook SDK returned an error: '.$e->getMessage(); |
|
| 64 | + echo 'Facebook SDK returned an error: ' . $e->getMessage(); |
|
| 65 | 65 | |
| 66 | 66 | return false; |
| 67 | 67 | } |
@@ -69,10 +69,10 @@ discard block |
||
| 69 | 69 | if (!isset($accessToken)) { |
| 70 | 70 | if ($helper->getError()) { |
| 71 | 71 | header('HTTP/1.0 401 Unauthorized'); |
| 72 | - echo 'Error: '.$helper->getError()."\n"; |
|
| 73 | - echo 'Error Code: '.$helper->getErrorCode()."\n"; |
|
| 74 | - echo 'Error Reason: '.$helper->getErrorReason()."\n"; |
|
| 75 | - echo 'Error Description: '.$helper->getErrorDescription()."\n"; |
|
| 72 | + echo 'Error: ' . $helper->getError() . "\n"; |
|
| 73 | + echo 'Error Code: ' . $helper->getErrorCode() . "\n"; |
|
| 74 | + echo 'Error Reason: ' . $helper->getErrorReason() . "\n"; |
|
| 75 | + echo 'Error Description: ' . $helper->getErrorDescription() . "\n"; |
|
| 76 | 76 | } else { |
| 77 | 77 | header('HTTP/1.0 400 Bad Request'); |
| 78 | 78 | echo 'Bad request'; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | try { |
| 99 | 99 | $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); |
| 100 | 100 | } catch (FacebookSDKException $e) { |
| 101 | - echo '<p>Error getting long-lived access token: '.$helper->getMessage()."</p>\n\n"; |
|
| 101 | + echo '<p>Error getting long-lived access token: ' . $helper->getMessage() . "</p>\n\n"; |
|
| 102 | 102 | |
| 103 | 103 | return false; |
| 104 | 104 | } |
@@ -122,10 +122,10 @@ discard block |
||
| 122 | 122 | // Returns a `Facebook\FacebookResponse` object |
| 123 | 123 | $response = $this->facebook->get('/me?fields=id,name,email', $accessToken); |
| 124 | 124 | } catch (Facebook\Exceptions\FacebookResponseException $e) { |
| 125 | - echo 'Graph returned an error: '.$e->getMessage(); |
|
| 125 | + echo 'Graph returned an error: ' . $e->getMessage(); |
|
| 126 | 126 | exit; |
| 127 | 127 | } catch (Facebook\Exceptions\FacebookSDKException $e) { |
| 128 | - echo 'Facebook SDK returned an error: '.$e->getMessage(); |
|
| 128 | + echo 'Facebook SDK returned an error: ' . $e->getMessage(); |
|
| 129 | 129 | exit; |
| 130 | 130 | } |
| 131 | 131 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $container = $app->getContainer(); |
| 20 | 20 | |
| 21 | 21 | // TWIG view renderer |
| 22 | -$container['view'] = function ($c) { |
|
| 22 | +$container['view'] = function($c) { |
|
| 23 | 23 | $settings = $c->get('settings')['renderer']; |
| 24 | 24 | $view = new Twig($settings['template_path'], [ |
| 25 | 25 | 'cache' => false, // or 'path/to/cache' |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $env = $view->getEnvironment(); |
| 42 | 42 | $env->addGlobal('site', new Site()); |
| 43 | 43 | $env->addGlobal('currenturl', $c->get('request')->getUri()); |
| 44 | - $env->addGlobal('currentpath', $c->get('request')->getUri()->getBasePath().'/'.$c->get('request')->getUri()->getPath()); |
|
| 44 | + $env->addGlobal('currentpath', $c->get('request')->getUri()->getBasePath() . '/' . $c->get('request')->getUri()->getPath()); |
|
| 45 | 45 | |
| 46 | 46 | if (isset($_SESSION['userId'])) { |
| 47 | 47 | $u = UserQuery::create()->findPk($_SESSION['userId']); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | 56 | // monolog |
| 57 | -$container['logger'] = function ($c) { |
|
| 57 | +$container['logger'] = function($c) { |
|
| 58 | 58 | $settings = $c->get('settings')['logger']; |
| 59 | 59 | $logger = new Monolog\Logger($settings['name']); |
| 60 | 60 | $logger->pushProcessor(new Monolog\Processor\UidProcessor()); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | return $logger; |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | -$container['auth'] = function ($c) { |
|
| 66 | +$container['auth'] = function($c) { |
|
| 67 | 67 | $authConfig = getConfig()['auth']; |
| 68 | 68 | |
| 69 | 69 | // full domain e.g. https://example.com |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | break; |
| 82 | 82 | |
| 83 | 83 | case 'onebody': |
| 84 | - $url = $authConfig['onebody']['url'].'/'; |
|
| 84 | + $url = $authConfig['onebody']['url'] . '/'; |
|
| 85 | 85 | $email = new EmailAddress($authConfig['onebody']['email']); |
| 86 | 86 | $apiKey = $authConfig['onebody']['apiKey']; |
| 87 | 87 | |
@@ -19,35 +19,35 @@ discard block |
||
| 19 | 19 | // USER |
| 20 | 20 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 21 | 21 | |
| 22 | -$app->group('/user', function () { |
|
| 23 | - $this->get('s', UserController::class.':getAllUsers')->setName('users'); |
|
| 22 | +$app->group('/user', function() { |
|
| 23 | + $this->get('s', UserController::class . ':getAllUsers')->setName('users'); |
|
| 24 | 24 | |
| 25 | - $this->get('/{id}/widget-only', UserController::class.':getUserWidgetOnly')->setName('user-widget-only'); |
|
| 25 | + $this->get('/{id}/widget-only', UserController::class . ':getUserWidgetOnly')->setName('user-widget-only'); |
|
| 26 | 26 | |
| 27 | - $this->get('/new', UserController::class.':getNewUserForm')->setName('user-new'); |
|
| 28 | - $this->get('/{id}/edit', UserController::class.':getUserEditForm')->setName('user-edit'); |
|
| 29 | - $this->get('/{id}/password', UserController::class.':getUserPasswordForm')->setName('user-password'); |
|
| 27 | + $this->get('/new', UserController::class . ':getNewUserForm')->setName('user-new'); |
|
| 28 | + $this->get('/{id}/edit', UserController::class . ':getUserEditForm')->setName('user-edit'); |
|
| 29 | + $this->get('/{id}/password', UserController::class . ':getUserPasswordForm')->setName('user-password'); |
|
| 30 | 30 | |
| 31 | - $this->get('/me', UserController::class.':getCurrentUser')->setName('user-me'); |
|
| 32 | - $this->get('/{id}', UserController::class.':getUser')->setName('user'); |
|
| 31 | + $this->get('/me', UserController::class . ':getCurrentUser')->setName('user-me'); |
|
| 32 | + $this->get('/{id}', UserController::class . ':getUser')->setName('user'); |
|
| 33 | 33 | |
| 34 | - $this->post('[/{id}]', UserController::class.':postUser')->setName('user-post'); |
|
| 35 | - $this->post('/{id}/password', UserController::class.':postUserPasswordChange')->setName('user-password-post'); |
|
| 34 | + $this->post('[/{id}]', UserController::class . ':postUser')->setName('user-post'); |
|
| 35 | + $this->post('/{id}/password', UserController::class . ':postUserPasswordChange')->setName('user-password-post'); |
|
| 36 | 36 | |
| 37 | 37 | // roles |
| 38 | - $this->get('/{id}/roles', RoleController::class.':getAssignRolesForm')->setName('user-roles'); |
|
| 39 | - $this->post('/{id}/roles', RoleController::class.':postUserAssignRoles')->setName('user-assign-post'); |
|
| 38 | + $this->get('/{id}/roles', RoleController::class . ':getAssignRolesForm')->setName('user-roles'); |
|
| 39 | + $this->post('/{id}/roles', RoleController::class . ':postUserAssignRoles')->setName('user-assign-post'); |
|
| 40 | 40 | |
| 41 | 41 | // availability |
| 42 | - $this->get('/{id}/availability', AvailabilityController::class.':getAvailabilityForm')->setName('user-availability'); |
|
| 43 | - $this->post('/{id}/availability', AvailabilityController::class.':postAvailability')->setName('user-availability-post'); |
|
| 42 | + $this->get('/{id}/availability', AvailabilityController::class . ':getAvailabilityForm')->setName('user-availability'); |
|
| 43 | + $this->post('/{id}/availability', AvailabilityController::class . ':postAvailability')->setName('user-availability-post'); |
|
| 44 | 44 | |
| 45 | 45 | // calendar |
| 46 | - $this->group('/me/calendar', function () { |
|
| 47 | - $this->get('s', CalendarController::class.':getCalendarTokens')->setName('user-calendars'); |
|
| 48 | - $this->get('/new', CalendarController::class.':getNewCalendarForm')->setName('user-calendars'); |
|
| 49 | - $this->get('/{id}/revoke', CalendarController::class.':getRevokeCalendar')->setName('user-calendar-revoke'); |
|
| 50 | - $this->post('/new', CalendarController::class.':postNewCalendar')->setName('user-calendar-new-post'); |
|
| 46 | + $this->group('/me/calendar', function() { |
|
| 47 | + $this->get('s', CalendarController::class . ':getCalendarTokens')->setName('user-calendars'); |
|
| 48 | + $this->get('/new', CalendarController::class . ':getNewCalendarForm')->setName('user-calendars'); |
|
| 49 | + $this->get('/{id}/revoke', CalendarController::class . ':getRevokeCalendar')->setName('user-calendar-revoke'); |
|
| 50 | + $this->post('/new', CalendarController::class . ':postNewCalendar')->setName('user-calendar-new-post'); |
|
| 51 | 51 | }); |
| 52 | 52 | }); |
| 53 | 53 | |
@@ -55,86 +55,86 @@ discard block |
||
| 55 | 55 | // EVENT |
| 56 | 56 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 57 | 57 | |
| 58 | -$app->group('/event', function () { |
|
| 59 | - $this->get('s', EventController::class.':getAllEvents')->setName('events'); |
|
| 60 | - $this->get('s/type/{id}', EventController::class.':getAllEventsWithType')->setName('events-eventtype'); |
|
| 61 | - $this->get('s/subtype/{id}', EventController::class.':getAllEventsWithSubType')->setName('events-eventsubtype'); |
|
| 58 | +$app->group('/event', function() { |
|
| 59 | + $this->get('s', EventController::class . ':getAllEvents')->setName('events'); |
|
| 60 | + $this->get('s/type/{id}', EventController::class . ':getAllEventsWithType')->setName('events-eventtype'); |
|
| 61 | + $this->get('s/subtype/{id}', EventController::class . ':getAllEventsWithSubType')->setName('events-eventsubtype'); |
|
| 62 | 62 | |
| 63 | - $this->get('s/print/preachers', EventController::class.':getAllEventsToPrint')->setName('events-print'); |
|
| 63 | + $this->get('s/print/preachers', EventController::class . ':getAllEventsToPrint')->setName('events-print'); |
|
| 64 | 64 | |
| 65 | - $this->get('/new', EventController::class.':getNewEventForm')->setName('event-new'); |
|
| 66 | - $this->get('/{id}/edit', EventController::class.':getEventEditForm')->setName('event-edit'); |
|
| 67 | - $this->get('/{id}/copy', EventController::class.':getEventCopyForm')->setName('event-copy'); |
|
| 68 | - $this->get('/{id}/assign', EventController::class.':getEventAssignForm')->setName('event-assign'); |
|
| 65 | + $this->get('/new', EventController::class . ':getNewEventForm')->setName('event-new'); |
|
| 66 | + $this->get('/{id}/edit', EventController::class . ':getEventEditForm')->setName('event-edit'); |
|
| 67 | + $this->get('/{id}/copy', EventController::class . ':getEventCopyForm')->setName('event-copy'); |
|
| 68 | + $this->get('/{id}/assign', EventController::class . ':getEventAssignForm')->setName('event-assign'); |
|
| 69 | 69 | |
| 70 | - $this->get('/{id}', EventController::class.':getEvent')->setName('event'); |
|
| 70 | + $this->get('/{id}', EventController::class . ':getEvent')->setName('event'); |
|
| 71 | 71 | |
| 72 | - $this->post('[/{id}]', EventController::class.':postEvent')->setName('event-post'); |
|
| 73 | - $this->post('/{id}/assign', EventController::class.':postEventAssign')->setName('event-assign-post'); |
|
| 72 | + $this->post('[/{id}]', EventController::class . ':postEvent')->setName('event-post'); |
|
| 73 | + $this->post('/{id}/assign', EventController::class . ':postEventAssign')->setName('event-assign-post'); |
|
| 74 | 74 | }); |
| 75 | 75 | |
| 76 | 76 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 77 | 77 | // RESOURCE |
| 78 | 78 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 79 | 79 | |
| 80 | -$app->group('/resource', function () { |
|
| 81 | - $this->get('s', ResourceController::class.':getAllResources')->setName('resources'); |
|
| 80 | +$app->group('/resource', function() { |
|
| 81 | + $this->get('s', ResourceController::class . ':getAllResources')->setName('resources'); |
|
| 82 | 82 | |
| 83 | - $this->get('[/new]', ResourceController::class.':getNewResourceForm')->setName('resource-new'); |
|
| 84 | - $this->get('/{id}/edit', ResourceController::class.':getResourceEditForm')->setName('resource-edit'); |
|
| 83 | + $this->get('[/new]', ResourceController::class . ':getNewResourceForm')->setName('resource-new'); |
|
| 84 | + $this->get('/{id}/edit', ResourceController::class . ':getResourceEditForm')->setName('resource-edit'); |
|
| 85 | 85 | |
| 86 | - $this->get('/{id}', ResourceController::class.':getResourceFile')->setName('resource'); |
|
| 86 | + $this->get('/{id}', ResourceController::class . ':getResourceFile')->setName('resource'); |
|
| 87 | 87 | |
| 88 | - $this->post('[/{id}]', ResourceController::class.':postResource')->setName('resource-post'); |
|
| 88 | + $this->post('[/{id}]', ResourceController::class . ':postResource')->setName('resource-post'); |
|
| 89 | 89 | }); |
| 90 | 90 | |
| 91 | 91 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 92 | 92 | // AUTH |
| 93 | 93 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 94 | 94 | |
| 95 | -$app->get('/login', AuthController::class.':getLoginForm')->setName('login'); |
|
| 95 | +$app->get('/login', AuthController::class . ':getLoginForm')->setName('login'); |
|
| 96 | 96 | |
| 97 | -$app->get('/login/{provider}', AuthController::class.':getLoginAuth')->setName('login-auth'); |
|
| 98 | -$app->get('/login/{provider}/callback', AuthController::class.':getLoginCallback')->setName('login-callback'); |
|
| 99 | -$app->get('/signup', PendingUserController::class.':getSignUpForm')->setName('sign-up'); |
|
| 100 | -$app->get('/signup/cancel', PendingUserController::class.':getSignUpCancel')->setName('sign-up-cancel'); |
|
| 97 | +$app->get('/login/{provider}', AuthController::class . ':getLoginAuth')->setName('login-auth'); |
|
| 98 | +$app->get('/login/{provider}/callback', AuthController::class . ':getLoginCallback')->setName('login-callback'); |
|
| 99 | +$app->get('/signup', PendingUserController::class . ':getSignUpForm')->setName('sign-up'); |
|
| 100 | +$app->get('/signup/cancel', PendingUserController::class . ':getSignUpCancel')->setName('sign-up-cancel'); |
|
| 101 | 101 | |
| 102 | -$app->get('/logout', AuthController::class.':getLogout')->setName('logout'); |
|
| 102 | +$app->get('/logout', AuthController::class . ':getLogout')->setName('logout'); |
|
| 103 | 103 | |
| 104 | -$app->post('/login', AuthController::class.':postLogin')->setName('login-post'); |
|
| 105 | -$app->post('/signup', PendingUserController::class.':postSignUp')->setName('sign-up-post'); |
|
| 104 | +$app->post('/login', AuthController::class . ':postLogin')->setName('login-post'); |
|
| 105 | +$app->post('/signup', PendingUserController::class . ':postSignUp')->setName('sign-up-post'); |
|
| 106 | 106 | |
| 107 | 107 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 108 | 108 | // NOTIFICATIONS |
| 109 | 109 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 110 | 110 | |
| 111 | -$app->get('/notification/{id}[/{referrer}]', NotificationController::class.':getNotificationClick')->setName('notification'); |
|
| 111 | +$app->get('/notification/{id}[/{referrer}]', NotificationController::class . ':getNotificationClick')->setName('notification'); |
|
| 112 | 112 | |
| 113 | 113 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 114 | 114 | // CALENDAR |
| 115 | 115 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 116 | 116 | |
| 117 | -$app->get('/calendar/{token}.{format}', CalendarController::class.':getRenderedCalendar')->setName('user-calendar'); |
|
| 117 | +$app->get('/calendar/{token}.{format}', CalendarController::class . ':getRenderedCalendar')->setName('user-calendar'); |
|
| 118 | 118 | |
| 119 | 119 | // legacy |
| 120 | -$app->get('/calendar.php', CalendarController::class.':getLegacyRenderedCalendar')->setName('user-calendar'); |
|
| 120 | +$app->get('/calendar.php', CalendarController::class . ':getLegacyRenderedCalendar')->setName('user-calendar'); |
|
| 121 | 121 | |
| 122 | 122 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 123 | 123 | // OTHER |
| 124 | 124 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 125 | 125 | |
| 126 | -$app->get('/settings', function ($request, $response, $args) { |
|
| 126 | +$app->get('/settings', function($request, $response, $args) { |
|
| 127 | 127 | // Sample log message |
| 128 | 128 | $this->logger->info("Fetch settings GET '/settings'"); |
| 129 | 129 | |
| 130 | 130 | return $this->view->render($response, 'settings.twig', []); |
| 131 | 131 | })->setName('settings'); |
| 132 | 132 | |
| 133 | -$app->get('/token', function ($request, $response, $args) { |
|
| 133 | +$app->get('/token', function($request, $response, $args) { |
|
| 134 | 134 | return $response->getBody()->write(Crypt::generateToken(30)); |
| 135 | 135 | })->setName('token'); |
| 136 | 136 | |
| 137 | -$app->get('/', function ($request, $response, $args) { |
|
| 137 | +$app->get('/', function($request, $response, $args) { |
|
| 138 | 138 | // Sample log message |
| 139 | 139 | $this->logger->info("Fetch home GET '/'"); |
| 140 | 140 | |