-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53c9eb1
commit b328791
Showing
4 changed files
with
113 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace HadesArchitect\UnitedDomains; | ||
|
||
use HadesArchitect\UnitedDomains\Exception\ApiException; | ||
|
||
interface BaseClientInterface | ||
{ | ||
/** | ||
* @param $method | ||
* @param array $properties | ||
* @throws ApiException | ||
* @return ResponseInterface | ||
*/ | ||
public function call($method, array $properties = []): ResponseInterface; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
|
||
namespace HadesArchitect\UnitedDomains; | ||
|
||
use HadesArchitect\UnitedDomains\Exception\InvalidParameterException; | ||
|
||
interface ClientInterface extends BaseClientInterface | ||
{ | ||
/** | ||
* @param string $domain | ||
* @return bool | ||
*/ | ||
public function isDomainFree(string $domain): bool; | ||
|
||
/** | ||
* @param string $zone | ||
* @param string $soamname | ||
* @param string $soarname | ||
*/ | ||
public function CreateDNSZone(string $zone, string $soamname = '', string $soarname = ''): void; | ||
|
||
/** | ||
* @param string $zone | ||
*/ | ||
public function DeleteDNSZone(string $zone): void; | ||
|
||
/** | ||
* @param string $zone | ||
* @param string $name | ||
* @param string $type | ||
* @param string $data | ||
* @param int $ttl | ||
* @param string $class | ||
*/ | ||
public function addRecord(string $zone, string $name, string $type, string $data, int $ttl = 3600, string $class = 'IN'); | ||
|
||
/** | ||
* @param string $zone | ||
* @param array $records | ||
* @throws InvalidParameterException | ||
*/ | ||
public function addRecords(string $zone, array $records); | ||
|
||
/** | ||
* @param string $zone | ||
* @param string $name | ||
* @param string $type | ||
* @param string|bool $data | ||
* @param string $class | ||
*/ | ||
public function deleteRecord(string $zone, string $name, string $type, $data = false, string $class = 'IN'): void; | ||
|
||
/** | ||
* @param string $zone | ||
* @return array | ||
*/ | ||
public function getRecords(string $zone); | ||
|
||
/** | ||
* @param string $zone | ||
* @param string $type | ||
* | ||
* @return array | ||
*/ | ||
public function findRecordsByType(string $zone, string $type); | ||
} |