<?php

namespace App\Controllers\CLI\Cloudflare\API;

use App\Controllers\BaseController;
use App\Models\Cloudflare\API\AuthModel;
use App\Models\Cloudflare\API\AccountModel;
use App\Models\Cloudflare\API\ZoneModel;
use App\Models\Cloudflare\API\RecordModel;

class API extends BaseController
{
  private $_authModel = null;
  private $_accountModel = null;
  private $_zoneModel = null;
  private $_recordModel = null;

  final protected function getAuthModel()
  {
    return is_null($this->_authModel) ? new AuthModel() : $this->_authModel;
  }
  final protected function getAccountModel()
  {
    return is_null($this->_accountModel) ? new AccountModel() : $this->_accountModel;
  }
  final protected function getZoneModel()
  {
    return is_null($this->_zoneModel) ? new ZoneModel() : $this->_zoneModel;
  }
  final protected function getRecordModel()
  {
    return is_null($this->_recordModel) ? new RecordModel() : $this->_recordModel;
  }
}
