diff options
Diffstat (limited to 'app/class/Page.php')
-rw-r--r-- | app/class/Page.php | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/app/class/Page.php b/app/class/Page.php index 170a057..82e61c1 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -6,7 +6,7 @@ use DateTime; use DateTimeImmutable; use DateTimeZone; -class Page +class Page extends Dbitem { protected $id; protected $title; @@ -63,17 +63,6 @@ class Page $this->hydrate($datas); } - public function hydrate($datas) - { - foreach ($datas as $key => $value) { - $method = 'set' . $key; - - if (method_exists($this, $method)) { - $this->$method($value); - } - } - } - public function reset() { $now = new DateTimeImmutable(null, timezone_open("Europe/Paris")); @@ -125,19 +114,6 @@ class Page return ['pagevarlist' => $classvarlist]; } - public function dry() - { - $array = []; - foreach (get_class_vars(__class__) as $var => $value) { - if (in_array($var, self::VAR_DATE)) { - $array[$var] = $this->$var('string'); - } else { - $array[$var] = $this->$var(); - } - } - return $array; - } - /** * Check if page have a thumbnail * @return bool true if the page have a thumbnail otherwise return false. |