<?php
namespace KommaApp\Shop\Entities;
abstract class AbstractEntity
{
public function __construct(array $data = [])
{
$this->fill($data);
}
public function fill(array $data)
{
foreach($data as $key => $value)
{
if(property_exists($this, $key)) $this->{$key} = $value;
}
}
}