Ejemplo n.º 1
0
 public function listar($ordem = "ASC", $campo = self::ID)
 {
     $info = parent::listar($ordem, $campo);
     if (!empty($info)) {
         $temp = new Vendedor($info[self::ID]);
         parent::resgatarObjetos($info);
         $temp->nome = $info[self::NOME];
         $temp->email = $info[self::EMAIL];
         $temp->msn = $info[self::MSN];
         $temp->skype = $info[self::SKYPE];
         $temp->voip = $info[self::VOIP];
         $temp->telefone = $info[self::TELEFONE];
         $temp->ramal = $info[self::RAMAL];
         $temp->ordem = $info[self::ORDEM];
         if (!empty($info[self::IMAGEM])) {
             $lI = new ListaImagens();
             $lI->caminhoEscrita = Sistema::$caminhoDiretorio . Sistema::$caminhoDataTextos;
             $lI->caminhoLeitura = Sistema::$caminhoURL . Sistema::$caminhoDataTextos;
             $lI->condicoes('', $info[self::IMAGEM], ListaImagens::ID);
             if ($lI->getTotal() > 0) {
                 $temp->setImagem($lI->listar());
             }
         }
         return $temp;
     }
 }