aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model.php
diff options
context:
space:
mode:
authorwinter2025-01-14 21:39:11 +0000
committerwinter2025-01-14 21:39:11 +0000
commit85038ca07c9909eb6503d5b0e529a2cc080d2a06 (patch)
treeb21b955f28d1d9245d53ad630a2ed1eedb63ebce /Digitigrade/Model.php
parent27d0d594695f77f3280f587cf5d7ae41317dc7c5 (diff)
fix bugs in note federation
Diffstat (limited to 'Digitigrade/Model.php')
-rw-r--r--Digitigrade/Model.php8
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