ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilCtrlPathFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
32
39 {
40 $this->structure = $structure;
41 }
42
47 {
48 if (is_array($target)) {
49 return new ilCtrlArrayClassPath($this->structure, $context, $target);
50 }
51
52 if (is_string($target)) {
53 return new ilCtrlSingleClassPath($this->structure, $context, $target);
54 }
55
56 return $this->null();
57 }
58
62 public function existing(string $cid_path): ilCtrlPathInterface
63 {
64 return new ilCtrlExistingPath($this->structure, $cid_path);
65 }
66
70 public function null(): ilCtrlPathInterface
71 {
72 return new ilCtrlNullPath();
73 }
74}
Class ilCtrlArrayClassPath.
Class ilCtrlExistingPath.
Class ilCtrlNullPath.
Class ilCtrlPathFactory.
__construct(ilCtrlStructureInterface $structure)
ilCtrlPathFactory Constructor
ilCtrlStructureInterface $structure
find(ilCtrlContextInterface $context, $target)
@inheritDoc
existing(string $cid_path)
@inheritDoc
Class ilCtrlSingleClassPath.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$context
Definition: webdav.php:31