1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
-
- namespace App\Http\Controller;
-
- use Luticate\Utils\Dbo\LuIntDbo;
- use Luticate\Utils\LuController;
- use App\Http\Business\DnsDomainsBusiness;
- use App\Http\DBO\DnsDomainsDbo;
-
- class DnsDomainsController extends LuController {
- protected function getBusiness()
- {
- return new DnsDomainsBusiness();
- }
-
- /**
- * Get all dns domains
- * @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($page = 0, $perPage = 20000000, $query = "")
- {
- return DnsDomainsBusiness::getAll($page, $perPage, $query);
- }
-
- /**
- * Add a new DNS domain
- * @param DnsDomainsDbo $domain The new domain
- * @return int
- */
- public function add(DnsDomainsDbo $domain)
- {
- return DnsDomainsBusiness::add($domain);
- }
-
- /**
- * Delete a DNS domain
- * @param LuIntDbo $domain_id The domain id
- * @return bool
- */
- public function del(LuIntDbo $domain_id)
- {
- return DnsDomainsBusiness::deleteById($domain_id->getInt());
- }
- }
|