Пример #1
0
 public function obtenerEmails()
 {
     $tablaEmail = $this->tablaEmail;
     $rowEmails = $tablaEmail->fetchAll();
     $modelEmails = array();
     foreach ($rowEmails as $rowEmail) {
         $modelEmail = new Application_Model_Email($rowEmail->toArray());
         $modelEmail->setIdEmail($rowEmail->idEmail);
         $modelEmails[] = $modelEmails;
     }
     return $modelEmails;
 }
Пример #2
0
 public function obtenerEmails($idFiscales)
 {
     $tablaFiscalesEmail = $this->tablaFiscalesEmails;
     $select = $tablaFiscalesEmail->select()->from($tablaFiscalesEmail)->where("idFiscales = ?", $idFiscales);
     $referenciasEmail = $tablaFiscalesEmail->fetchAll($select);
     //===========================================================
     $tablaEmail = $this->tablaEmail;
     $email = array();
     foreach ($referenciasEmail as $referencia) {
         $select = $tablaEmail->select()->from($tablaEmail)->where("idEmail = ?", $referencia->idEmail);
         $rowEmail = $tablaEmail->fetchRow($select);
         $emailModel = new Application_Model_Email($rowEmail->toArray());
         $emailModel->setIdEmail($rowEmail->idEmail);
         $email[] = $emailModel;
     }
     return $email;
 }