@@ -82,7 +82,7 @@ of the ``AppKernel`` class:
82
82
// ...
83
83
new Acme\HelloBundle\AcmeHelloBundle(),
84
84
);
85
-
85
+
86
86
// ...
87
87
88
88
return $bundles;
@@ -418,7 +418,7 @@ use a Kernel class, ``AppKernel``, to bootstrap the application.
418
418
Having a front controller means different and more flexible URLs than
419
419
are used in a typical flat PHP application. When using a front controller,
420
420
URLs are formatted in the following way:
421
-
421
+
422
422
.. code-block :: text
423
423
424
424
http://localhost/app.php/hello/Ryan
@@ -427,7 +427,7 @@ use a Kernel class, ``AppKernel``, to bootstrap the application.
427
427
is routed internally using the routing configuration. By using Apache
428
428
``mod_rewrite `` rules, you can force the ``app.php `` file to be executed without
429
429
needing to specify it in the URL:
430
-
430
+
431
431
.. code-block :: text
432
432
433
433
http://localhost/hello/Ryan
@@ -475,12 +475,12 @@ about each of these directories in later chapters.
475
475
or ``require `` statements. Instead, Symfony2 uses the namespace of a class
476
476
to determine its location and automatically includes the file on your
477
477
behalf the instant you need a class::
478
-
478
+
479
479
$loader->registerNamespaces(array(
480
480
'Acme' => __DIR__.'/../src',
481
481
// ...
482
482
));
483
-
483
+
484
484
With this configuration, Symfony2 will look inside the ``src `` directory
485
485
for any class in the ``Acme `` namespace (your pretend company's namespace).
486
486
For autoloading to work, the class name and path to the file must follow
@@ -712,7 +712,7 @@ format you prefer:
712
712
713
713
<!-- Twig Configuration -->
714
714
<twig : config debug =" %kernel.debug%" strict-variables =" %kernel.debug%" />
715
-
715
+
716
716
<!-- ... -->
717
717
718
718
.. code-block :: php
@@ -806,9 +806,9 @@ call the ``prod`` front controller instead:
806
806
807
807
If you open the ``web/app.php `` file, you'll find that it's configured explicitly
808
808
to use the ``prod `` environment::
809
-
809
+
810
810
$kernel = new AppCache(new AppKernel('prod', false));
811
-
811
+
812
812
You can create a new front controller for a new environment by copying
813
813
this file and changing ``prod `` to some other value.
814
814
@@ -861,10 +861,12 @@ the configuration file for the ``dev`` environment.
861
861
toolbar : true
862
862
intercept_redirects : true
863
863
864
- zend :
865
- logger :
866
- priority : debug
867
- path : %kernel.logs_dir%/%kernel.environment%.log
864
+ monolog :
865
+ handlers :
866
+ main :
867
+ type : stream
868
+ path : %kernel.logs_dir%/%kernel.environment%.log
869
+ level : debug
868
870
869
871
.. code-block :: xml
870
872
@@ -883,9 +885,14 @@ the configuration file for the ``dev`` environment.
883
885
intercept-redirects =" true"
884
886
/>
885
887
886
- <zend : config >
887
- <zend : logger priority =" info" path =" %kernel.logs_dir%/%kernel.environment%.log" />
888
- </zend : config >
888
+ <monolog : config >
889
+ <monolog : handler
890
+ name =" main"
891
+ type =" stream"
892
+ path =" %kernel.logs_dir%/%kernel.environment%.log"
893
+ level =" debug"
894
+ >
895
+ </monolog : config >
889
896
890
897
.. code-block :: php
891
898
@@ -902,12 +909,14 @@ the configuration file for the ``dev`` environment.
902
909
'intercept-redirects' => true,
903
910
));
904
911
905
- $container->loadFromExtension('zend', array(
906
- 'logger' => array(
907
- 'priority' => 'info',
908
- 'path' => '%kernel.logs_dir%/%kernel.environment%.log',
909
- ),
910
- ));
912
+ $container->loadFromExtension('monolog', array(
913
+ 'handlers' => array(
914
+ 'main' => array(
915
+ 'type' => 'stream',
916
+ 'path' => '%kernel.logs_dir%/%kernel.environment%.log',
917
+ 'level' => 'debug',
918
+ ),
919
+ )));
911
920
912
921
The ``imports `` key is similar to a PHP ``include `` statement and guarantees
913
922
that the main configuration file (``config.yml ``) is loaded first. The rest
0 commit comments