ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 if (!$this->context->isUserLoggedIn() && !$this->context->isPublicSectionActive()) {
44 return new CannotReach();
45 }
46
47 return new MaybeCanHandlerAfterLogin();
48 }
49
50 public function can(string $uri_path): CanHandleWithURIPath
51 {
52 return new CanHandleWithURIPath($uri_path);
53 }
54}
__construct(private Context $context)
Definition: Factory.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$context
Definition: webdav.php:31