/** * service * @param string $Servicio * @return array */ public function receiveMessage($Servicio) { switch ($Servicio) { case 'BANNER': $util = new Server_Util(); $ModelBanner = new Admin_Model_Banner(); $totalBanners = $ModelBanner->BannersAll(); $response = $util->groupArray($totalBanners, 'posicion'); break; case 'MUSICA': $ModelMusica = new Admin_Model_Musica(); $response = $ModelMusica->MusicaAll(); break; case 'JUEGO': $ModelJuego = new Admin_Model_Juego(); $response = $ModelJuego->JuegoAll(); break; case 'TEXT': $ModelText = new Admin_Model_Text(); $response = $ModelText->textAll(); break; case 'SERVICIO': $ModelServicio = new Admin_Model_Servicio(); $response = $ModelServicio->ServicioAll(); break; default: break; } return $response; }
/** * service * @param string $Servicio * @return array */ public function receiveMessage($Servicio) { switch ($Servicio) { // case 'BANNER': // $util = new Server_Util(); // $ModelBanner = new Admin_Model_Banner(); // $totalBanners = $ModelBanner->BannersAll(); // $response = $util->groupArray($totalBanners, 'posicion'); // break; case 'BANNER': // $util = new Server_Util(); $ModelBanner = new Admin_Model_Banner2(); $response = $ModelBanner->BannersAll(); // $response = $util->groupArray($totalBanners, 'codtbanner'); break; case 'BANNERPREVIEW': $util = new Server_Util(); $ModelBanner = new Admin_Model_Banner2(); $totalBanners = $ModelBanner->BannersAll(); $response = $util->groupArray($totalBanners, 'codtbanner'); break; case 'BANNERCORREO': $util = new Server_Util(); $ModelBanner = new Admin_Model_Banner2(); $totalBanners = $ModelBanner->BannersCorreo(); $response = $util->groupArray($totalBanners, 'codtbanner'); break; case 'MUSICA': $ModelMusica = new Admin_Model_Musica(); $response = $ModelMusica->MusicaAll(); break; case 'JUEGO': $ModelJuego = new Admin_Model_Juego(); $response = $ModelJuego->JuegoAll(); break; case 'TEXT': $ModelText = new Admin_Model_Text(); $response = $ModelText->textAll(); break; case 'LINK': $ModelLink = new Admin_Model_Link(); $response = $ModelLink->findAllByType(true); break; case 'SERVICIO': $ModelServicio = new Admin_Model_Servicio(); $response = $ModelServicio->ServicioAll(); break; case 'BANNERMOVISTAR': $ModelBanner = new Admin_Model_Banner2(); $totalBanners = $ModelBanner->BannerMovistar(); $response = $totalBanners; break; default: break; } return $response; }
public function init() { parent::init(); $this->_config = $this->getConfig(); $this->_serverSoap = new Zend_Soap_Client($this->_config['resources']['view']['urlSoapWsdl']); $totalBanners = $this->_serverSoap->receiveMessage('BANNER'); $util = new Server_Util(); $SoapBanner = $util->groupArray($totalBanners, 'codtbanner'); $SoapMusica = $this->_serverSoap->receiveMessage('MUSICA'); $SoapJuego = $this->_serverSoap->receiveMessage('JUEGO'); $SoapText = $this->_serverSoap->receiveMessage('TEXT'); $SoapLink = $this->_serverSoap->receiveMessage('LINK'); $SoapServicio = $this->_serverSoap->receiveMessage('SERVICIO'); $SoapBannerMovistar = $this->_serverSoap->receiveMessage('BANNERMOVISTAR'); $perfil = $this->_getParam('perfil', '5'); switch ($perfil) { case '1': $this->forward('basico'); break; case '2': $this->forward('basico128'); break; case '3': $this->forward('basico240'); break; case '4': $this->forward('basico360'); break; case '5': $this->forward('avanzado'); break; default: $this->forward('basico240'); break; } $this->view->SoapMovistarBanner = $SoapBannerMovistar; $this->view->SoapBanners = $SoapBanner[0]; $this->view->SoapMusica = $SoapMusica; $this->view->SoapJuego = $SoapJuego; $this->view->SoapText = $SoapText; $this->view->SoapLink = $SoapLink; $this->view->SoapServicio = $SoapServicio; }