Ejemplo n.º 1
0
  * *
  * action
  * ## Si su valor es "KnightsWhoSayNi" es una llamada a una RIA, normalmente, una llamada AJAX.
  * Entonces, mode puede y debe tomar los valores:
  * 'lo' Log-off: para llamadas que no hace falta estar autentificado
  * 'li' Log-in: para llamadas que se tiene que estar conectado
  * 'API': Para llamadas de sistemas externos
  */
 if (IS_APPENGINE === false) {
     $mode = $dev->req->getVar('mode');
     if ($mode == 'api') {
         $_GET['StokenOlif'] = 'API_SEND';
     }
     $token = $dev->req->getVar('StokenOlif');
     require_once CORE_ROOT . CONTROLLERS . DIRECTORY_SEPARATOR . 'ControllerCurl.php';
     $cCurl = ControllerCurl::getInstance();
     $cCurl->assignRIA($pag, $mode, $token);
     $cCurl->assignVars($dev->req->getAllPostVar());
     $cCurl->assignVars($dev->req->getAllGetVar());
     $cCurl->getRIA();
 } else {
     if ($_GET['mode'] == 'api' || $_POST['mode'] == 'api') {
         $_GET['StokenOlif'] = 'API_SEND';
     }
     unset($_POST['mode']);
     unset($_POST['action']);
     unset($_POST['pag']);
     unset($_GET['mode']);
     unset($_GET['action']);
     unset($_GET['pag']);
     $_POST['OLIF_ROOT'] = OLIF_ROOT;
Ejemplo n.º 2
0
 protected function getControllerCurl()
 {
     if (!class_exists('ControllerCurl')) {
         require_once CORE_ROOT . CONTROLLERS . DIRECTORY_SEPARATOR . 'ControllerCurl.php';
     }
     if (!is_object($this->curl)) {
         $this->curl = ControllerCurl::getInstance();
     }
 }