protected function setupRest() { if (!isset($this->app)) { $tr = new \toba_rest(); $app = $tr->instanciar_libreria_rest(); $tr->configurar_libreria_rest($app); $this->app = $app; } return $this->app; }