|  | @@ -20,35 +20,35 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 20 | 20 |  // USER | 
                                                                                                            
                                                            | 21 | 21 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 22 | 22 |   | 
                                                                                                            
                                                            | 23 |  | -$app->group('/user', function () { | 
                                                                                                            
                                                            | 24 |  | -    $this->get('s', UserController::class.':getAllUsers')->setName('users'); | 
                                                                                                            
                                                            |  | 23 | +$app->group('/user', function() { | 
                                                                                                            
                                                            |  | 24 | +    $this->get('s', UserController::class . ':getAllUsers')->setName('users'); | 
                                                                                                            
                                                            | 25 | 25 |   | 
                                                                                                            
                                                            | 26 |  | -    $this->get('/{id}/widget-only', UserController::class.':getUserWidgetOnly')->setName('user-widget-only'); | 
                                                                                                            
                                                            |  | 26 | +    $this->get('/{id}/widget-only', UserController::class . ':getUserWidgetOnly')->setName('user-widget-only'); | 
                                                                                                            
                                                            | 27 | 27 |   | 
                                                                                                            
                                                            | 28 |  | -    $this->get('/new', UserController::class.':getNewUserForm')->setName('user-new'); | 
                                                                                                            
                                                            | 29 |  | -    $this->get('/{id}/edit', UserController::class.':getUserEditForm')->setName('user-edit'); | 
                                                                                                            
                                                            | 30 |  | -    $this->get('/{id}/password', UserController::class.':getUserPasswordForm')->setName('user-password'); | 
                                                                                                            
                                                            |  | 28 | +    $this->get('/new', UserController::class . ':getNewUserForm')->setName('user-new'); | 
                                                                                                            
                                                            |  | 29 | +    $this->get('/{id}/edit', UserController::class . ':getUserEditForm')->setName('user-edit'); | 
                                                                                                            
                                                            |  | 30 | +    $this->get('/{id}/password', UserController::class . ':getUserPasswordForm')->setName('user-password'); | 
                                                                                                            
                                                            | 31 | 31 |   | 
                                                                                                            
                                                            | 32 |  | -    $this->get('/me', UserController::class.':getCurrentUser')->setName('user-me'); | 
                                                                                                            
                                                            | 33 |  | -    $this->get('/{id}', UserController::class.':getUser')->setName('user'); | 
                                                                                                            
                                                            |  | 32 | +    $this->get('/me', UserController::class . ':getCurrentUser')->setName('user-me'); | 
                                                                                                            
                                                            |  | 33 | +    $this->get('/{id}', UserController::class . ':getUser')->setName('user'); | 
                                                                                                            
                                                            | 34 | 34 |   | 
                                                                                                            
                                                            | 35 |  | -    $this->post('[/{id}]', UserController::class.':postUser')->setName('user-post'); | 
                                                                                                            
                                                            | 36 |  | -    $this->post('/{id}/password', UserController::class.':postUserPasswordChange')->setName('user-password-post'); | 
                                                                                                            
                                                            |  | 35 | +    $this->post('[/{id}]', UserController::class . ':postUser')->setName('user-post'); | 
                                                                                                            
                                                            |  | 36 | +    $this->post('/{id}/password', UserController::class . ':postUserPasswordChange')->setName('user-password-post'); | 
                                                                                                            
                                                            | 37 | 37 |   | 
                                                                                                            
                                                            | 38 | 38 |      // roles | 
                                                                                                            
                                                            | 39 |  | -    $this->get('/{id}/roles', RoleController::class.':getAssignRolesForm')->setName('user-roles'); | 
                                                                                                            
                                                            | 40 |  | -    $this->post('/{id}/roles', RoleController::class.':postUserAssignRoles')->setName('user-assign-post'); | 
                                                                                                            
                                                            |  | 39 | +    $this->get('/{id}/roles', RoleController::class . ':getAssignRolesForm')->setName('user-roles'); | 
                                                                                                            
                                                            |  | 40 | +    $this->post('/{id}/roles', RoleController::class . ':postUserAssignRoles')->setName('user-assign-post'); | 
                                                                                                            
                                                            | 41 | 41 |   | 
                                                                                                            
                                                            | 42 | 42 |      // availability | 
                                                                                                            
                                                            | 43 |  | -    $this->get('/{id}/availability', AvailabilityController::class.':getAvailabilityForm')->setName('user-availability'); | 
                                                                                                            
                                                            | 44 |  | -    $this->post('/{id}/availability', AvailabilityController::class.':postAvailability')->setName('user-availability-post'); | 
                                                                                                            
                                                            |  | 43 | +    $this->get('/{id}/availability', AvailabilityController::class . ':getAvailabilityForm')->setName('user-availability'); | 
                                                                                                            
                                                            |  | 44 | +    $this->post('/{id}/availability', AvailabilityController::class . ':postAvailability')->setName('user-availability-post'); | 
                                                                                                            
                                                            | 45 | 45 |   | 
                                                                                                            
                                                            | 46 | 46 |      // calendar | 
                                                                                                            
                                                            | 47 |  | -    $this->group('/me/calendar', function () { | 
                                                                                                            
                                                            | 48 |  | -        $this->get('s', CalendarController::class.':getCalendarTokens')->setName('user-calendars'); | 
                                                                                                            
                                                            | 49 |  | -        $this->get('/new', CalendarController::class.':getNewCalendarForm')->setName('user-calendars'); | 
                                                                                                            
                                                            | 50 |  | -        $this->get('/{id}/revoke', CalendarController::class.':getRevokeCalendar')->setName('user-calendar-revoke'); | 
                                                                                                            
                                                            | 51 |  | -        $this->post('/new', CalendarController::class.':postNewCalendar')->setName('user-calendar-new-post'); | 
                                                                                                            
                                                            |  | 47 | +    $this->group('/me/calendar', function() { | 
                                                                                                            
                                                            |  | 48 | +        $this->get('s', CalendarController::class . ':getCalendarTokens')->setName('user-calendars'); | 
                                                                                                            
                                                            |  | 49 | +        $this->get('/new', CalendarController::class . ':getNewCalendarForm')->setName('user-calendars'); | 
                                                                                                            
                                                            |  | 50 | +        $this->get('/{id}/revoke', CalendarController::class . ':getRevokeCalendar')->setName('user-calendar-revoke'); | 
                                                                                                            
                                                            |  | 51 | +        $this->post('/new', CalendarController::class . ':postNewCalendar')->setName('user-calendar-new-post'); | 
                                                                                                            
                                                            | 52 | 52 |      }); | 
                                                                                                            
                                                            | 53 | 53 |  }); | 
                                                                                                            
                                                            | 54 | 54 |   | 
                                                                                                                                                        
                                                        |  | @@ -56,95 +56,95 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 56 | 56 |  // EVENT | 
                                                                                                            
                                                            | 57 | 57 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 58 | 58 |   | 
                                                                                                            
                                                            | 59 |  | -$app->group('/event', function () { | 
                                                                                                            
                                                            | 60 |  | -    $this->get('s', EventController::class.':getAllEvents')->setName('events'); | 
                                                                                                            
                                                            | 61 |  | -    $this->get('s/type/{id}', EventController::class.':getAllEventsWithType')->setName('events-eventtype'); | 
                                                                                                            
                                                            | 62 |  | -    $this->get('s/subtype/{id}', EventController::class.':getAllEventsWithSubType')->setName('events-eventsubtype'); | 
                                                                                                            
                                                            |  | 59 | +$app->group('/event', function() { | 
                                                                                                            
                                                            |  | 60 | +    $this->get('s', EventController::class . ':getAllEvents')->setName('events'); | 
                                                                                                            
                                                            |  | 61 | +    $this->get('s/type/{id}', EventController::class . ':getAllEventsWithType')->setName('events-eventtype'); | 
                                                                                                            
                                                            |  | 62 | +    $this->get('s/subtype/{id}', EventController::class . ':getAllEventsWithSubType')->setName('events-eventsubtype'); | 
                                                                                                            
                                                            | 63 | 63 |   | 
                                                                                                            
                                                            | 64 |  | -    $this->get('s/print/preachers', EventController::class.':getAllEventsToPrint')->setName('events-print'); | 
                                                                                                            
                                                            |  | 64 | +    $this->get('s/print/preachers', EventController::class . ':getAllEventsToPrint')->setName('events-print'); | 
                                                                                                            
                                                            | 65 | 65 |   | 
                                                                                                            
                                                            | 66 |  | -    $this->get('/new', EventController::class.':getNewEventForm')->setName('event-new'); | 
                                                                                                            
                                                            | 67 |  | -    $this->get('/{id}/edit', EventController::class.':getEventEditForm')->setName('event-edit'); | 
                                                                                                            
                                                            | 68 |  | -    $this->get('/{id}/copy', EventController::class.':getEventCopyForm')->setName('event-copy'); | 
                                                                                                            
                                                            | 69 |  | -    $this->get('/{id}/assign', EventController::class.':getEventAssignForm')->setName('event-assign'); | 
                                                                                                            
                                                            |  | 66 | +    $this->get('/new', EventController::class . ':getNewEventForm')->setName('event-new'); | 
                                                                                                            
                                                            |  | 67 | +    $this->get('/{id}/edit', EventController::class . ':getEventEditForm')->setName('event-edit'); | 
                                                                                                            
                                                            |  | 68 | +    $this->get('/{id}/copy', EventController::class . ':getEventCopyForm')->setName('event-copy'); | 
                                                                                                            
                                                            |  | 69 | +    $this->get('/{id}/assign', EventController::class . ':getEventAssignForm')->setName('event-assign'); | 
                                                                                                            
                                                            | 70 | 70 |   | 
                                                                                                            
                                                            | 71 |  | -    $this->get('/{id}', EventController::class.':getEvent')->setName('event'); | 
                                                                                                            
                                                            |  | 71 | +    $this->get('/{id}', EventController::class . ':getEvent')->setName('event'); | 
                                                                                                            
                                                            | 72 | 72 |   | 
                                                                                                            
                                                            | 73 |  | -    $this->post('[/{id}]', EventController::class.':postEvent')->setName('event-post'); | 
                                                                                                            
                                                            | 74 |  | -    $this->post('/{id}/assign', EventController::class.':postEventAssign')->setName('event-assign-post'); | 
                                                                                                            
                                                            |  | 73 | +    $this->post('[/{id}]', EventController::class . ':postEvent')->setName('event-post'); | 
                                                                                                            
                                                            |  | 74 | +    $this->post('/{id}/assign', EventController::class . ':postEventAssign')->setName('event-assign-post'); | 
                                                                                                            
                                                            | 75 | 75 |  }); | 
                                                                                                            
                                                            | 76 | 76 |   | 
                                                                                                            
                                                            | 77 | 77 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 78 | 78 |  // RESOURCE | 
                                                                                                            
                                                            | 79 | 79 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 80 | 80 |   | 
                                                                                                            
                                                            | 81 |  | -$app->group('/resource', function () { | 
                                                                                                            
                                                            | 82 |  | -    $this->get('s', ResourceController::class.':getAllResources')->setName('resources'); | 
                                                                                                            
                                                            |  | 81 | +$app->group('/resource', function() { | 
                                                                                                            
                                                            |  | 82 | +    $this->get('s', ResourceController::class . ':getAllResources')->setName('resources'); | 
                                                                                                            
                                                            | 83 | 83 |   | 
                                                                                                            
                                                            | 84 |  | -    $this->get('[/new]', ResourceController::class.':getNewResourceForm')->setName('resource-new'); | 
                                                                                                            
                                                            | 85 |  | -    $this->get('/{id}/edit', ResourceController::class.':getResourceEditForm')->setName('resource-edit'); | 
                                                                                                            
                                                            |  | 84 | +    $this->get('[/new]', ResourceController::class . ':getNewResourceForm')->setName('resource-new'); | 
                                                                                                            
                                                            |  | 85 | +    $this->get('/{id}/edit', ResourceController::class . ':getResourceEditForm')->setName('resource-edit'); | 
                                                                                                            
                                                            | 86 | 86 |   | 
                                                                                                            
                                                            | 87 |  | -    $this->get('/{id}', ResourceController::class.':getResourceFile')->setName('resource'); | 
                                                                                                            
                                                            |  | 87 | +    $this->get('/{id}', ResourceController::class . ':getResourceFile')->setName('resource'); | 
                                                                                                            
                                                            | 88 | 88 |   | 
                                                                                                            
                                                            | 89 |  | -    $this->post('[/{id}]', ResourceController::class.':postResource')->setName('resource-post'); | 
                                                                                                            
                                                            |  | 89 | +    $this->post('[/{id}]', ResourceController::class . ':postResource')->setName('resource-post'); | 
                                                                                                            
                                                            | 90 | 90 |  }); | 
                                                                                                            
                                                            | 91 | 91 |   | 
                                                                                                            
                                                            | 92 | 92 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 93 | 93 |  // ROLES & GROUPS | 
                                                                                                            
                                                            | 94 | 94 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 95 | 95 |   | 
                                                                                                            
                                                            | 96 |  | -$app->group('/group', function () { | 
                                                                                                            
                                                            | 97 |  | -    $this->get('/{id}', GroupController::class.':getGroup')->setName('group'); | 
                                                                                                            
                                                            | 98 |  | -    $this->get('/{id}/roles', GroupController::class.':getGroupRoles')->setName('group-roles'); | 
                                                                                                            
                                                            |  | 96 | +$app->group('/group', function() { | 
                                                                                                            
                                                            |  | 97 | +    $this->get('/{id}', GroupController::class . ':getGroup')->setName('group'); | 
                                                                                                            
                                                            |  | 98 | +    $this->get('/{id}/roles', GroupController::class . ':getGroupRoles')->setName('group-roles'); | 
                                                                                                            
                                                            | 99 | 99 |  }); | 
                                                                                                            
                                                            | 100 | 100 |   | 
                                                                                                            
                                                            | 101 | 101 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 102 | 102 |  // AUTH | 
                                                                                                            
                                                            | 103 | 103 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 104 | 104 |   | 
                                                                                                            
                                                            | 105 |  | -$app->get('/login', AuthController::class.':getLoginForm')->setName('login'); | 
                                                                                                            
                                                            |  | 105 | +$app->get('/login', AuthController::class . ':getLoginForm')->setName('login'); | 
                                                                                                            
                                                            | 106 | 106 |   | 
                                                                                                            
                                                            | 107 |  | -$app->get('/login/{provider}', AuthController::class.':getLoginAuth')->setName('login-auth'); | 
                                                                                                            
                                                            | 108 |  | -$app->get('/login/{provider}/callback', AuthController::class.':getLoginCallback')->setName('login-callback'); | 
                                                                                                            
                                                            | 109 |  | -$app->get('/signup', PendingUserController::class.':getSignUpForm')->setName('sign-up'); | 
                                                                                                            
                                                            | 110 |  | -$app->get('/signup/cancel', PendingUserController::class.':getSignUpCancel')->setName('sign-up-cancel'); | 
                                                                                                            
                                                            |  | 107 | +$app->get('/login/{provider}', AuthController::class . ':getLoginAuth')->setName('login-auth'); | 
                                                                                                            
                                                            |  | 108 | +$app->get('/login/{provider}/callback', AuthController::class . ':getLoginCallback')->setName('login-callback'); | 
                                                                                                            
                                                            |  | 109 | +$app->get('/signup', PendingUserController::class . ':getSignUpForm')->setName('sign-up'); | 
                                                                                                            
                                                            |  | 110 | +$app->get('/signup/cancel', PendingUserController::class . ':getSignUpCancel')->setName('sign-up-cancel'); | 
                                                                                                            
                                                            | 111 | 111 |   | 
                                                                                                            
                                                            | 112 |  | -$app->get('/logout', AuthController::class.':getLogout')->setName('logout'); | 
                                                                                                            
                                                            |  | 112 | +$app->get('/logout', AuthController::class . ':getLogout')->setName('logout'); | 
                                                                                                            
                                                            | 113 | 113 |   | 
                                                                                                            
                                                            | 114 |  | -$app->post('/login', AuthController::class.':postLogin')->setName('login-post'); | 
                                                                                                            
                                                            | 115 |  | -$app->post('/signup', PendingUserController::class.':postSignUp')->setName('sign-up-post'); | 
                                                                                                            
                                                            |  | 114 | +$app->post('/login', AuthController::class . ':postLogin')->setName('login-post'); | 
                                                                                                            
                                                            |  | 115 | +$app->post('/signup', PendingUserController::class . ':postSignUp')->setName('sign-up-post'); | 
                                                                                                            
                                                            | 116 | 116 |   | 
                                                                                                            
                                                            | 117 | 117 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 118 | 118 |  // NOTIFICATIONS | 
                                                                                                            
                                                            | 119 | 119 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 120 | 120 |   | 
                                                                                                            
                                                            | 121 |  | -$app->get('/notification/{id}[/{referrer}]', NotificationController::class.':getNotificationClick')->setName('notification'); | 
                                                                                                            
                                                            |  | 121 | +$app->get('/notification/{id}[/{referrer}]', NotificationController::class . ':getNotificationClick')->setName('notification'); | 
                                                                                                            
                                                            | 122 | 122 |   | 
                                                                                                            
                                                            | 123 | 123 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 124 | 124 |  // CALENDAR | 
                                                                                                            
                                                            | 125 | 125 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 126 | 126 |   | 
                                                                                                            
                                                            | 127 |  | -$app->get('/calendar/{token}.{format}', CalendarController::class.':getRenderedCalendar')->setName('user-calendar'); | 
                                                                                                            
                                                            |  | 127 | +$app->get('/calendar/{token}.{format}', CalendarController::class . ':getRenderedCalendar')->setName('user-calendar'); | 
                                                                                                            
                                                            | 128 | 128 |   | 
                                                                                                            
                                                            | 129 | 129 |  // legacy | 
                                                                                                            
                                                            | 130 |  | -$app->get('/calendar.php', CalendarController::class.':getLegacyRenderedCalendar')->setName('user-calendar'); | 
                                                                                                            
                                                            |  | 130 | +$app->get('/calendar.php', CalendarController::class . ':getLegacyRenderedCalendar')->setName('user-calendar'); | 
                                                                                                            
                                                            | 131 | 131 |   | 
                                                                                                            
                                                            | 132 | 132 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 133 | 133 |  // OTHER | 
                                                                                                            
                                                            | 134 | 134 |  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 
                                                                                                            
                                                            | 135 | 135 |   | 
                                                                                                            
                                                            | 136 |  | -$app->get('/settings', function ($request, $response, $args) { | 
                                                                                                            
                                                            |  | 136 | +$app->get('/settings', function($request, $response, $args) { | 
                                                                                                            
                                                            | 137 | 137 |      // Sample log message | 
                                                                                                            
                                                            | 138 | 138 |      $this->logger->info("Fetch settings GET '/settings'"); | 
                                                                                                            
                                                            | 139 | 139 |   | 
                                                                                                            
                                                            | 140 | 140 |      return $this->view->render($response, 'settings.twig', []); | 
                                                                                                            
                                                            | 141 | 141 |  })->setName('settings'); | 
                                                                                                            
                                                            | 142 | 142 |   | 
                                                                                                            
                                                            | 143 |  | -$app->get('/token', function ($request, $response, $args) { | 
                                                                                                            
                                                            |  | 143 | +$app->get('/token', function($request, $response, $args) { | 
                                                                                                            
                                                            | 144 | 144 |      return $response->getBody()->write(Crypt::generateToken(30)); | 
                                                                                                            
                                                            | 145 | 145 |  })->setName('token'); | 
                                                                                                            
                                                            | 146 | 146 |   | 
                                                                                                            
                                                            | 147 |  | -$app->get('/', function ($request, $response, $args) { | 
                                                                                                            
                                                            |  | 147 | +$app->get('/', function($request, $response, $args) { | 
                                                                                                            
                                                            | 148 | 148 |      // Sample log message | 
                                                                                                            
                                                            | 149 | 149 |      $this->logger->info("Fetch home GET '/'"); | 
                                                                                                            
                                                            | 150 | 150 |   |