X-Git-Url: http://git.inspyration.org/?p=zf2.biz%2Fgalerie.git;a=blobdiff_plain;f=vendor%2Fzf2biz%2FCustom%2FModel%2FPairManager.php;fp=vendor%2Fzf2biz%2FCustom%2FModel%2FPairManager.php;h=45198051492e8db68addd9958d9d5e349db469cb;hp=0000000000000000000000000000000000000000;hb=6e6b3a29762f19d038b6c88bf51b0859339a69a2;hpb=394ed57b78faba491284a90a7f509bac3e146c30 diff --git a/vendor/zf2biz/Custom/Model/PairManager.php b/vendor/zf2biz/Custom/Model/PairManager.php new file mode 100644 index 0000000..4519805 --- /dev/null +++ b/vendor/zf2biz/Custom/Model/PairManager.php @@ -0,0 +1,56 @@ +adapter = $adapter; + + // Détermination de la table principale à requêter + $this->table = $table; + + // Composition avec l'entité + if ($pair === null) { + $this->pair = new Pair; + } else { + $this->pair = $pair; + } + + // Utilisation du patron de conception Prototype + // pour la création des objets ResultSet + $this->resultSetPrototype = new ResultSet(); + $this->resultSetPrototype->setArrayObjectPrototype( + $this->pair + ); + + // Initialisation du gestionnaire + $this->initialize(); + $this->featureSet->addFeature(new PairFeature); + } + + public function all() + { + $this->select(); + return $this->result; + } + + public function setResult($result) + { + $this->result = $result; + } + +}