You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DnsDomainsController.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Http\Controller;
  3. use Luticate\Utils\Dbo\LuIntDbo;
  4. use Luticate\Utils\LuController;
  5. use App\Http\Business\DnsDomainsBusiness;
  6. use App\Http\DBO\DnsDomainsDbo;
  7. class DnsDomainsController extends LuController {
  8. protected function getBusiness()
  9. {
  10. return new DnsDomainsBusiness();
  11. }
  12. /**
  13. * Get all dns domains
  14. * @param int $page The page number, 0 based
  15. * @param int $perPage Items per page
  16. * @param string $query The filter query
  17. * @return \App\Http\DBO\DnsDomainsDbo[]
  18. */
  19. public function getAll($page = 0, $perPage = 20000000, $query = "")
  20. {
  21. return DnsDomainsBusiness::getAll($page, $perPage, $query);
  22. }
  23. /**
  24. * Add a new DNS domain
  25. * @param DnsDomainsDbo $domain The new domain
  26. * @return int
  27. */
  28. public function add(DnsDomainsDbo $domain)
  29. {
  30. return DnsDomainsBusiness::add($domain);
  31. }
  32. /**
  33. * Delete a DNS domain
  34. * @param LuIntDbo $domain_id The domain id
  35. * @return bool
  36. */
  37. public function del(LuIntDbo $domain_id)
  38. {
  39. return DnsDomainsBusiness::deleteById($domain_id->getInt());
  40. }
  41. }