示例#1
0
 public function iniciar()
 {
     try {
         if (empty($this->config)) {
             $this->configArray = parse_ini_file("config/config.ini", true);
         } else {
             $this->configArray = parse_ini_file($this->config, true);
         }
         $require = $this->configArray['REQUIRE']['requerido'];
         foreach ($require as $value) {
             require_once $value;
         }
         if (empty($this->request)) {
             $this->request = new Request($_SERVER, $_GET, $_POST, $_COOKIE, $_FILES, $_ENV);
         }
         if (empty($this->response)) {
             $this->setResponse(new Response());
         }
         if (empty($this->sesion)) {
             $this->setSesion(new Sesiones());
         }
         $this->configurar();
         if (empty($this->service)) {
             $this->setService(new ServiceMySql($this->dbName, $this->dbUser, $this->dbPass));
         }
         $cf = new controladorFrontal($this->request, $this->sesion, $this->service);
         $Salida = $cf->arranca();
         $this->response->imprimirRespuesta($Salida);
     } catch (Exception $exc) {
         echo $exc->getTraceAsString();
     }
 }
示例#2
0
<!--
    Copyright (C) <2011>  <rubentxu>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<?php 
require_once '../php/controladorFrontal.php';
controladorFrontal::arranca();
?>
 
 public function testEjecutarAccionMapeoControladorVacio()
 {
     $Contenedor = $this->getMock('Contenedor', array('get', 'server', 'post'));
     $Contenedor->expects($this->any())->method('server')->will($this->returnCallback(array($this, 'expectativasServerEjecutarAccion')));
     $sesion = $this->getMock('Sesiones');
     $cf = new controladorFrontal($Contenedor, $sesion);
     $mapeo = array('controlador' => '', 'accion' => 'pruebaAccion');
     try {
         $datosSalida = $cf->ejecutarAccion($mapeo);
     } catch (Exception $exc) {
         return;
     }
     $this->fail('Una excepcion no ha sido recogida');
 }
示例#4
0
文件: iniciar.php 项目: hamton/ptuit
<?php

require_once 'controladorFrontal.php';
syslog(LOG_INFO, "Iniciando la peticion..................<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>><");
$cf = new controladorFrontal();
$cf->arranca();
?>