Fixing getAccessInformation()

This commit is contained in:
Dan Cryer 2014-02-26 15:23:24 +00:00
parent 48a8c8b89a
commit 192fa20284
2 changed files with 15 additions and 15 deletions

View file

@ -77,19 +77,4 @@ class Build extends BuildBase
{
return ($this->getStatus() === self::STATUS_SUCCESS);
}
public function getAccessInformation($key = null)
{
$data = unserialize($this->data['access_information']);
if (is_null($key)) {
$rtn = $data;
} else if (isset($data[$key])) {
$rtn = $data[$key];
} else {
$rtn = null;
}
return $rtn;
}
}

View file

@ -43,4 +43,19 @@ class Project extends ProjectBase
return null;
}
public function getAccessInformation($key = null)
{
$data = unserialize($this->data['access_information']);
if (is_null($key)) {
$rtn = $data;
} elseif (isset($data[$key])) {
$rtn = $data[$key];
} else {
$rtn = null;
}
return $rtn;
}
}