ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
Target.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 class Target
24 {
28  private $path;
29 
34  public function __construct($path, private readonly string $command = '', private readonly array $query_params = [])
35  {
36  $this->path = $path;
37  }
38 
42  public function guiPath()
43  {
44  return $this->path;
45  }
46 
47  public function command(): string
48  {
49  return $this->command;
50  }
51 
52  public function guiName(): string
53  {
54  $path = $this->guiPath();
55  return is_array($path) ? $path[count($path) - 1] : $path;
56  }
57 
61  public function queryParams(): array
62  {
63  return $this->query_params;
64  }
65 }
__construct($path, private readonly string $command='', private readonly array $query_params=[])
Definition: Target.php:34