We're moving all classes one namespace layer up (with the exception for extending Database classes. This makes it less verbose and probably save a few seconds to type every time.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/18
Closes#14
From the example in the issue, this can now be fixed like this:
```php
final public DateTimeImmutable $date_created {
get => new DateTimeImmutable($this->get(Fields::DATE_CREATED->value));
set (DateTimeImmutable $date_created) => new DateTimeImmutable(
$this->set(Fields::DATE_CREATED->value,
$date_created->format(Database::DATETIME_FORMAT)
));
}
```
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/16
This PR adds a new database boilerplate for manipulating data stored in a database through an instanced database Model. The only method implemented by this class so far is `Controller()->update()`. It can be used to patch column values for a database row given an instanced `vlw\Database\Model`. An associative array of column keys and values are then passed to the update method.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/13
This change is primarily to accommodate the new `Reflect::serialize()` method since we don't want to include the isset property when returning serialized objects.
Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/9