ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilCtrlPathFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
27 {
32 
38  public function __construct(ilCtrlStructureInterface $structure)
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 }
$context
Definition: webdav.php:31
Class ilCtrlPathFactory.
existing(string $cid_path)
ilCtrlStructureInterface $structure
Class ilCtrlArrayClassPath.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
find(ilCtrlContextInterface $context, $target)
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...
Class ilCtrlExistingPath.
Class ilCtrlNullPath.
__construct(ilCtrlStructureInterface $structure)
ilCtrlPathFactory Constructor
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...