*
* @property int id
*/
-abstract class BaseModel
+abstract class BaseModel extends BaseEntity
{
/** @var Database */
protected $dba;
$this->originalData = $data;
}
- /**
- * Maps a data array (original/current) to a known field list of the chosen model
- *
- * This is useful to filter out additional attributes, which aren't part of the db-table (like readonly cached fields)
- *
- * @param array $data The data array to map to db-fields
- *
- * @return array the mapped data array
- */
- protected function mapFields(array $data)
- {
- return $data;
- }
-
public function getOriginalData()
{
- return $this->mapFields($this->originalData);
+ return $this->originalData;
}
public function resetOriginalData()
public function toArray()
{
- return $this->mapFields($this->data);
+ return $this->data;
}
protected function checkValid()