Contract WIP

This commit is contained in:
Frank Schubert
2022-06-13 17:27:08 +02:00
parent 121312cdc3
commit e5233568a3
5 changed files with 386 additions and 32 deletions
+15 -1
View File
@@ -218,8 +218,22 @@ class mfBaseModel {
}
}
// generic functions for entity-classes
public function toArray() {
if(!$this->id) {
return [];
}
$item = [];
$item['id'] = $this->id;
foreach($this->data as $key => $value) {
$item[$key] = $value;
}
return $item;
}
// generic functions for entity-classes
public function __toString() {
return (string) $this->data->Name;
}