mirror of
https://codeberg.org/vlw/scaffold.git
synced 2025-11-05 06:02:42 +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
014945ee10
1 changed files with 2 additions and 3 deletions
|
|
@ -72,9 +72,8 @@
|
||||||
*
|
*
|
||||||
* @return bool Entity exists
|
* @return bool Entity exists
|
||||||
*/
|
*/
|
||||||
public bool $isset {
|
public function isset(): bool {
|
||||||
// Returns bool if row is set or attempts to resolve and set if null
|
return $this->_isset ??= new Database()
|
||||||
get => $this->_isset ??= new Database()
|
|
||||||
->from($this->table)
|
->from($this->table)
|
||||||
->where($this->where)
|
->where($this->where)
|
||||||
->limit(1)
|
->limit(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue