Extended data structure with branch field

This commit is contained in:
Steffen Lange 2020-03-30 01:42:46 +02:00
parent f0c7c5fae0
commit 2a83cbf9c1
3 changed files with 10 additions and 4 deletions

View file

@ -4,6 +4,7 @@ class PatchObject {
private $id = '';
private $vendor = '';
private $product = '';
private $branch = '';
private $version = '';
private $url = '';
private $timestamp = 0;
@ -14,10 +15,10 @@ class PatchObject {
}
}
function __toString() : string {
return $this->vendor . ' ' . $this->product . ' ' . $this->version;
return $this->vendor . ' ' . $this->product . ' ' . $this->branch . ' ' . $this->version;
}
function toArray() : array {
return array('id' => $this->id, 'vendor' => $this->vendor, 'product' => $this->product, 'version' => $this->version, 'url' => $this->url, 'timestamp' => $this->timestamp);
return array('id' => $this->id, 'vendor' => $this->vendor, 'product' => $this->product, 'branch' => $this->branch, 'version' => $this->version, 'url' => $this->url, 'timestamp' => $this->timestamp);
}
function getId() : string {
return $this->id;
@ -28,6 +29,9 @@ class PatchObject {
function getProduct() : string {
return $this->product;
}
function getBranch() : string {
return $this->branch;
}
function getVersion() : string {
return $this->version;
}