Commit 5a08609d authored by Igor Wiedler's avatar Igor Wiedler

[docs] Discourage use statements for the Silex namespace in apps

parent cd4d3edb
......@@ -60,9 +60,7 @@ and *Doctrine Common* in ``vendor/doctrine-common``.
::
use Silex\Extension\DoctrineExtension;
$app->register(new DoctrineExtension(), array(
$app->register(new Silex\Extension\DoctrineExtension(), array(
'db.options' => array(
'driver' => 'pdo_sqlite',
'path' => __DIR__.'/app.db',
......
......@@ -48,9 +48,7 @@ directory.
::
use Silex\Extension\MonologExtension;
$app->register(new MonologExtension(), array(
$app->register(new Silex\Extension\MonologExtension(), array(
'monolog.logfile' => __DIR__.'/development.log',
'monolog.class_path' => __DIR__.'/vendor/monolog/src',
));
......@@ -24,9 +24,7 @@ Registering
::
use Silex\Extension\SessionExtension;
$app->register(new SessionExtension());
$app->register(new Silex\Extension\SessionExtension());
Usage
-----
......
......@@ -42,9 +42,7 @@ Make sure you place a copy of the Symfony2 Translation component in
::
use Silex\Extension\TranslationExtension;
$app->register(new TranslationExtension(), array(
$app->register(new Silex\Extension\TranslationExtension(), array(
'locale_fallback' => 'en',
'translation.class_path' => __DIR__.'/vendor/symfony/src',
));
......
......@@ -43,9 +43,7 @@ directory.
::
use Silex\Extension\TwigExtension;
$app->register(new TwigExtension(), array(
$app->register(new Silex\Extension\TwigExtension(), array(
'twig.path' => __DIR__.'/views',
'twig.class_path' => __DIR__.'/vendor/twig/lib',
));
......
......@@ -25,9 +25,7 @@ Registering
::
use Silex\Extension\UrlGeneratorExtension;
$app->register(new UrlGeneratorExtension());
$app->register(new Silex\Extension\UrlGeneratorExtension());
Usage
-----
......
......@@ -37,9 +37,7 @@ Make sure you place a copy of the Symfony2 Validator component in
::
use Silex\Extension\ValidatorExtension;
$app->register(new ValidatorExtension(), array(
$app->register(new Silex\Extension\ValidatorExtension(), array(
'validator.class_path' => __DIR__.'/vendor/symfony/src',
));
......
......@@ -71,9 +71,7 @@ applies to Silex as well. ::
or ::
use Silex\Application;
$app = new Application();
$app = new Silex\Application();
Parameters
~~~~~~~~~~
......
......@@ -14,9 +14,7 @@ controller definitions, call the ``run`` method on your application.
require_once __DIR__.'/silex.phar';
use Silex\Application;
$app = new Application();
$app = new Silex\Application();
// definitions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment