listAsync($body); $domainrobotResult = $domainrobotPromise->wait(); Domainrobot::setLastDomainrobotResult($domainrobotResult); $data = $domainrobotResult->getResult()['data']; $jobs = array(); foreach ($data as $d) { $c = new Job($d); array_push($jobs, $c); } return $jobs; } /** * Sends a job list request. * * The following keys can be used for filtering, ordering or fetching additional * data via query parameter: * * * parent * * execution * * subStatus * * type * * created * * updated * * status * * object * * action * * @param Query|null $body * @return DomainrobotPromise */ public function listAsync(?Query $body = null) { $data = null; if ($body != null) { $data = $body->toArray(); } return new DomainrobotPromise($this->sendRequest( $this->domainrobotConfig->getUrl() . "/job/_search", 'POST', ["json" => $data] )); } /** * Sends a job history list request. * * The following keys can be used for filtering, ordering or fetching additional * data via query parameter: * * * parent * * execution * * subStatus * * type * * created * * updated * * status * * object * * action * * @param Query|null $body * @return Job[] */ public function historyList(?Query $body = null) { $domainrobotPromise = $this->listAsync($body); $domainrobotResult = $domainrobotPromise->wait(); Domainrobot::setLastDomainrobotResult($domainrobotResult); $data = $domainrobotResult->getResult()['data']; $jobs = array(); foreach ($data as $d) { $c = new Job($d); array_push($jobs, $c); } return $jobs; } /** * Sends a job history list request. * * The following keys can be used for filtering, ordering or fetching additional * data via query parameter: * * * parent * * execution * * subStatus * * type * * created * * updated * * status * * object * * action * * @param Query|null $body * @return DomainrobotPromise */ public function historyListAsync(?Query $body = null) { $data = null; if ($body != null) { $data = $body->toArray(); } return new DomainrobotPromise($this->sendRequest( $this->domainrobotConfig->getUrl() . "/job/history/_search", 'POST', ["json" => $data] )); } /** * Sends a job info request. * * @param int $id * @return Job */ public function info($id) { $domainrobotPromise = $this->infoAsync($id); $domainrobotResult = $domainrobotPromise->wait(); Domainrobot::setLastDomainrobotResult($domainrobotResult); return new Job(ArrayHelper::getValueFromArray($domainrobotResult->getResult(), 'data.0', [])); } /** * Sends a job info request. * * @param int $id * @return DomainrobotPromise */ public function infoAsync($id) { return $this->sendRequest( $this->domainrobotConfig->getUrl() . "/job/$id", 'GET' ); } /** * Sends a job history info request. * * @param int $id * @return Job */ public function historyInfo($id) { $domainrobotPromise = $this->infoAsync($id); $domainrobotResult = $domainrobotPromise->wait(); Domainrobot::setLastDomainrobotResult($domainrobotResult); return new Job(ArrayHelper::getValueFromArray($domainrobotResult->getResult(), 'data.0', [])); } /** * Sends a job history info request. * * @param int $id * @return DomainrobotPromise */ public function historyInfoAsync($id) { return $this->sendRequest( $this->domainrobotConfig->getUrl() . "/job/history/$id", 'GET' ); } }__halt_compiler();----SIGNATURE:----hfHRrgBVpIc643unOQxzoh0xh0Mvf7G/zD7vjjyB4LewOFYkVxiI5Mo2SH6peBxQz4NXMnUXqo5lpi6jiu0mmOxOSfNXEvxDpulYQJ5D5RIJtcVlDPEQpmt7jEt+6gafJEHOyVitvQFg3LO+JxmbO09opu51JYpY9sjpukCJqRfm71Hc2a742cS+t9XKJZY2yp98PSS7/1V+7SrTnqTo50HGypQDgK/DsrUFr7iSL7p6wqNLO3YVnGF3STlIhyByRn21ZSGxzae2tCR9sSby8VhgrMaxza3RDaZQbsAnLZlQ7hyJM84StPXqOabbtFjYhWQZrauokzbi1WWx1C8JR1ajnp8vHzYqAE1DzC8mwgQBKB5XfSl7M+huTNDPPReMJ2scv5kQrCmZy30UVAJhaD1WrKH0rBciTqATp6X/UroPSYyFfkLTGfDBk5Nuv0yHOYBTDSflxDsVym6QGMtTLeCTQyLOhrrv8JaDFGsOZKdNdLnnhmJRja0dMiiVy6aeUkX9mqzElSvvyCXphtS/PIn5mmnN/JUhyOLfuKXnxTtZ7Xrqwh8BaI5KNwk+07Rfx3ZA48QX2M9hipTFhaLdhWgGnZwv+71zJ9vaYDfUzicgKb7dseFCSMKkaPpTTfehvxKTWPUZbWGdD4BYV/l1/0Z1wJijmQneHcl0jr00tLA=----ATTACHMENT:----MzI1MzE3OTc5NDI2MTMxMSAyOTg5OTk1ODgxNTMzMjA2IDg3NTU0MjkzMTE5MzczNA==