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.

DnsRecordsController.php 1.3KB

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