Created
April 19, 2012 19:22
-
-
Save hackaugusto/2423430 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| public function SMsDoBancoCarregar(){ | |
| //retorna os dados | |
| $dados = $this->mensagemBD->SmsDadosRetornar($this->idMensagem); | |
| //cria os sms | |
| for($i=0;$i<count($dados);$i++){ | |
| // Verifica se foi passsado um ieSM.... | |
| $ieSMAux = ""; | |
| if (isset($dados[$i]["ieSM"])){ | |
| // Foi...entao pega o valor..senao coloca o valor vazio para nao dar erro qdo PHP configurado para E_ALL | |
| $ieSMAux = $dados[$i]["ieSM"]; | |
| } | |
| // Verifica se foi passsado um ieSMAlternativo.... | |
| $ieSMAlternativoAux = ""; | |
| if (isset($dados[$i]["ieSMAlternativo"])){ | |
| // Foi...entao pega o valor..senao coloca o valor vazio para nao dar erro qdo PHP configurado para E_ALL | |
| $ieSMAlternativoAux = $dados[$i]["ieSMAlternativo"]; | |
| } | |
| //monta os sms | |
| $this->dadosSM[$i] = new SM($this->idMensagem, $dados[$i]["idSm"], $dados[$i]["codigoInstancia"], $dados[$i]["idProvedor"], $dados[$i]["conteudo"], $ieSMAux, $ieSMAlternativoAux); | |
| } | |
| if (count($this->dadosSM)>0){ | |
| return true; | |
| }else{ | |
| return false; | |
| } | |
| } | |
| public function SMsDoBancoCarregar(){ | |
| $dados = $this->mensagemBD->SmsDadosRetornar($this->idMensagem); | |
| if( count($dados) < 0 ){ | |
| return false; | |
| } | |
| $this->dadosSM = array(); | |
| foreach( $dados as $sm ){ | |
| $ieSMAux = (isset($sm['ieSM'])) ? $sm['ieSM'] : ''; | |
| $ieSMAlternativoAux = (isset($sm['ieSMAlternativo'])) ? $sm['ieSMAlternativo'] : ''; | |
| $this->dadosSM[] = new SM($this->idMensagem, $sm['idSm'], $sm['codigoInstancia'], $sm['idProvedor'], $sm['conteudo'], $ieSMAux, $ieSMAlternativoAux); | |
| } | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment