ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
NullFactory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\MetaData\Paths;
22 
24 
25 class NullFactory implements FactoryInterface
26 {
27  public function fromString(string $string): PathInterface
28  {
29  return new NullPath();
30  }
31 
32  public function toElement(BaseElementInterface $to, bool $leads_to_exactly_one = false): PathInterface
33  {
34  return new NullPath();
35  }
36 
37  public function betweenElements(BaseElementInterface $from, BaseElementInterface $to, bool $leads_to_exactly_one = false): PathInterface
38  {
39  return new NullPath();
40  }
41 
42  public function custom(): BuilderInterface
43  {
44  return new NullBuilder();
45  }
46 }
toElement(BaseElementInterface $to, bool $leads_to_exactly_one=false)
Returns absolute path from root to the given element.
Definition: NullFactory.php:32
betweenElements(BaseElementInterface $from, BaseElementInterface $to, bool $leads_to_exactly_one=false)
Returns relative path between two given elements.
Definition: NullFactory.php:37