diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-29 02:34:50 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-29 02:34:50 +0100 |
commit | 64ac1605b6fe8e997134dd57cc30f30b99ebc076 (patch) | |
tree | d4fd89c68f0f0eb7b49ea92336f8f8ab5f778e45 /app/class/Medialist.php | |
parent | b6173772bdef1eaf067573373ab500d67dfc454d (diff) | |
download | wcms-64ac1605b6fe8e997134dd57cc30f30b99ebc076.tar.gz wcms-64ac1605b6fe8e997134dd57cc30f30b99ebc076.zip |
refactor : item abstract class
new Item abstract class with hydrate and dry functions to clean others
Diffstat (limited to 'app/class/Medialist.php')
-rw-r--r-- | app/class/Medialist.php | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/app/class/Medialist.php b/app/class/Medialist.php index 2c17fa0..ab1dea3 100644 --- a/app/class/Medialist.php +++ b/app/class/Medialist.php @@ -2,7 +2,7 @@ namespace Wcms; -class Medialist +class Medialist extends Item { /** @var string full regex match */ protected $fullmatch; @@ -46,17 +46,6 @@ class Medialist $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 readfilter() { parse_str($this->filter, $datas); |