ILIAS  release_8 Revision v8.24
class.ilCtrlPathFactory.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 2021 Thibeau Fuhrer <thf@studer-raimann.ch> Extended GPL, see docs/LICENSE */
6
13{
18
25 {
26 $this->structure = $structure;
27 }
28
33 {
34 if (is_array($target)) {
35 return new ilCtrlArrayClassPath($this->structure, $context, $target);
36 }
37
38 if (is_string($target)) {
39 return new ilCtrlSingleClassPath($this->structure, $context, $target);
40 }
41
42 return $this->null();
43 }
44
48 public function existing(string $cid_path): ilCtrlPathInterface
49 {
50 return new ilCtrlExistingPath($this->structure, $cid_path);
51 }
52
56 public function null(): ilCtrlPathInterface
57 {
58 return new ilCtrlNullPath();
59 }
60}
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
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...
Interface ilCtrlPathFactoryInterface describes the ilCtrl Path factory.
Interface ilCtrlPathInterface is responsible for holding and manipulating a valid ilCtrl class-path (...
$context
Definition: webdav.php:29