Domain.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CatchAdmin [Just Like ~ ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
  8. // +----------------------------------------------------------------------
  9. // | Author: JaguarJack [ njphper@gmail.com ]
  10. // +----------------------------------------------------------------------
  11. namespace catchAdmin\domain\support\driver\aliyun;
  12. use catchAdmin\domain\support\contract\DomainActionInterface;
  13. use catchAdmin\domain\support\driver\ApiTrait;
  14. use catchAdmin\domain\support\Transformer;
  15. class Domain implements DomainActionInterface
  16. {
  17. use ApiTrait;
  18. public function getList(array $params)
  19. {
  20. // TODO: Implement getList() method.
  21. return Transformer::aliyunDomainPaginate($this->get([
  22. 'Action' => 'DescribeDomains',
  23. 'StarMark' => true,
  24. 'SearchModel' => 'LIKE',
  25. 'PageNumber' => $params['page'] ?? 1,
  26. 'PageSize' => $params['limit'] ?? 20,
  27. ]));
  28. }
  29. public function store(array $params)
  30. {
  31. // TODO: Implement add() method.
  32. }
  33. public function delete(array $params)
  34. {
  35. // TODO: Implement delete() method.
  36. return $this->get([
  37. 'Action' => 'DeleteDomain',
  38. 'DomainName' => $params['name'],
  39. ]);
  40. }
  41. public function read($name)
  42. {
  43. // TODO: Implement info() method.
  44. return $this->get([
  45. 'Action' => 'DescribeDomainInfo',
  46. 'DomainName' => $name
  47. ]);
  48. }
  49. }