123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
-
- namespace App\Http\Controller;
-
- use Luticate\Utils\Dbo\LuIntDbo;
- use Luticate\Utils\LuController;
- use App\Http\Business\DnsRecordsBusiness;
- use App\Http\DBO\DnsRecordsDbo;
-
- class DnsRecordsController extends LuController {
- protected function getBusiness()
- {
- return new DnsRecordsBusiness();
- }
-
- /**
- * Get all dns domain records
- * @param LuIntDbo $domain_id The domain id
- * @param int $page The page number, 0 based
- * @param int $perPage Items per page
- * @param string $query The filter query
- * @return \App\Http\DBO\DnsDomainsDbo[]
- */
- public function getAll(LuIntDbo $domain_id, $page = 0, $perPage = 20000000, $query = "")
- {
- return DnsRecordsBusiness::getAll($domain_id->getInt(), $page, $perPage, $query);
- }
-
- /**
- * Add a new DNS domain record
- * @param DnsRecordsDbo $record The new domain record
- * @return int
- */
- public function add(DnsRecordsDbo $record)
- {
- return DnsRecordsBusiness::add($record);
- }
-
- /**
- * Delete a DNS domain record
- * @param LuIntDbo $domain_id The domain record id
- * @return bool
- */
- public function del(LuIntDbo $domain_id)
- {
- return DnsRecordsBusiness::deleteById($domain_id->getInt());
- }
- }
|