New bootstrap-based layout #30
@ -27,7 +27,10 @@ class Asset
|
|||||||
protected function __construct(array $data)
|
protected function __construct(array $data)
|
||||||
{
|
{
|
||||||
foreach ($data as $attribute => $value)
|
foreach ($data as $attribute => $value)
|
||||||
$this->$attribute = $value;
|
{
|
||||||
|
if (property_exists($this, $attribute))
|
||||||
|
$this->$attribute = $value;
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($data['date_captured']) && $data['date_captured'] !== 'NULL')
|
if (!empty($data['date_captured']) && $data['date_captured'] !== 'NULL')
|
||||||
$this->date_captured = new DateTime($data['date_captured']);
|
$this->date_captured = new DateTime($data['date_captured']);
|
||||||
|
Loading…
Reference in New Issue
Block a user