/**
  * {@inheritDoc}
  */
 public function getInterlocuteurs($sm, $critere, $limit = 100)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInterlocuteurs', array($sm, $critere, $limit));
     return parent::getInterlocuteurs($sm, $critere, $limit);
 }
Esempio n. 2
0
 /**
  * Action qui est censée retourner du texte mais qui ne marche pas
  */
 public function listeinterlocuteurAction()
 {
     //Si la requète est de type AJAX, on effectue la recherche
     if ($this->getRequest()->isXmlHttpRequest()) {
         $interlocuteur = new InterlocuteurClient();
         $resultat = array();
         if (isset($_GET['motCle']) && isset($_GET['maxRows'])) {
             $resultat = $interlocuteur->getInterlocuteurs($this->getServiceLocator(), '%' . addslashes($_GET['motCle']) . '%', intval($_GET['maxRows']));
         } else {
             $resultat = $interlocuteur->getListeInterlocuteur($this->getServiceLocator());
         }
         return new JsonModel(array('resultat' => json_encode($resultat)));
     }
     /*
     $response = new \Zend\Http\Response;
     $response->setContent('Accès interdit');
     $response->setStatusCode(\Zend\Http\Response::STATUS_CODE_403);
     return $response;
     */
     return $this->redirect()->toRoute('home');
 }