ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
Factory.php
Go to the documentation of this file.
1<?php
2
20
22
27{
28 public function __construct(
29 private Context $context
30 ) {
31 }
32
33 public function cannot(): CannotHandle
34 {
35 return new CannotHandle();
36 }
37
39 {
40 if ($this->context->isUserLoggedIn()) {
41 return new CannotReach();
42 }
43
44 return new MaybeCanHandlerAfterLogin();
45 }
46
47 public function can(string $uri_path, bool $shift = false): CanHandleWithURIPath
48 {
49 return new CanHandleWithURIPath($uri_path, $shift ? 1 : 0);
50 }
51}
__construct(private Context $context)
Definition: Factory.php:28
can(string $uri_path, bool $shift=false)
Definition: Factory.php:47
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...