1 | <?php |
||
18 | abstract class DomainObject extends BaseObject |
||
19 | { |
||
20 | /** @var Domain */ |
||
21 | private $domain; |
||
22 | |||
23 | /** |
||
24 | * @param string $name Canonical name for the object |
||
25 | * @param Domain $domain Domain to which the object belongs |
||
26 | */ |
||
27 | protected function __construct($name, Domain $domain) |
||
32 | |||
33 | /** |
||
34 | * Invokes a POST command on a domain object. |
||
35 | * |
||
36 | * @param string $command Command to invoke |
||
37 | * @param string $action Action to execute |
||
38 | * @param array $parameters Additional options for the command |
||
39 | * @param bool $clearCache Whether to clear the domain cache |
||
40 | * @return array Response from the API |
||
41 | */ |
||
42 | protected function invokePost($command, $action, $parameters = [], $clearCache = true) |
||
46 | |||
47 | /** |
||
48 | * @return Domain |
||
49 | */ |
||
50 | public function getDomain() |
||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getDomainName() |
||
62 | |||
63 | /** |
||
64 | * Converts an associative array of descriptors to objects of the specified type. |
||
65 | * |
||
66 | * @param array $items |
||
67 | * @param string $class |
||
68 | * @param Domain $domain |
||
69 | * @return array |
||
70 | */ |
||
71 | public static function toDomainObjectArray(array $items, $class, Domain $domain) |
||
78 | } |
||
79 |