| 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 string |
||
| 33 | */ |
||
| 34 | protected $acl; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @var array |
||
| 38 | */ |
||
| 39 | protected $fields = []; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Constructor of Link |
||
| 43 | * |
||
| 44 | * @access public |
||
| 45 | * |
||
| 46 | * @param string $module |
||
| 47 | * @param string $controller |
||
| 48 | */ |
||
| 49 | 15 | public function __construct(string $module, string $controller) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Set ACL privilege |
||
| 57 | * |
||
| 58 | * @param string $acl |
||
| 59 | * |
||
| 60 | * @return Link |
||
| 61 | */ |
||
| 62 | 2 | public function acl(string $acl) : Link |
|
| 67 | |||
| 68 | /** |
||
| 69 | * Set filters for data |
||
| 70 | * |
||
| 71 | * @param array $fields |
||
| 72 | * |
||
| 73 | * @return Link |
||
| 74 | */ |
||
| 75 | public function fields(array $fields) : Link |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | 13 | public function getModule(): string |
|
| 88 | |||
| 89 | /** |
||
| 90 | * @param string $module |
||
| 91 | */ |
||
| 92 | 15 | protected function setModule(string $module) |
|
| 96 | |||
| 97 | /** |
||
| 98 | * @return string |
||
| 99 | */ |
||
| 100 | 13 | public function getController(): string |
|
| 104 | |||
| 105 | /** |
||
| 106 | * @param string $controller |
||
| 107 | */ |
||
| 108 | 15 | protected function setController(string $controller) |
|
| 112 | |||
| 113 | /** |
||
| 114 | * @return string|null |
||
| 115 | */ |
||
| 116 | 15 | public function getAcl() |
|
| 120 | |||
| 121 | /** |
||
| 122 | * @param string $acl |
||
| 123 | */ |
||
| 124 | 2 | protected function setAcl(string $acl) |
|
| 128 | |||
| 129 | /** |
||
| 130 | * @return array |
||
| 131 | */ |
||
| 132 | 13 | public function getFields(): array |
|
| 136 | |||
| 137 | /** |
||
| 138 | * Setup data filters |
||
| 139 | * |
||
| 140 | * @param array $fields |
||
| 141 | */ |
||
| 142 | protected function setFields(array $fields) |
||
| 146 | } |
||
| 147 |