Updating Build model to add accessor for the extra column
This commit is contained in:
parent
9486bd0863
commit
03351214f1
|
@ -164,4 +164,19 @@ class Build extends BuildBase
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getExtra($key = null)
|
||||
{
|
||||
$data = unserialize($this->data['extra']);
|
||||
|
||||
if (is_null($key)) {
|
||||
$rtn = $data;
|
||||
} elseif (isset($data[$key])) {
|
||||
$rtn = $data[$key];
|
||||
} else {
|
||||
$rtn = null;
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue