mirror of
https://codeberg.org/vlw/scaffold.git
synced 2025-11-04 21:52:41 +01:00
refactor: replace the Model->isset property with a public instance method (#9)
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
This commit is contained in:
parent
feea36b190
commit
00337cd3aa
1 changed files with 2 additions and 3 deletions
|
|
@ -72,9 +72,8 @@
|
|||
*
|
||||
* @return bool Entity exists
|
||||
*/
|
||||
public bool $isset {
|
||||
// Returns bool if row is set or attempts to resolve and set if null
|
||||
get => $this->_isset ??= new Database()
|
||||
public function isset(): bool {
|
||||
return $this->_isset ??= new Database()
|
||||
->from($this->table)
|
||||
->where($this->where)
|
||||
->limit(1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue