19 declare(strict_types=1);
40 public function withNextStep(
string $name,
bool $add_as_first =
false):
BuilderInterface 42 return new self($this->path .
':' . $name);
45 public function withNextStepToSuperElement(
bool $add_as_first =
false):
BuilderInterface 47 return new self($this->path .
':^');
50 public function withAdditionalFilterAtCurrentStep(
54 $filter =
'{' . $type->value .
';' . implode(
',', $values) .
'}';
55 return new self($this->path . $filter);
61 public function __construct(
public string $path_string)
68 return new class ($internal_builder) extends
Builder {
74 public function exposePath():
string 76 return $this->internal_builder->path;
84 $builder1 = $builder->withNextStep(
'step');
88 $builder->exposePath()
92 $builder1->exposePath()
99 $builder1 = $builder->withNextStepToSuperElement();
103 $builder->exposePath()
107 $builder1->exposePath()
114 $builder1 = $builder->withAdditionalFilterAtCurrentStep(
FilterType::DATA,
'v1',
'v2');
118 $builder->exposePath()
122 $builder1->exposePath()
129 ->withNextStep(
'step1')
130 ->withNextStepToSuperElement()
131 ->withNextStep(
'step2')
132 ->withAdditionalFilterAtCurrentStep(FilterType::MDID,
'12');
134 ->withNextStep(
'step3')
135 ->withNextStepToSuperElement();
138 ':step1:^:step2{id;12}',
139 $builder->get()->path_string
142 ':step1:^:step2{id;12}:step3:^',
143 $builder3->get()->path_string