Bristol SU Support Package
CheckLoggedIntoActivityInstance.php
Go to the documentation of this file.
1 <?php
2 
4 
8 
13 {
14 
21 
28  {
29  $this->activityInstanceResolver = $activityInstanceResolver;
30  }
31 
40  public function handle(Request $request, \Closure $next)
41  {
42  try {
43  $this->activityInstanceResolver->getActivityInstance();
44  } catch (\Exception $exception) {
45  // We're not currently in an activity instance, so we should throw an exception
46  // The exception handler should gracefully handle this exception
48  }
49  return $next($request);
50  }
51 
52 }