Mostrando entradas con la etiqueta Symfony. Mostrar todas las entradas
Mostrando entradas con la etiqueta Symfony. Mostrar todas las entradas

Creando un Nuevo Entorno


Etiquetas: Configuración, Symfony


Symfony 2 tiene tres entornos predeterminados los cuales son Desarrollo, Producción y Test; aparte de estos entornos, es posible crear mas entornos si es necesario.

Para crear el nuevo entorno se debe seguir los siguientes pasos:

  1. Crear archivo de configuración.
  2. Crear controlador frontal.
  3. Acceder a "htp://localhost/app_nuevoEntorno.php"

  • Crear el Archivo de Configuración

YML



# app/config/config_nuevoEntorno.yml

imports:
    - { resource: config_prod.yml }

framework:
    profiler: { only_exceptions: false }

XML


<!-- app/config/config_nuevoEntorno.xml -->

<imports>
    <import resource="config_prod.xml" />
</imports>

<framework:config>
    <framework:profiler only-exceptions="false" />
</framework:config>

PHP

// app/config/config_nuevoEntorno.php

$cargador->import(’config_prod.php’)
$contenedor->loadFromExtension(’framework’,
        array(
            ’profiler’ => array(’only-exceptions’ => false),
        )
    );

  • Crear Controlador Frontal

<?php

require_once __DIR__.’/../app/bootstrap.php’;
require_once __DIR__.’/../app/AppKernel.php’;

use SymfonyComponentHttpFoundationRequest;

$kernel = new AppKernel(’nuevoEntorno’, false);
$kernel->handle(Request::createFromGlobals())->send();

?>



Hender Orlando Puello Rincón

Herramientas



http://www.adelat.org/media/docum/herramientas20/
http://www.neoteo.com/las-20-herramientas-web-imprescindibles.neo
http://www.dreig.eu/caparazon/2008/03/23/entender-la-web-semantica-a-traves-de-las-nuevas-herramientas/
Hender Orlando Puello Rincón - 0152916 Estudiante Ingeniería de Sistemas