| Total Complexity | 5 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class AAPanelCategory extends AAPanelConnect |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Class Construct |
||
| 15 | */ |
||
| 16 | public function __construct() |
||
| 17 | { |
||
| 18 | parent::__construct(); |
||
| 19 | } |
||
| 20 | |||
| 21 | |||
| 22 | /** |
||
| 23 | * @description List Category |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public function List(): mixed |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @description Create Category |
||
| 35 | * @param string $name |
||
| 36 | * @return mixed |
||
| 37 | */ |
||
| 38 | public function Create(string $name): mixed |
||
| 39 | { |
||
| 40 | $url = $this->serverUrl .'/site?action=add_site_type'; |
||
| 41 | |||
| 42 | $this->data['name'] = $name; |
||
| 43 | return (parent::Execute($url,$this->data)); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @description Update Category |
||
| 48 | * @param int $id |
||
| 49 | * @param string $name |
||
| 50 | * @return mixed |
||
| 51 | */ |
||
| 52 | public function Update(int $id, string $name): mixed |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @description Delete Category |
||
| 63 | * @param int $id |
||
| 64 | * @return mixed |
||
| 65 | */ |
||
| 66 | public function Delete(int $id): mixed |
||
| 72 | } |
||
| 73 | } |