X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=blobdiff_plain;f=module%2FGalerie%2Fsrc%2FGalerie%2FModel%2FGalerieC.php;h=dceb108a469fa578778a8ce357d030436d371b25;hp=dcf51c7fd96f533896d959d68b14df46b7ee53b4;hb=750e61f44439a36d9582daf149d0dc1b2b9a72c7;hpb=45c8c1c64c3bc8cc711e029c8f86da0cd70babc3 diff --git a/module/Galerie/src/Galerie/Model/GalerieC.php b/module/Galerie/src/Galerie/Model/GalerieC.php index dcf51c7..dceb108 100644 --- a/module/Galerie/src/Galerie/Model/GalerieC.php +++ b/module/Galerie/src/Galerie/Model/GalerieC.php @@ -2,7 +2,9 @@ namespace Galerie\Model; -class GalerieC +use Custom\Model\Entity; + +class GalerieC extends Entity { public $id; public $id_user; @@ -33,39 +35,4 @@ class GalerieC 'id', ); - public function exchangeArray($data, $overwrite=true) - { - foreach($this->columns as $col) { - if (array_key_exists($col, $data)) { - $this->$col = $data[$col]; - } elseif ($overwrite) { - $this->$col = null; - } - } - } - - public function toArray() { - $result = array(); - foreach($this->columns as $col) { - $result[$col] = $this->$col; - } - return $result; - } - - public function toUpdatableArray() { - $result = array(); - foreach($this->updatable_columns as $col) { - $result[$col] = $this->$col; - } - return $result; - } - - public function toPrimaryArray() { - $result = array(); - foreach($this->primary_columns as $col) { - $result[$col] = $this->$col; - } - return $result; - } - }