Esempio n. 1
0
 /**
  * Permet de fermer la connexion avec la base
  *
  * @return void
  */
 private function close()
 {
     // Si une transaction a été ouverte, il faut faire commit ou un rollback
     if ($this->transaction) {
         if (!connection_aborted()) {
             $this->commit();
         } else {
             $this->rollback();
         }
     }
     // Fermeture de la connexion
     $this->id->close();
     unset($this->id);
     return null;
 }