diff options
| author | winter | 2025-01-14 21:39:11 +0000 |
|---|---|---|
| committer | winter | 2025-01-14 21:39:11 +0000 |
| commit | 85038ca07c9909eb6503d5b0e529a2cc080d2a06 (patch) | |
| tree | b21b955f28d1d9245d53ad630a2ed1eedb63ebce /Digitigrade/Model.php | |
| parent | 27d0d594695f77f3280f587cf5d7ae41317dc7c5 (diff) | |
fix bugs in note federation
Diffstat (limited to 'Digitigrade/Model.php')
| -rw-r--r-- | Digitigrade/Model.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Digitigrade/Model.php b/Digitigrade/Model.php index be664cb..71cfa5c 100644 --- a/Digitigrade/Model.php +++ b/Digitigrade/Model.php @@ -287,4 +287,12 @@ abstract class Model { $db->exec("DELETE FROM $tableName WHERE $where"); } + + /** + * Converts the model to an opaque string, to be used for equality checking or debugging purposes only. + * @return string + */ + public function __tostring(): string { + return '<Model:' . static::class . '[' . $this->getUpdateWhereClause(Db::getInstance()->getPdo()) . ']>'; + } }
\ No newline at end of file |
