Ejemplo n.º 1
0
 /**
  * @name delete($pId)
  * @param integer
  * @desc Supprime un compte
  */
 public function delete($pId)
 {
     $lOperationValid = new OperationValid();
     if ($lOperationValid->delete($pId)) {
         return CompteManager::delete($pId);
         // delete le compte
     } else {
         return false;
     }
 }
 /**
  * @name existe($pOperation)
  * @param OperationVO ou interger
  * @return bool
  * @desc Vérifie si l'Operation existe
  */
 public function existe($pOperation)
 {
     $lOperationValid = new OperationValid();
     if (is_object($pOperation) && $lOperationValid->estOperation($pOperation)) {
         $lOperation = $this->get($pOperation);
         if ($lOperation->getId() == $pOperation->getId()) {
             return true;
         } else {
             return false;
         }
     } else {
         if (is_int((int) $pOperation)) {
             if ($lOperationValid->id($pOperation)) {
                 $lOperation = $this->get($pOperation);
                 if ($lOperation->getId() == $pOperation) {
                     return true;
                 } else {
                     return false;
                 }
             }
         } else {
             return false;
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * @name delete($pId)
  * @return bool
  * @desc Test la validite de l'élément
  */
 public function delete($pId)
 {
     $lOperationValid = new \OperationValid();
     return $lOperationValid->delete($pId);
 }