for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Acquia\Cloud\Api\Response;
use Acquia\Json\Json;
class Task extends \Acquia\Rest\Element
{
/**
* @var string
*/
protected $idColumn = 'id';
* @return string
public function id()
return $this['id'];
}
public function state()
return $this['state'];
* @return boolean
public function started()
return !empty($this['started']);
* Gets the Unix timestamp indicating when this task was started.
*
* @return int
* The Unix timestamp.
public function startTime() {
return intval($this['started']);
* @return string|array
public function body()
if (preg_match('/^[\[{]/', $this['body'])) {
return Json::decode($this['body']);
} else {
return $this['body'];
public function hidden()
return !empty($this['hidden']);
public function description()
return $this['description'];
public function result()
return $this['result'];
public function completed()
return !empty($this['completed']);
* Gets the Unix timestamp indicating when this task was completed.
public function completedTime() {
return intval($this['completed']);
* @return \DateTime
public function created()
$created = new \DateTime();
return $created->setTimestamp($this['created']);
public function queue()
return $this['queue'];
* @return array
public function cookie()
return Json::decode($this['cookie']);
public function recipient()
return $this['recipient'];
public function sender()
return $this['sender'];
* @return percentage
public function percentage()
return $this['percentage'];
* Gets the task log data.
* The log data.
public function logs() {
return $this['logs'];