noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 05/13: add magic function toString


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/13: add magic function toString
Date: Sun, 16 Oct 2022 17:26:14 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit e73db821d0103a8469d2f96f7ba8188da982cc41
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Oct 8 10:55:19 2022 +0200

    add magic function toString
---
 include/class/fiche.class.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index a391b35ae..4f0ea0cee 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -363,6 +363,11 @@ class Fiche
         return $r;
     }
 
+    public function __toString(): string
+    {
+        return print_r($this,true);
+    }
+
     /**
      *
      * @return string with the category
@@ -1865,7 +1870,7 @@ class Fiche
     /**
      * @brief display card as a table row , the tag TR must be added
      * 
-     * @return HTMLT string starting
+     * @return HTML string starting
      * 
      */
     function display_row()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]