Exemple #1
0
 /**
  * Punto de entrada http-REST al nucleo
  */
 function acceso_rest()
 {
     try {
         $this->acceso_rest = true;
         $this->iniciar_contexto_rest();
         $toba_rest = new toba_rest();
         if (!$toba_rest->es_pedido_documentacion()) {
             $toba_rest->conf__inicial();
             $app = $toba_rest->get_instancia_rest();
             if (method_exists(toba::contexto_ejecucion(), "conf__rest")) {
                 toba::contexto_ejecucion()->conf__rest($app);
             }
         }
         $toba_rest->ejecutar();
         $this->finalizar_contexto_rest();
     } catch (Exception $e) {
         toba::logger()->crit($e, 'toba');
         echo $e->getMessage() . "\n\n";
     }
     toba::logger()->guardar();
 }