/** * Renvoit l'update associé au modèle * * @throws Fdap_Model_Exception * @return string */ public function getUpdateQuery() { $validation = $this->model->validate(); if ($validation !== true) { throw new Fdap_Model_Exception("The update query can't be transmited if the model is not valid", $validation); } }
/** * Exécute la requête d'ajout * * @param Fdap_Model $model * @return PDOStatement */ public static function add(Fdap_Model $model) { return self::getPdo()->query($model->getModelRequest()->getAddQuery()); }