/**
  * {@inheritdoc}
  */
 public function patch(Log $log, array $patch)
 {
     $operation = new Callback(function () use($log, $patch) {
         return $this->client->patch($log, $patch);
     });
     $this->operationRunner->run($operation);
     return $operation->getResult();
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function create()
 {
     $log = $this->client->create(TreeLog::fromNode(new Container()));
     return $this->from($log);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function updateStatus($status)
 {
     $patch = ['status' => $status, $status . 'At' => (new \DateTime())->format(\DateTime::ISO8601)];
     $this->log = $this->client->patch($this->log, $patch);
     return $this;
 }
Ejemplo n.º 4
0
 /**
  * @When I archive the log
  */
 public function iArchiveTheLog()
 {
     $this->log = $this->client->archive($this->log);
 }