Updating Build model to add accessor for the extra column

This commit is contained in:
Dan Cryer 2014-05-12 14:07:09 +01:00
parent 9486bd0863
commit 03351214f1

View file

@ -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;
}
}