ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
◀ ilDoc Overview
Builder.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Services\Paths
;
22
23
use
ILIAS\MetaData\Paths\PathInterface
;
24
use
ILIAS\MetaData\Paths\Filters\FilterType
;
25
use
ILIAS\MetaData\Paths\BuilderInterface
as
InternalBuilderInterface
;
26
27
class
Builder
implements
BuilderInterface
28
{
29
protected
InternalBuilderInterface
$internal_builder
;
30
31
public
function
__construct
(
InternalBuilderInterface
$internal_builder)
32
{
33
$internal_builder->withRelative(
false
)
34
->withLeadsToExactlyOneElement(
false
);
35
$this->internal_builder =
$internal_builder
;
36
}
37
38
public
function
withNextStep
(
string
$name):
BuilderInterface
39
{
40
$clone = clone $this;
41
$clone->internal_builder = $clone->internal_builder->
withNextStep
($name);
42
return
$clone;
43
}
44
45
public
function
withNextStepToSuperElement
():
BuilderInterface
46
{
47
$clone = clone $this;
48
$clone->internal_builder = $clone->internal_builder->
withNextStepToSuperElement
();
49
return
$clone;
50
}
51
52
public
function
withAdditionalFilterAtCurrentStep
(
53
FilterType
$type,
54
string
...$values
55
):
BuilderInterface
{
56
$clone = clone $this;
57
$clone->internal_builder = $clone->internal_builder->
withAdditionalFilterAtCurrentStep
(
58
$type,
59
...$values
60
);
61
return
$clone;
62
}
63
64
public
function
get
():
PathInterface
65
{
66
return
$this->internal_builder->get();
67
}
68
}
ILIAS\MetaData\Services\Paths\Builder
Definition:
Builder.php:27
ILIAS\MetaData\Services\Paths
Definition:
Builder.php:21
ILIAS\MetaData\Services\Paths\Builder\__construct
__construct(InternalBuilderInterface $internal_builder)
Definition:
Builder.php:31
ILIAS\MetaData\Paths\Filters\FilterType
FilterType
Values should always be all lowercase.
Definition:
FilterType.php:26
ILIAS\MetaData\Paths\PathInterface
Definition:
PathInterface.php:25
ILIAS\MetaData\Services\Paths\Builder\$internal_builder
InternalBuilderInterface $internal_builder
Definition:
Builder.php:29
ILIAS\MetaData\Paths\BuilderInterface\withNextStep
withNextStep(string $name, bool $add_as_first=false)
Add the next step to the path.
ILIAS\MetaData\Services\Paths\Builder\withAdditionalFilterAtCurrentStep
withAdditionalFilterAtCurrentStep(FilterType $type, string ... $values)
Adds a filter to the current step, restricting what elements are included in it:
Definition:
Builder.php:52
ILIAS\MetaData\Paths\BuilderInterface\withAdditionalFilterAtCurrentStep
withAdditionalFilterAtCurrentStep(FilterType $type, string ... $values)
Adds a filter to the current step, restricting what elements are included in it:
ILIAS\MetaData\Services\Paths\Builder\withNextStep
withNextStep(string $name)
Definition:
Builder.php:38
ILIAS\MetaData\Paths\BuilderInterface\withNextStepToSuperElement
withNextStepToSuperElement(bool $add_as_first=false)
Add going to the super element as the next step to the path.
PathInterface
ILIAS\MetaData\Services\Paths\Builder\withNextStepToSuperElement
withNextStepToSuperElement()
Definition:
Builder.php:45
ILIAS\MetaData\Paths\BuilderInterface
Definition:
BuilderInterface.php:28
BuilderInterface
Services
MetaData
classes
Services
Paths
Builder.php
Generated on Wed Sep 10 2025 14:11:45 for ILIAS by
1.8.13 (using
Doxyfile
)