aboutsummaryrefslogtreecommitdiff
path: root/app/class/dbitem.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-12 19:49:41 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-12 19:51:41 +0100
commiteb30a63c819ca50ebbc896eb293a0745dcd043be (patch)
tree45144b6d8e2a841de56d76c463e53c99ad029f02 /app/class/dbitem.php
parent36d878ac00f4df0a4ff54e2ea8355b323f0a87f3 (diff)
downloadwcms-eb30a63c819ca50ebbc896eb293a0745dcd043be.tar.gz
wcms-eb30a63c819ca50ebbc896eb293a0745dcd043be.zip
timeline message working
Diffstat (limited to 'app/class/dbitem.php')
-rw-r--r--app/class/dbitem.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/app/class/dbitem.php b/app/class/dbitem.php
index ff41d6f..2035316 100644
--- a/app/class/dbitem.php
+++ b/app/class/dbitem.php
@@ -2,7 +2,7 @@
class Dbitem
{
- public function hydrate(array $datas)
+ public function hydrate($datas)
{
foreach ($datas as $key => $value) {
$method = 'set' . $key;
@@ -13,6 +13,19 @@ class Dbitem
}
}
+
+ public function dry()
+ {
+ $array = [];
+ foreach (get_object_vars($this) as $var => $value) {
+ if (in_array($var, $this::VAR_DATE)) {
+ $array[$var] = $this->$var('string');
+ } else {
+ $array[$var] = $this->$var();
+ }
+ }
+ return $array;
+ }
}