| 1 | <?php |
||
| 19 | class Link |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $module; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $controller; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var array |
||
| 33 | */ |
||
| 34 | protected $params; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | protected $acl; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @var array |
||
| 43 | */ |
||
| 44 | protected $filters = []; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Constructor of Link |
||
| 48 | * |
||
| 49 | * @access public |
||
| 50 | * |
||
| 51 | * @param string $module |
||
| 52 | * @param string $controller |
||
| 53 | */ |
||
| 54 | 15 | public function __construct(string $module, string $controller) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Set ACL privilege |
||
| 62 | * |
||
| 63 | * @param string $acl |
||
| 64 | * |
||
| 65 | * @return Link |
||
| 66 | */ |
||
| 67 | 2 | public function acl(string $acl) : Link |
|
| 72 | |||
| 73 | /** |
||
| 74 | * Set filters for data |
||
| 75 | * |
||
| 76 | * @param array $filters |
||
| 77 | * |
||
| 78 | * @return Link |
||
| 79 | */ |
||
| 80 | public function filter(array $filters) : Link |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @return string |
||
| 88 | */ |
||
| 89 | 13 | public function getModule(): string |
|
| 93 | |||
| 94 | /** |
||
| 95 | * @param string $module |
||
| 96 | */ |
||
| 97 | 15 | protected function setModule(string $module) |
|
| 101 | |||
| 102 | /** |
||
| 103 | * @return string |
||
| 104 | */ |
||
| 105 | 13 | public function getController(): string |
|
| 109 | |||
| 110 | /** |
||
| 111 | * @param string $controller |
||
| 112 | */ |
||
| 113 | 15 | protected function setController(string $controller) |
|
| 117 | |||
| 118 | /** |
||
| 119 | * @return array |
||
| 120 | */ |
||
| 121 | 13 | public function getParams(): array |
|
| 125 | |||
| 126 | /** |
||
| 127 | * @param array $params |
||
| 128 | */ |
||
| 129 | 13 | public function setParams(array $params) |
|
| 133 | |||
| 134 | /** |
||
| 135 | * @return string|null |
||
| 136 | */ |
||
| 137 | 15 | public function getAcl() |
|
| 141 | |||
| 142 | /** |
||
| 143 | * @param string $acl |
||
| 144 | */ |
||
| 145 | 2 | protected function setAcl(string $acl) |
|
| 149 | |||
| 150 | /** |
||
| 151 | * @return array |
||
| 152 | */ |
||
| 153 | public function getFilters(): array |
||
| 157 | |||
| 158 | /** |
||
| 159 | * Setup data filters |
||
| 160 | * |
||
| 161 | * @param array $filters |
||
| 162 | */ |
||
| 163 | protected function setFilters(array $filters) |
||
| 167 | } |
||
| 168 |