@@ -44,9 +44,9 @@ class Path implements PathType
44
44
use EscapeTrait;
45
45
use PathTypeTrait;
46
46
47
- const DIR_RIGHT = ["- " , "-> " ];
48
- const DIR_LEFT = ["<- " , "- " ];
49
- const DIR_UNI = ["- " , "- " ];
47
+ public const DIR_RIGHT = ["- " , "-> " ];
48
+ public const DIR_LEFT = ["<- " , "- " ];
49
+ public const DIR_UNI = ["- " , "- " ];
50
50
51
51
/**
52
52
* @var StructuralType The pattern left of the relationship
@@ -69,24 +69,24 @@ class Path implements PathType
69
69
private array $ types = [];
70
70
71
71
/**
72
- * @var Variable
72
+ * @var ? Variable
73
73
*/
74
- private Variable $ variable ;
74
+ private ? Variable $ variable ;
75
75
76
76
/**
77
- * @var int The minimum number of `relationship->node` hops away to search
77
+ * @var ? int The minimum number of `relationship->node` hops away to search
78
78
*/
79
- private int $ minHops ;
79
+ private ? int $ minHops ;
80
80
81
81
/**
82
- * @var int The maximum number of `relationship->node` hops away to search
82
+ * @var ? int The maximum number of `relationship->node` hops away to search
83
83
*/
84
- private int $ maxHops ;
84
+ private ? int $ maxHops ;
85
85
86
86
/**
87
- * @var int The exact number of `relationship->node` hops away to search
87
+ * @var ? int The exact number of `relationship->node` hops away to search
88
88
*/
89
- private int $ exactHops ;
89
+ private ? int $ exactHops ;
90
90
91
91
/**
92
92
* @var MapType|null
@@ -322,4 +322,92 @@ private function conditionToString(): string
322
322
323
323
return sprintf ("[%s] " , $ conditionInner );
324
324
}
325
+
326
+ /**
327
+ * @return MapType|null
328
+ */
329
+ public function getProperties (): ?MapType
330
+ {
331
+ return $ this ->properties ;
332
+ }
333
+
334
+ /**
335
+ * Returns the variable of the path.
336
+ *
337
+ * @return Variable
338
+ */
339
+ public function getVariable (): ?Variable
340
+ {
341
+ return $ this ->variable ;
342
+ }
343
+
344
+ /**
345
+ * Returns the left structure of the relationship.
346
+ *
347
+ * @return StructuralType
348
+ */
349
+ public function getA (): StructuralType
350
+ {
351
+ return $ this ->a ;
352
+ }
353
+
354
+ /**
355
+ * Returns the right structure of the relationship.
356
+ *
357
+ * @return StructuralType
358
+ */
359
+ public function getB (): StructuralType
360
+ {
361
+ return $ this ->b ;
362
+ }
363
+
364
+ /**
365
+ * Returns the direction of the path.
366
+ *
367
+ * @return string[]
368
+ */
369
+ public function getDirection (): array
370
+ {
371
+ return $ this ->direction ;
372
+ }
373
+
374
+ /**
375
+ * Returns the exact amount of hops configured.
376
+ *
377
+ * @return ?int
378
+ */
379
+ public function getExactHops (): ?int
380
+ {
381
+ return $ this ->exactHops ;
382
+ }
383
+
384
+ /**
385
+ * Returns the maximum amount of hops configured
386
+ *
387
+ * @return ?int
388
+ */
389
+ public function getMaxHops (): ?int
390
+ {
391
+ return $ this ->maxHops ;
392
+ }
393
+
394
+ /**
395
+ * Returns the minimum amount of hops configured.
396
+ *
397
+ * @return ?int
398
+ */
399
+ public function getMinHops (): int
400
+ {
401
+ return $ this ->minHops ;
402
+ }
403
+
404
+ /**
405
+ * Returns the types of the relationship.
406
+ *
407
+ * @return string[]
408
+ */
409
+ public function getTypes (): array
410
+ {
411
+ return $ this ->types ;
412
+ }
325
413
}
0 commit comments