Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial symfony2 commit

  • Loading branch information...
commit d8559c43db01b32ce5020480b497493fcfcffa1d 1 parent 9252101
Ricard Clau ricardclau authored
Showing with 1,923 additions and 0 deletions.
  1. +6 −0 .gitignore
  2. +19 −0 LICENSE
  3. +148 −0 README.md
  4. +1 −0  app/.htaccess
  5. +9 −0 app/AppCache.php
  6. +36 −0 app/AppKernel.php
  7. +13 −0 app/Resources/views/base.html.twig
  8. +45 −0 app/autoload.php
  9. +108 −0 app/check.php
  10. +59 −0 app/config/config.yml
  11. +23 −0 app/config/config_dev.yml
  12. +19 −0 app/config/config_prod.yml
  13. +14 −0 app/config/config_test.yml
  14. +4 −0 app/config/routing.yml
  15. +31 −0 app/config/routing_dev.yml
  16. +38 −0 app/config/security.yml
  17. +22 −0 app/console
  18. +41 −0 app/phpunit.xml.dist
  19. +1 −0  bin/.htaccess
  20. +129 −0 bin/vendors
  21. +61 −0 deps
  22. +15 −0 deps.lock
  23. +1 −0  src/.htaccess
  24. +9 −0 src/Acme/DemoBundle/AcmeDemoBundle.php
  25. +57 −0 src/Acme/DemoBundle/Controller/DemoController.php
  26. +69 −0 src/Acme/DemoBundle/Controller/SecuredController.php
  27. +13 −0 src/Acme/DemoBundle/Controller/WelcomeController.php
  28. +25 −0 src/Acme/DemoBundle/ControllerListener.php
  29. +22 −0 src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
  30. +20 −0 src/Acme/DemoBundle/Form/ContactType.php
  31. +18 −0 src/Acme/DemoBundle/Resources/config/services.xml
  32. +293 −0 src/Acme/DemoBundle/Resources/public/css/demo.css
  33. BIN  src/Acme/DemoBundle/Resources/public/images/blue-arrow.png
  34. BIN  src/Acme/DemoBundle/Resources/public/images/field-background.gif
  35. BIN  src/Acme/DemoBundle/Resources/public/images/logo.gif
  36. BIN  src/Acme/DemoBundle/Resources/public/images/search.png
  37. BIN  src/Acme/DemoBundle/Resources/public/images/welcome-configure.gif
  38. BIN  src/Acme/DemoBundle/Resources/public/images/welcome-demo.gif
  39. BIN  src/Acme/DemoBundle/Resources/public/images/welcome-quick-tour.gif
  40. +15 −0 src/Acme/DemoBundle/Resources/views/Demo/contact.html.twig
  41. +9 −0 src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig
  42. +14 −0 src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
  43. +11 −0 src/Acme/DemoBundle/Resources/views/Secured/hello.html.twig
  44. +9 −0 src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
  45. +6 −0 src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
  46. +29 −0 src/Acme/DemoBundle/Resources/views/Secured/login.html.twig
  47. +63 −0 src/Acme/DemoBundle/Resources/views/Welcome/index.html.twig
  48. +49 −0 src/Acme/DemoBundle/Resources/views/layout.html.twig
  49. +17 −0 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
  50. +74 −0 src/Acme/DemoBundle/Twig/Extension/DemoExtension.php
  51. +5 −0 web/.htaccess
  52. +12 −0 web/app.php
  53. +24 −0 web/app_dev.php
  54. BIN  web/apple-touch-icon.png
  55. +213 −0 web/config.php
  56. BIN  web/favicon.ico
  57. +4 −0 web/robots.txt
6 .gitignore
View
@@ -0,0 +1,6 @@
+/web/bundles/
+/app/bootstrap*
+/app/cache/*
+/app/logs/*
+/vendor/
+/app/config/parameters.ini
19 LICENSE
View
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2011 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
148 README.md
View
@@ -0,0 +1,148 @@
+Symfony Standard Edition
+========================
+
+Welcome to the Symfony Standard Edition - a fully-functional Symfony2
+application that you can use as the skeleton for your new app. If you want
+to learn more about the features included, see the "What's Inside?" section.
+
+This document contains information on how to download and start using Symfony.
+For a more detailed explanation, see the
+[Installation chapter](http://symfony.com/doc/current/book/installation.html)
+of the Symfony Documentation.
+
+1) Download the Standard Edition
+--------------------------------
+
+If you've already downloaded the standard edition, and unpacked it somewhere
+within your web root directory, then move on to the "Installation" section.
+
+To download the standard edition, you have two options:
+
+### Download an archive file (*recommended*)
+
+The easiest way to get started is to download an archive of the standard edition
+(http://symfony.com/download). Unpack it somewhere under your web server root
+directory and you're done. The web root is wherever your web server (e.g. Apache)
+looks when you access `http://localhost` in a browser.
+
+### Clone the git Repository
+
+We highly recommend that you download the packaged version of this distribution.
+But if you still want to use Git, you are on your own.
+
+Run the following commands:
+
+ git clone http://github.com/symfony/symfony-standard.git
+ cd symfony-standard
+ rm -rf .git
+
+2) Installation
+---------------
+
+Once you've downloaded the standard edition, installation is easy, and basically
+involves making sure your system is ready for Symfony.
+
+### a) Check your System Configuration
+
+Before you begin, make sure that your local system is properly configured
+for Symfony. To do this, execute the following:
+
+ php app/check.php
+
+If you get any warnings or recommendations, fix these now before moving on.
+
+### b) Install the Vendor Libraries
+
+If you downloaded the archive "without vendors" or installed via git, then
+you need to download all of the necessary vendor libraries. If you're not
+sure if you need to do this, check to see if you have a ``vendor/`` directory.
+If you don't, or if that directory is empty, run the following:
+
+ php bin/vendors install
+
+Note that you **must** have git installed and be able to execute the `git`
+command to execute this script. If you don't have git available, either install
+it or download Symfony with the vendor libraries already included.
+
+### c) Access the Application via the Browser
+
+Congratulations! You're now ready to use Symfony. If you've unzipped Symfony
+in the web root of your computer, then you should be able to access the
+web version of the Symfony requirements check via:
+
+ http://localhost/Symfony/web/config.php
+
+If everything looks good, click the "Bypass configuration and go to the Welcome page"
+link to load up your first Symfony page.
+
+You can also use a web-based configurator by clicking on the "Configure your
+Symfony Application online" link of the ``config.php`` page.
+
+To see a real-live Symfony page in action, access the following page:
+
+ web/app_dev.php/demo/hello/Fabien
+
+3) Learn about Symfony!
+-----------------------
+
+This distribution is meant to be the starting point for your application,
+but it also contains some sample code that you can learn from and play with.
+
+A great way to start learning Symfony is via the [Quick Tour](http://symfony.com/doc/current/quick_tour/the_big_picture.html),
+which will take you through all the basic features of Symfony2 and the test
+pages that are available in the standard edition.
+
+Once you're feeling good, you can move onto reading the official
+[Symfony2 book](http://symfony.com/doc/current/).
+
+Using this Edition as the Base of your Application
+--------------------------------------------------
+
+Since the standard edition is fully-configured and comes with some examples,
+you'll need to make a few changes before using it to build your application.
+
+The distribution is configured with the following defaults:
+
+* Twig is the only configured template engine;
+* Doctrine ORM/DBAL is configured;
+* Swiftmailer is configured;
+* Annotations for everything are enabled.
+
+A default bundle, ``AcmeDemoBundle``, shows you Symfony2 in action. After
+playing with it, you can remove it by following these steps:
+
+* delete the ``src/Acme`` directory;
+* remove the routing entries referencing AcmeBundle in ``app/config/routing_dev.yml``;
+* remove the AcmeBundle from the registered bundles in ``app/AppKernel.php``;
+
+
+What's inside?
+---------------
+The Symfony Standard Edition comes pre-configured with the following bundles:
+
+* **FrameworkBundle** - The core Symfony framework bundle
+* **SensioFrameworkExtraBundle** - Adds several enhancements, including template
+ and routing annotation capability ([documentation](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html))
+* **DoctrineBundle** - Adds support for the Doctrine ORM
+ ([documentation](http://symfony.com/doc/current/book/doctrine.html))
+* **TwigBundle** - Adds support for the Twig templating engine
+ ([documentation](http://symfony.com/doc/current/book/templating.html))
+* **SecurityBundle** - Adds security by integrating Symfony's security component
+ ([documentation](http://symfony.com/doc/current/book/security.html))
+* **SwiftmailerBundle** - Adds support for Swiftmailer, a library for sending emails
+ ([documentation](http://symfony.com/doc/2.0/cookbook/email.html))
+* **MonologBundle** - Adds support for Monolog, a logging library
+ ([documentation](http://symfony.com/doc/2.0/cookbook/logging/monolog.html))
+* **AsseticBundle** - Adds support for Assetic, an asset processing library
+ ([documentation](http://symfony.com/doc/2.0/cookbook/assetic/asset_management.html))
+* **JMSSecurityExtraBundle** - Allows security to be added via annotations
+ ([documentation](http://symfony.com/doc/current/bundles/JMSSecurityExtraBundle/index.html))
+* **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and
+ the web debug toolbar
+* **SensioDistributionBundle** (in dev/test env) - Adds functionality for configuring
+ and working with Symfony distributions
+* **SensioGeneratorBundle** (in dev/test env) - Adds code generation capabilities
+ ([documentation](http://symfony.com/doc/current/bundles/SensioGeneratorBundle/index.html))
+* **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example code
+
+Enjoy!
1  app/.htaccess
View
@@ -0,0 +1 @@
+deny from all
9 app/AppCache.php
View
@@ -0,0 +1,9 @@
+<?php
+
+require_once __DIR__.'/AppKernel.php';
+
+use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
+
+class AppCache extends HttpCache
+{
+}
36 app/AppKernel.php
View
@@ -0,0 +1,36 @@
+<?php
+
+use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\Config\Loader\LoaderInterface;
+
+class AppKernel extends Kernel
+{
+ public function registerBundles()
+ {
+ $bundles = array(
+ new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
+ new Symfony\Bundle\SecurityBundle\SecurityBundle(),
+ new Symfony\Bundle\TwigBundle\TwigBundle(),
+ new Symfony\Bundle\MonologBundle\MonologBundle(),
+ new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
+ new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
+ new Symfony\Bundle\AsseticBundle\AsseticBundle(),
+ new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
+ new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
+ );
+
+ if (in_array($this->getEnvironment(), array('dev', 'test'))) {
+ $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
+ $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
+ $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
+ $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
+ }
+
+ return $bundles;
+ }
+
+ public function registerContainerConfiguration(LoaderInterface $loader)
+ {
+ $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
+ }
+}
13 app/Resources/views/base.html.twig
View
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{% block title %}Welcome!{% endblock %}</title>
+ {% block stylesheets %}{% endblock %}
+ <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
+ </head>
+ <body>
+ {% block body %}{% endblock %}
+ {% block javascripts %}{% endblock %}
+ </body>
+</html>
45 app/autoload.php
View
@@ -0,0 +1,45 @@
+<?php
+
+use Symfony\Component\ClassLoader\UniversalClassLoader;
+use Doctrine\Common\Annotations\AnnotationRegistry;
+
+$loader = new UniversalClassLoader();
+$loader->registerNamespaces(array(
+ 'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
+ 'Sensio' => __DIR__.'/../vendor/bundles',
+ 'JMS' => __DIR__.'/../vendor/bundles',
+ 'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
+ 'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
+ 'Doctrine' => __DIR__.'/../vendor/doctrine/lib',
+ 'Monolog' => __DIR__.'/../vendor/monolog/src',
+ 'Assetic' => __DIR__.'/../vendor/assetic/src',
+ 'Metadata' => __DIR__.'/../vendor/metadata/src',
+));
+$loader->registerPrefixes(array(
+ 'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
+ 'Twig_' => __DIR__.'/../vendor/twig/lib',
+));
+
+// intl
+if (!function_exists('intl_get_error_code')) {
+ require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
+
+ $loader->registerPrefixFallbacks(array(__DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs'));
+}
+
+$loader->registerNamespaceFallbacks(array(
+ __DIR__.'/../src',
+));
+$loader->register();
+
+AnnotationRegistry::registerLoader(function($class) use ($loader) {
+ $loader->loadClass($class);
+ return class_exists($class, false);
+});
+AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
+
+// Swiftmailer needs a special autoloader to allow
+// the lazy loading of the init file (which is expensive)
+require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
+Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
+
108 app/check.php
View
@@ -0,0 +1,108 @@
+<?php
+
+if (!$iniPath = get_cfg_var('cfg_file_path')) {
+ $iniPath = 'WARNING: not using a php.ini file';
+}
+
+echo "********************************\n";
+echo "* *\n";
+echo "* Symfony requirements check *\n";
+echo "* *\n";
+echo "********************************\n\n";
+echo sprintf("php.ini used by PHP: %s\n\n", $iniPath);
+
+echo "** WARNING **\n";
+echo "* The PHP CLI can use a different php.ini file\n";
+echo "* than the one used with your web server.\n";
+if ('\\' == DIRECTORY_SEPARATOR) {
+ echo "* (especially on the Windows platform)\n";
+}
+echo "* If this is the case, please ALSO launch this\n";
+echo "* utility from your web server.\n";
+echo "** WARNING **\n";
+
+// mandatory
+echo_title("Mandatory requirements");
+check(version_compare(phpversion(), '5.3.2', '>='), sprintf('Checking that PHP version is at least 5.3.2 (%s installed)', phpversion()), 'Install PHP 5.3.2 or newer (current version is '.phpversion(), true);
+check(ini_get('date.timezone'), 'Checking that the "date.timezone" setting is set', 'Set the "date.timezone" setting in php.ini (like Europe/Paris)', true);
+check(is_writable(__DIR__.'/../app/cache'), sprintf('Checking that app/cache/ directory is writable'), 'Change the permissions of the app/cache/ directory so that the web server can write in it', true);
+check(is_writable(__DIR__.'/../app/logs'), sprintf('Checking that the app/logs/ directory is writable'), 'Change the permissions of the app/logs/ directory so that the web server can write in it', true);
+check(function_exists('json_encode'), 'Checking that the json_encode() is available', 'Install and enable the json extension', true);
+check(class_exists('SQLite3') || in_array('sqlite', PDO::getAvailableDrivers()), 'Checking that the SQLite3 or PDO_SQLite extension is available', 'Install and enable the SQLite3 or PDO_SQLite extension.', true);
+check(function_exists('session_start'), 'Checking that the session_start() is available', 'Install and enable the session extension', true);
+check(function_exists('ctype_alpha'), 'Checking that the ctype_alpha() is available', 'Install and enable the ctype extension', true);
+check(function_exists('token_get_all'), 'Checking that the token_get_all() is available', 'Install and enable the tokenizer extension', true);
+check(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='), 'Checking that the APC version is at least 3.0.17', 'Upgrade your APC extension (3.0.17+)', true);
+
+// warnings
+echo_title("Optional checks");
+check(class_exists('DomDocument'), 'Checking that the PHP-XML module is installed', 'Install and enable the php-xml module', false);
+check(function_exists('token_get_all'), 'Checking that the token_get_all() function is available', 'Install and enable the Tokenizer extension (highly recommended)', false);
+check(function_exists('mb_strlen'), 'Checking that the mb_strlen() function is available', 'Install and enable the mbstring extension', false);
+check(function_exists('iconv'), 'Checking that the iconv() function is available', 'Install and enable the iconv extension', false);
+check(function_exists('utf8_decode'), 'Checking that the utf8_decode() is available', 'Install and enable the XML extension', false);
+if (PHP_OS != 'WINNT') {
+ check(function_exists('posix_isatty'), 'Checking that the posix_isatty() is available', 'Install and enable the php_posix extension (used to colorized the CLI output)', false);
+}
+check(class_exists('Locale'), 'Checking that the intl extension is available', 'Install and enable the intl extension (used for validators)', false);
+if (class_exists('Locale')) {
+ $version = '';
+
+ if (defined('INTL_ICU_VERSION')) {
+ $version = INTL_ICU_VERSION;
+ } else {
+ $reflector = new \ReflectionExtension('intl');
+
+ ob_start();
+ $reflector->info();
+ $output = strip_tags(ob_get_clean());
+
+ preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
+ $version = $matches[1];
+ }
+
+ check(version_compare($version, '4.0', '>='), 'Checking that the intl ICU version is at least 4+', 'Upgrade your intl extension with a newer ICU version (4+)', false);
+}
+
+$accelerator =
+ (function_exists('apc_store') && ini_get('apc.enabled'))
+ ||
+ function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
+ ||
+ function_exists('xcache_set')
+;
+check($accelerator, 'Checking that a PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false);
+
+check(!ini_get('short_open_tag'), 'Checking that php.ini has short_open_tag set to off', 'Set short_open_tag to off in php.ini', false);
+check(!ini_get('magic_quotes_gpc'), 'Checking that php.ini has magic_quotes_gpc set to off', 'Set magic_quotes_gpc to off in php.ini', false);
+check(!ini_get('register_globals'), 'Checking that php.ini has register_globals set to off', 'Set register_globals to off in php.ini', false);
+check(!ini_get('session.auto_start'), 'Checking that php.ini has session.auto_start set to off', 'Set session.auto_start to off in php.ini', false);
+
+echo_title("Optional checks (Doctrine)");
+
+check(class_exists('PDO'), 'Checking that PDO is installed', 'Install PDO (mandatory for Doctrine)', false);
+if (class_exists('PDO')) {
+ $drivers = PDO::getAvailableDrivers();
+ check(count($drivers), 'Checking that PDO has some drivers installed: '.implode(', ', $drivers), 'Install PDO drivers (mandatory for Doctrine)');
+}
+
+/**
+ * Checks a configuration.
+ */
+function check($boolean, $message, $help = '', $fatal = false)
+{
+ echo $boolean ? " OK " : sprintf("\n\n[[%s]] ", $fatal ? ' ERROR ' : 'WARNING');
+ echo sprintf("$message%s\n", $boolean ? '' : ': FAILED');
+
+ if (!$boolean) {
+ echo " *** $help ***\n";
+ if ($fatal) {
+ exit("You must fix this problem before resuming the check.\n");
+ }
+ }
+}
+
+function echo_title($title)
+{
+ echo "\n** $title **\n\n";
+}
59 app/config/config.yml
View
@@ -0,0 +1,59 @@
+imports:
+ - { resource: parameters.ini }
+ - { resource: security.yml }
+
+framework:
+ #esi: ~
+ #translator: { fallback: %locale% }
+ secret: %secret%
+ charset: UTF-8
+ router: { resource: "%kernel.root_dir%/config/routing.yml" }
+ form: true
+ csrf_protection: true
+ validation: { enable_annotations: true }
+ templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
+ session:
+ default_locale: %locale%
+ auto_start: true
+
+# Twig Configuration
+twig:
+ debug: %kernel.debug%
+ strict_variables: %kernel.debug%
+
+# Assetic Configuration
+assetic:
+ debug: %kernel.debug%
+ use_controller: false
+ filters:
+ cssrewrite: ~
+ # closure:
+ # jar: %kernel.root_dir%/java/compiler.jar
+ # yui_css:
+ # jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
+
+# Doctrine Configuration
+doctrine:
+ dbal:
+ driver: %database_driver%
+ host: %database_host%
+ port: %database_port%
+ dbname: %database_name%
+ user: %database_user%
+ password: %database_password%
+ charset: UTF8
+
+ orm:
+ auto_generate_proxy_classes: %kernel.debug%
+ auto_mapping: true
+
+# Swiftmailer Configuration
+swiftmailer:
+ transport: %mailer_transport%
+ host: %mailer_host%
+ username: %mailer_user%
+ password: %mailer_password%
+
+jms_security_extra:
+ secure_controllers: true
+ secure_all_services: false
23 app/config/config_dev.yml
View
@@ -0,0 +1,23 @@
+imports:
+ - { resource: config.yml }
+
+framework:
+ router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
+ profiler: { only_exceptions: false }
+
+web_profiler:
+ toolbar: true
+ intercept_redirects: false
+
+monolog:
+ handlers:
+ main:
+ type: stream
+ path: %kernel.logs_dir%/%kernel.environment%.log
+ level: debug
+ firephp:
+ type: firephp
+ level: info
+
+assetic:
+ use_controller: true
19 app/config/config_prod.yml
View
@@ -0,0 +1,19 @@
+imports:
+ - { resource: config.yml }
+
+#doctrine:
+# orm:
+# metadata_cache_driver: apc
+# result_cache_driver: apc
+# query_cache_driver: apc
+
+monolog:
+ handlers:
+ main:
+ type: fingers_crossed
+ action_level: error
+ handler: nested
+ nested:
+ type: stream
+ path: %kernel.logs_dir%/%kernel.environment%.log
+ level: debug
14 app/config/config_test.yml
View
@@ -0,0 +1,14 @@
+imports:
+ - { resource: config_dev.yml }
+
+framework:
+ test: ~
+ session:
+ storage_id: session.storage.filesystem
+
+web_profiler:
+ toolbar: false
+ intercept_redirects: false
+
+swiftmailer:
+ disable_delivery: true
4 app/config/routing.yml
View
@@ -0,0 +1,4 @@
+# Internal routing configuration to handle ESI
+#_internal:
+# resource: "@FrameworkBundle/Resources/config/routing/internal.xml"
+# prefix: /_internal
31 app/config/routing_dev.yml
View
@@ -0,0 +1,31 @@
+_welcome:
+ pattern: /
+ defaults: { _controller: AcmeDemoBundle:Welcome:index }
+
+_demo_secured:
+ resource: "@AcmeDemoBundle/Controller/SecuredController.php"
+ type: annotation
+
+_demo:
+ resource: "@AcmeDemoBundle/Controller/DemoController.php"
+ type: annotation
+ prefix: /demo
+
+_assetic:
+ resource: .
+ type: assetic
+
+_wdt:
+ resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml"
+ prefix: /_wdt
+
+_profiler:
+ resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml"
+ prefix: /_profiler
+
+_configurator:
+ resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
+ prefix: /_configurator
+
+_main:
+ resource: routing.yml
38 app/config/security.yml
View
@@ -0,0 +1,38 @@
+security:
+ encoders:
+ Symfony\Component\Security\Core\User\User: plaintext
+
+ role_hierarchy:
+ ROLE_ADMIN: ROLE_USER
+ ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
+
+ providers:
+ in_memory:
+ users:
+ user: { password: userpass, roles: [ 'ROLE_USER' ] }
+ admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
+
+ firewalls:
+ dev:
+ pattern: ^/(_(profiler|wdt)|css|images|js)/
+ security: false
+
+ login:
+ pattern: ^/demo/secured/login$
+ security: false
+
+ secured_area:
+ pattern: ^/demo/secured/
+ form_login:
+ check_path: /demo/secured/login_check
+ login_path: /demo/secured/login
+ logout:
+ path: /demo/secured/logout
+ target: /demo/
+ #anonymous: ~
+ #http_basic:
+ # realm: "Secured Demo Area"
+
+ access_control:
+ #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
+ #- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY, ip: 127.0.0.1 }
22 app/console
View
@@ -0,0 +1,22 @@
+#!/usr/bin/env php
+<?php
+
+// if you don't want to setup permissions the proper way, just uncomment the following PHP line
+// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
+//umask(0000);
+
+set_time_limit(0);
+
+require_once __DIR__.'/bootstrap.php.cache';
+require_once __DIR__.'/AppKernel.php';
+
+use Symfony\Bundle\FrameworkBundle\Console\Application;
+use Symfony\Component\Console\Input\ArgvInput;
+
+$input = new ArgvInput();
+$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
+$debug = !$input->hasParameterOption(array('--no-debug', ''));
+
+$kernel = new AppKernel($env, $debug);
+$application = new Application($kernel);
+$application->run();
41 app/phpunit.xml.dist
View
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
+<phpunit
+ backupGlobals = "false"
+ backupStaticAttributes = "false"
+ colors = "true"
+ convertErrorsToExceptions = "true"
+ convertNoticesToExceptions = "true"
+ convertWarningsToExceptions = "true"
+ processIsolation = "false"
+ stopOnFailure = "false"
+ syntaxCheck = "false"
+ bootstrap = "bootstrap.php.cache" >
+
+ <testsuites>
+ <testsuite name="Project Test Suite">
+ <directory>../src/*/*Bundle/Tests</directory>
+ <directory>../src/*/Bundle/*Bundle/Tests</directory>
+ </testsuite>
+ </testsuites>
+
+ <!--
+ <php>
+ <server name="KERNEL_DIR" value="/path/to/your/app/" />
+ </php>
+ -->
+
+ <filter>
+ <whitelist>
+ <directory>../src</directory>
+ <exclude>
+ <directory>../src/*/*Bundle/Resources</directory>
+ <directory>../src/*/*Bundle/Tests</directory>
+ <directory>../src/*/Bundle/*Bundle/Resources</directory>
+ <directory>../src/*/Bundle/*Bundle/Tests</directory>
+ </exclude>
+ </whitelist>
+ </filter>
+
+</phpunit>
1  bin/.htaccess
View
@@ -0,0 +1 @@
+deny from all
129 bin/vendors
View
@@ -0,0 +1,129 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of the Symfony Standard Edition.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+set_time_limit(0);
+
+$rootDir = dirname(__DIR__);
+$vendorDir = $rootDir.'/vendor';
+
+array_shift($argv);
+if (!isset($argv[0])) {
+ exit(<<<EOF
+Symfony2 vendors script management.
+
+Specify a command to run:
+
+ install: install vendors as specified in deps or deps.lock (recommended)
+ update: update vendors to their latest versions (as specified in deps)
+
+
+EOF
+ );
+}
+
+if (!in_array($command = array_shift($argv), array('install', 'update'))) {
+ exit(sprintf("Command \"%s\" does not exist.\n", $command));
+}
+
+/*
+ * Check wether this project is based on the Standard Edition that was
+ * shipped with vendors or not.
+ */
+if (is_dir($vendorDir.'/symfony') && !is_dir($vendorDir.'/symfony/.git') && !in_array('--reinstall', $argv)) {
+ exit(<<<EOF
+Your project seems to be based on a Standard Edition that includes vendors.
+
+Try to run ./bin/vendors install --reinstall
+
+
+EOF
+ );
+}
+
+if (!is_dir($vendorDir)) {
+ mkdir($vendorDir, 0777, true);
+}
+
+// versions
+$versions = array();
+if ('install' === $command && file_exists($rootDir.'/deps.lock')) {
+ foreach (file($rootDir.'/deps.lock', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) {
+ $parts = array_values(array_filter(explode(' ', $line)));
+ if (2 !== count($parts)) {
+ exit(sprintf('The deps version file is not valid (near "%s")', $line));
+ }
+ $versions[$parts[0]] = $parts[1];
+ }
+}
+
+$newversions = array();
+$deps = parse_ini_file($rootDir.'/deps', true, INI_SCANNER_RAW);
+if (false === $deps) {
+ exit("The deps file is not valid ini syntax. Perhaps missing a trailing newline?\n");
+}
+foreach ($deps as $name => $dep) {
+ $dep = array_map('trim', $dep);
+
+ // revision
+ if (isset($versions[$name])) {
+ $rev = $versions[$name];
+ } else {
+ $rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD';
+ }
+
+ // install dir
+ $installDir = isset($dep['target']) ? $vendorDir.'/'.$dep['target'] : $vendorDir.'/'.$name;
+ if (in_array('--reinstall', $argv)) {
+ if (PHP_OS == 'WINNT') {
+ system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir))));
+ } else {
+ system(sprintf('rm -rf %s', escapeshellarg($installDir)));
+ }
+ }
+
+ echo "> Installing/Updating $name\n";
+
+ // url
+ if (!isset($dep['git'])) {
+ exit(sprintf('The "git" value for the "%s" dependency must be set.', $name));
+ }
+ $url = $dep['git'];
+
+ if (!is_dir($installDir)) {
+ system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
+ }
+
+ system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
+
+ if ('update' === $command) {
+ ob_start();
+ system(sprintf('cd %s && git log -n 1 --format=%%H', escapeshellarg($installDir)));
+ $newversions[] = trim($name.' '.ob_get_clean());
+ }
+}
+
+// update?
+if ('update' === $command) {
+ file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions));
+}
+
+// php on windows can't use the shebang line from system()
+$interpreter = PHP_OS == 'WINNT' ? 'php.exe' : '';
+
+// Update the bootstrap files
+system(sprintf('%s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php')));
+
+// Update assets
+system(sprintf('%s %s assets:install %s', $interpreter, escapeshellarg($rootDir.'/app/console'), escapeshellarg($rootDir.'/web/')));
+
+// Remove the cache
+system(sprintf('%s %s cache:clear --no-warmup', $interpreter, escapeshellarg($rootDir.'/app/console')));
61 deps
View
@@ -0,0 +1,61 @@
+[symfony]
+ git=http://github.com/symfony/symfony.git
+ version=v2.0.4
+
+[twig]
+ git=http://github.com/fabpot/Twig.git
+ version=v1.1.2
+
+[monolog]
+ git=http://github.com/Seldaek/monolog.git
+ version=1.0.1
+
+[doctrine-common]
+ git=http://github.com/doctrine/common.git
+ version=2.1.2
+
+[doctrine-dbal]
+ git=http://github.com/doctrine/dbal.git
+ version=2.1.3
+
+[doctrine]
+ git=http://github.com/doctrine/doctrine2.git
+ version=2.1.2
+
+[swiftmailer]
+ git=http://github.com/swiftmailer/swiftmailer.git
+ version=v4.1.2
+
+[assetic]
+ git=http://github.com/kriswallsmith/assetic.git
+ version=v1.0.2
+
+[twig-extensions]
+ git=http://github.com/fabpot/Twig-extensions.git
+
+[metadata]
+ git=http://github.com/schmittjoh/metadata.git
+ version=1.0.0
+
+[SensioFrameworkExtraBundle]
+ git=http://github.com/sensio/SensioFrameworkExtraBundle.git
+ target=/bundles/Sensio/Bundle/FrameworkExtraBundle
+
+[JMSSecurityExtraBundle]
+ git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
+ target=/bundles/JMS/SecurityExtraBundle
+ version=origin/1.0.x
+
+[SensioDistributionBundle]
+ git=http://github.com/sensio/SensioDistributionBundle.git
+ target=/bundles/Sensio/Bundle/DistributionBundle
+ version=origin/1.0
+
+[SensioGeneratorBundle]
+ git=http://github.com/sensio/SensioGeneratorBundle.git
+ target=/bundles/Sensio/Bundle/GeneratorBundle
+
+[AsseticBundle]
+ git=http://github.com/symfony/AsseticBundle.git
+ target=/bundles/Symfony/Bundle/AsseticBundle
+ version=v1.0.1
15 deps.lock
View
@@ -0,0 +1,15 @@
+symfony 1f2e72d84aa9a4829185d6b2a0b814f6b933b30a
+twig 396435ecd05556adb0a8bd05b14641cb4f8a8aa5
+monolog 303b8a83c87d5c6d749926cf02620465a5dcd0f2
+doctrine-common b385ca770888248241bd3086a40d5b3bd082a706
+doctrine-dbal e0b69790ab1ffd646fd70a04fdb91e5dfbb3ccf1
+doctrine 144d0de0ab61dffc738d7fb590cff8d77919f553
+swiftmailer 8c3165691e36302405926abbae7526549db8b899
+assetic f829ad23d23c87480151a21faad49fefe7c09e5d
+twig-extensions eba4f5d572bec05c72a47bbd73ba0a3330cf8f54
+metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
+SensioFrameworkExtraBundle 9b9194a47effc66b08d44ae110b982352119ca17
+JMSSecurityExtraBundle b8b7eb294ed83d83ca7260ac018e701f08003538
+SensioDistributionBundle 2082cb99d408fd89243059c6eff866347ec00bbe
+SensioGeneratorBundle 88ecf05691825c81b6a19ca6e2dc1849f1a5dcd4
+AsseticBundle 41b5913b5086a0909af92adcb4a6005ee0051b16
1  src/.htaccess
View
@@ -0,0 +1 @@
+deny from all
9 src/Acme/DemoBundle/AcmeDemoBundle.php
View
@@ -0,0 +1,9 @@
+<?php
+
+namespace Acme\DemoBundle;
+
+use Symfony\Component\HttpKernel\Bundle\Bundle;
+
+class AcmeDemoBundle extends Bundle
+{
+}
57 src/Acme/DemoBundle/Controller/DemoController.php
View
@@ -0,0 +1,57 @@
+<?php
+
+namespace Acme\DemoBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Symfony\Component\HttpFoundation\RedirectResponse;
+use Acme\DemoBundle\Form\ContactType;
+
+// these import the "@Route" and "@Template" annotations
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
+
+class DemoController extends Controller
+{
+ /**
+ * @Route("/", name="_demo")
+ * @Template()
+ */
+ public function indexAction()
+ {
+ return array();
+ }
+
+ /**
+ * @Route("/hello/{name}", name="_demo_hello")
+ * @Template()
+ */
+ public function helloAction($name)
+ {
+ return array('name' => $name);
+ }
+
+ /**
+ * @Route("/contact", name="_demo_contact")
+ * @Template()
+ */
+ public function contactAction()
+ {
+ $form = $this->get('form.factory')->create(new ContactType());
+
+ $request = $this->get('request');
+ if ('POST' == $request->getMethod()) {
+ $form->bindRequest($request);
+ if ($form->isValid()) {
+ $mailer = $this->get('mailer');
+ // .. setup a message and send it
+ // http://symfony.com/doc/current/cookbook/email.html
+
+ $this->get('session')->setFlash('notice', 'Message sent!');
+
+ return new RedirectResponse($this->generateUrl('_demo'));
+ }
+ }
+
+ return array('form' => $form->createView());
+ }
+}
69 src/Acme/DemoBundle/Controller/SecuredController.php
View
@@ -0,0 +1,69 @@
+<?php
+
+namespace Acme\DemoBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Symfony\Component\Security\Core\SecurityContext;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
+use JMS\SecurityExtraBundle\Annotation\Secure;
+
+/**
+ * @Route("/demo/secured")
+ */
+class SecuredController extends Controller
+{
+ /**
+ * @Route("/login", name="_demo_login")
+ * @Template()
+ */
+ public function loginAction()
+ {
+ if ($this->get('request')->attributes->has(SecurityContext::AUTHENTICATION_ERROR)) {
+ $error = $this->get('request')->attributes->get(SecurityContext::AUTHENTICATION_ERROR);
+ } else {
+ $error = $this->get('request')->getSession()->get(SecurityContext::AUTHENTICATION_ERROR);
+ }
+
+ return array(
+ 'last_username' => $this->get('request')->getSession()->get(SecurityContext::LAST_USERNAME),
+ 'error' => $error,
+ );
+ }
+
+ /**
+ * @Route("/login_check", name="_security_check")
+ */
+ public function securityCheckAction()
+ {
+ // The security layer will intercept this request
+ }
+
+ /**
+ * @Route("/logout", name="_demo_logout")
+ */
+ public function logoutAction()
+ {
+ // The security layer will intercept this request
+ }
+
+ /**
+ * @Route("/hello", defaults={"name"="World"}),
+ * @Route("/hello/{name}", name="_demo_secured_hello")
+ * @Template()
+ */
+ public function helloAction($name)
+ {
+ return array('name' => $name);
+ }
+
+ /**
+ * @Route("/hello/admin/{name}", name="_demo_secured_hello_admin")
+ * @Secure(roles="ROLE_ADMIN")
+ * @Template()
+ */
+ public function helloadminAction($name)
+ {
+ return array('name' => $name);
+ }
+}
13 src/Acme/DemoBundle/Controller/WelcomeController.php
View
@@ -0,0 +1,13 @@
+<?php
+
+namespace Acme\DemoBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+
+class WelcomeController extends Controller
+{
+ public function indexAction()
+ {
+ return $this->render('AcmeDemoBundle:Welcome:index.html.twig');
+ }
+}
25 src/Acme/DemoBundle/ControllerListener.php
View
@@ -0,0 +1,25 @@
+<?php
+
+namespace Acme\DemoBundle;
+
+use Symfony\Component\EventDispatcher\Event;
+use Symfony\Component\HttpKernel\HttpKernelInterface;
+use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
+use Acme\DemoBundle\Twig\Extension\DemoExtension;
+
+class ControllerListener
+{
+ protected $extension;
+
+ public function __construct(DemoExtension $extension)
+ {
+ $this->extension = $extension;
+ }
+
+ public function onKernelController(FilterControllerEvent $event)
+ {
+ if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
+ $this->extension->setController($event->getController());
+ }
+ }
+}
22 src/Acme/DemoBundle/DependencyInjection/AcmeDemoExtension.php
View
@@ -0,0 +1,22 @@
+<?php
+
+namespace Acme\DemoBundle\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
+use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\Config\FileLocator;
+
+class AcmeDemoExtension extends Extension
+{
+ public function load(array $configs, ContainerBuilder $container)
+ {
+ $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
+ $loader->load('services.xml');
+ }
+
+ public function getAlias()
+ {
+ return 'acme_demo';
+ }
+}
20 src/Acme/DemoBundle/Form/ContactType.php
View
@@ -0,0 +1,20 @@
+<?php
+
+namespace Acme\DemoBundle\Form;
+
+use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\FormBuilder;
+
+class ContactType extends AbstractType
+{
+ public function buildForm(FormBuilder $builder, array $options)
+ {
+ $builder->add('email', 'email');
+ $builder->add('message', 'textarea');
+ }
+
+ public function getName()
+ {
+ return 'contact';
+ }
+}
18 src/Acme/DemoBundle/Resources/config/services.xml
View
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+
+<container xmlns="http://symfony.com/schema/dic/services"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
+
+ <services>
+ <service id="twig.extension.acme.demo" class="Acme\DemoBundle\Twig\Extension\DemoExtension" public="false">
+ <tag name="twig.extension" />
+ <argument type="service" id="twig.loader" />
+ </service>
+
+ <service id="acme.demo.listener" class="Acme\DemoBundle\ControllerListener">
+ <tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" />
+ <argument type="service" id="twig.extension.acme.demo" />
+ </service>
+ </services>
+</container>
293 src/Acme/DemoBundle/Resources/public/css/demo.css
View
@@ -0,0 +1,293 @@
+/*
+Copyright (c) 2010, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.8.2r1
+
+Reset
+*/
+
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
+
+html, body
+{
+ background-color: #EFEFEF;
+}
+
+body
+{
+ font-size: 14px;
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+ color: #313131;
+}
+
+a
+{
+ color: #08C;
+ text-decoration: none;
+}
+
+a:hover
+{
+ text-decoration: underline;
+}
+
+strong
+{
+ font-weight: bold;
+}
+
+em
+{
+ font-style: italic;
+}
+
+h1, h2, h3
+{
+ font-family: Georgia, "Times New Roman", Times, serif;
+ color: #404040;
+}
+
+h1
+{
+ font-size: 45px;
+ padding-bottom: 30px;
+}
+
+h2
+{
+ font-weight: bold;
+ color: #FFFFFF;
+ /* Font is duplicated of body (sans-serif) */
+ font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
+
+ margin-bottom: 10px;
+ background-color: #aacd4e;
+ padding: 2px 4px;
+ display: inline-block;
+ text-transform: uppercase;
+
+}
+
+p
+{
+ line-height: 20px;
+ padding-bottom: 20px;
+}
+
+ul#demo-list a
+{
+ background: url(../images/blue-arrow.png) no-repeat right 6px;
+ padding-right: 10px;
+}
+
+ul, ol
+{
+ padding-left: 20px;
+}
+
+li
+{
+ padding-bottom: 18px;
+}
+
+ol li
+{
+ list-style-type: decimal;
+}
+
+ul li
+{
+ list-style-type: none;
+}
+
+#symfony-header
+{
+ position: relative;
+ padding: 30px 30px 20px 30px;
+}
+
+#symfony-wrapper
+{
+ width: 970px;
+ margin: 0 auto;
+}
+
+.symfony-content
+{
+ background-color: white;
+ border: 1px solid #DFDFDF;
+ padding: 50px;
+ -moz-border-radius: 16px;
+ -webkit-border-radius: 16px;
+ border-radius: 16px;
+ margin-bottom: 20px;
+ word-wrap: break-word;
+}
+
+#symfony-search
+{
+ position: absolute;
+ top: 50px;
+ right: 30px;
+}
+
+#symfony-search input[type="search"]
+{
+ -webkit-appearance: textfield;
+}
+
+#symfony-search-field
+{
+ width: 190px;
+}
+
+#symfony-search label
+{
+ display: block;
+ float: left;
+ width: 20px;
+ height: 25px;
+ background: url(../images/search.png) no-repeat left 5px;
+}
+
+#symfony-search label span
+{
+ display: none;
+}
+
+input[type=text], input[type=password]
+{
+ border: 1px solid #DADADA;
+ background: white url(../images/field-background.gif) repeat-x left top;
+ padding: 5px 6px;
+ color: #565656;
+ font-family: 'Lucida Sans Unicode', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+
+.symfony-button-grey,
+.symfony-button-green
+{
+ font-size: 0.85em;
+ font-weight: bold;
+
+ cursor: pointer;
+
+ display: inline-block;
+ outline: none;
+
+ text-align: center;
+ text-transform: uppercase;
+
+ padding: 3px 10px;
+
+ text-shadow: 0 1px 1px rgba(0,0,0,.3);
+
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.symfony-button-grey
+{
+ color: #868686;
+ font-weight: normal;
+
+ padding: 5px 10px;
+ border: solid 1px #d7d7d7;
+ background: #ffffff;
+ background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#d7d7d7));
+ background: -moz-linear-gradient(top, #ffffff, #d7d7d7);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#d7d7d7');
+}
+
+.symfony-button-green
+{
+ padding: 5px 12px;
+
+ color: white;
+
+ border: solid 1px #a7da39;
+ background: #a7da39;
+ background: -webkit-gradient(linear, left top, left bottom, from(#a7da39), to(#6a9211));
+ background: -moz-linear-gradient(top, #a7da39, #6a9211);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a7da39', endColorstr='#6a9211');
+}
+
+.symfony-blocks-welcome
+{
+ overflow: hidden;
+}
+
+.symfony-blocks-welcome > div
+{
+ background-color: whitesmoke;
+ float: left;
+ width: 240px;
+ margin-right: 14px;
+ text-align: center;
+ padding: 26px 20px;
+}
+
+.symfony-blocks-welcome > div.block-demo
+{
+ margin-right: 0;
+}
+
+.symfony-blocks-welcome .illustration
+{
+ padding-bottom: 20px;
+}
+
+.symfony-blocks-help
+{
+ overflow: hidden;
+}
+
+.symfony-blocks-help
+{
+ margin-top: 30px;
+ padding: 18px;
+ border: 1px solid #E6E6E6;
+}
+
+.symfony-blocks-help > div
+{
+ width: 254px;
+ float: left;
+}
+
+.flash-message
+{
+ padding: 10px;
+ margin: 5px;
+ margin-top: 15px;
+ background-color: #ffe;
+}
+
+.error
+{
+ color: red;
+}
+
+#login label, #contact_form label
+{
+ display: block;
+ float: left;
+ width: 90px;
+}
+
+ul#menu
+{
+ float: right;
+ margin-bottom: 20px;
+ padding-left: 0;
+}
+
+#menu li
+{
+ padding-left: 0;
+ margin-right: 10px;
+ display: inline;
+}
BIN  src/Acme/DemoBundle/Resources/public/images/blue-arrow.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/field-background.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/logo.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/search.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/welcome-configure.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/welcome-demo.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  src/Acme/DemoBundle/Resources/public/images/welcome-quick-tour.gif
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 src/Acme/DemoBundle/Resources/views/Demo/contact.html.twig
View
@@ -0,0 +1,15 @@
+{% extends "AcmeDemoBundle::layout.html.twig" %}
+
+{% block title "Symfony - Contact form" %}
+
+{% block content %}
+ <form action="{{ path('_demo_contact') }}" method="POST" id="contact_form">
+ {{ form_errors(form) }}
+
+ {{ form_row(form.email) }}
+ {{ form_row(form.message) }}
+
+ {{ form_rest(form) }}
+ <input type="submit" value="Send" class="symfony-button-grey" />
+ </form>
+{% endblock %}
9 src/Acme/DemoBundle/Resources/views/Demo/hello.html.twig
View
@@ -0,0 +1,9 @@
+{% extends "AcmeDemoBundle::layout.html.twig" %}
+
+{% block title "Hello " ~ name %}
+
+{% block content %}
+ <h1>Hello {{ name }}!</h1>
+{% endblock %}
+
+{% set code = code(_self) %}
14 src/Acme/DemoBundle/Resources/views/Demo/index.html.twig
View
@@ -0,0 +1,14 @@
+{% extends "AcmeDemoBundle::layout.html.twig" %}
+
+{% block title "Symfony - Demos" %}
+
+{% block content_header '' %}
+
+{% block content %}
+ <h1>Available demos</h1>
+ <ul id="demo-list">
+ <li><a href="{{ path('_demo_hello', {'name': 'World'}) }}">Hello World</a></li>
+ <li><a href="{{ path('_demo_secured_hello', {'name': 'World'}) }}">Access the secured area</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="{{ path('_demo_login') }}">Go to the login page</a></li>
+ {# <li><a href="{{ path('_demo_contact') }}">Send a Message</a></li> #}
+ </ul>
+{% endblock %}
11 src/Acme/DemoBundle/Resources/views/Secured/hello.html.twig
View
@@ -0,0 +1,11 @@
+{% extends "AcmeDemoBundle:Secured:layout.html.twig" %}
+
+{% block title "Hello " ~ name %}
+
+{% block content %}
+ <h1>Hello {{ name }}!</h1>
+
+ <a href="{{ path('_demo_secured_hello_admin', { 'name': name }) }}">Hello resource secured for <strong>admin</strong> only.</a>
+{% endblock %}
+
+{% set code = code(_self) %}
9 src/Acme/DemoBundle/Resources/views/Secured/helloadmin.html.twig
View
@@ -0,0 +1,9 @@
+{% extends "AcmeDemoBundle:Secured:layout.html.twig" %}
+
+{% block title "Hello " ~ name %}
+
+{% block content %}
+ <h1>Hello {{ name }} secured for Admins only!</h1>
+{% endblock %}
+
+{% set code = code(_self) %}
6 src/Acme/DemoBundle/Resources/views/Secured/layout.html.twig
View
@@ -0,0 +1,6 @@
+{% extends "AcmeDemoBundle::layout.html.twig" %}
+
+{% block content_header_more %}
+ {{ parent() }}
+ <li>logged in as <strong>{{ app.user ? app.user.username : 'Anonymous' }}</strong> - <a href="{{ path('_demo_logout') }}">Logout</a></li>
+{% endblock %}
29 src/Acme/DemoBundle/Resources/views/Secured/login.html.twig
View
@@ -0,0 +1,29 @@
+{% extends 'AcmeDemoBundle::layout.html.twig' %}
+
+{% block content %}
+ <h1>Login</h1>
+
+ <p>
+ Choose between two default users: <em>user/userpass</em> <small>(ROLE_USER)</small> or <em>admin/adminpass</em> <small>(ROLE_ADMIN)</small>
+ </p>
+
+ {% if error %}
+ <div class="error">{{ error.message }}</div>
+ {% endif %}
+
+ <form action="{{ path("_security_check") }}" method="post" id="login">
+ <div>
+ <label for="username">Username</label>
+ <input type="text" id="username" name="_username" value="{{ last_username }}" />
+ </div>
+
+ <div>
+ <label for="password">Password</label>
+ <input type="password" id="password" name="_password" />
+ </div>
+
+ <input type="submit" class="symfony-button-grey" value="LOGIN" />
+ </form>
+{% endblock %}
+
+{% set code = code(_self) %}
63 src/Acme/DemoBundle/Resources/views/Welcome/index.html.twig
View
@@ -0,0 +1,63 @@
+{% extends 'AcmeDemoBundle::layout.html.twig' %}
+
+{% block title %}Symfony - Welcome{% endblock %}
+
+{% block content_header '' %}
+
+{% block content %}
+ <h1>Welcome!</h1>
+
+ <p>Congratulations! You have successfully installed a new Symfony application.</p>
+
+ <div class="symfony-blocks-welcome">
+ <div class="block-quick-tour">
+ <div class="illustration">
+ <img src="{{ asset('bundles/acmedemo/images/welcome-quick-tour.gif') }}" alt="Quick tour" />
+ </div>
+ <a class="symfony-button-green" href="http://symfony.com/doc/2.0/quick_tour/index.html">Read the Quick Tour</a>
+ </div>
+ {% if app.environment == 'dev' %}
+ <div class="block-configure">
+ <div class="illustration">
+ <img src="{{ asset('bundles/acmedemo/images/welcome-configure.gif') }}" alt="Configure your appication" />
+ </div>
+ <a class="symfony-button-green" href="{{ path('_configurator_home') }}">Configure</a>
+ </div>
+ {% endif %}
+ <div class="block-demo">
+ <div class="illustration">
+ <img src="{{ asset('bundles/acmedemo/images/welcome-demo.gif') }}" alt="Demo" />
+ </div>
+ <a class="symfony-button-green" href="{{ path('_demo') }}">Run The Demo</a>
+ </div>
+ </div>
+
+ <div class="symfony-blocks-help">
+ <div class="block-documentation">
+ <ul>
+ <li><strong>Documentation</strong></li>
+ <li><a href="http://symfony.com/doc/2.0/book/index.html">The book</a></li>
+ <li><a href="http://symfony.com/doc/2.0/reference/index.html">The cookbook</a></li>
+ <li><a href="http://symfony.com/doc/2.0/glossary/index.html">Glossary</a></li>
+ </ul>
+ </div>
+ <div class="block-documentation-more">
+ <ul>
+ <li>&nbsp;</li>
+ <li><a href="http://symfony.com/doc/2.0/contributing/index.html">Contributing</a></li>
+ <li><a href="http://trainings.sensiolabs.com">Trainings</a></li>
+ <li><a href="http://books.sensiolabs.com">Books</a></li>
+ </ul>
+ </div>
+ <div class="block-community">
+ <ul>
+ <li><strong>Community</strong></li>
+ <li><a href="http://symfony.com/irc">IRC channel</a>
+ <li><a href="http://symfony.com/mailing-lists">Mailing lists</a></li>
+ <li><a href="http://forum.symfony-project.org">Forum</a></li>
+ <li><a href="http://symfony.com/doc/2.0/contributing/index.html">How to be involved</a></li>
+ <li><a href="http://symfony.com/doc/2.0/contributing/index.html">Contributing</a></li>
+ </ul>
+ </div>
+ </div>
+{% endblock %}
49 src/Acme/DemoBundle/Resources/views/layout.html.twig
View
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="{{ asset('bundles/acmedemo/css/demo.css') }}" type="text/css" media="all" />
+ <title>{% block title %}Demo Bundle{% endblock %}</title>
+ <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
+ </head>
+ <body>
+ <div id="symfony-wrapper">
+ <div id="symfony-header">
+ <a href="{{ path('_welcome') }}">
+ <img src="{{ asset('bundles/acmedemo/images/logo.gif') }}" alt="Symfony">
+ </a>
+ <form id="symfony-search" method="GET" action="http://symfony.com/search">
+ <label for="symfony-search-field"><span>Search on Symfony Website</span></label>
+ <input name="q" id="symfony-search-field" type="search" placeholder="Search on Symfony website" class="medium_txt">
+ <input type="submit" class="symfony-button-grey" value="OK" />
+ </form>
+ </div>
+
+ {% if app.session.flash('notice') %}
+ <div class="flash-message">
+ <em>Notice</em>: {{ app.session.flash('notice') }}
+ </div>
+ {% endif %}
+
+ {% block content_header %}
+ <ul id="menu">
+ {% block content_header_more %}
+ <li><a href="{{ path('_demo') }}">Demo Home</a></li>
+ {% endblock %}
+ </ul>
+
+ <div style="clear: both"></div>
+ {% endblock %}
+
+ <div class="symfony-content">
+ {% block content %}
+ {% endblock %}
+ </div>
+
+ {% if code is defined %}
+ <h2>Code behind this page</h2>
+ <div class="symfony-content">{{ code|raw }}</div>
+ {% endif %}
+ </div>
+ </body>
+</html>
17 src/Acme/DemoBundle/Tests/Controller/DemoControllerTest.php
View
@@ -0,0 +1,17 @@
+<?php
+
+namespace Acme\DemoBundle\Tests\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
+
+class DemoControllerTest extends WebTestCase
+{
+ public function testIndex()
+ {
+ $client = $this->createClient();
+
+ $crawler = $client->request('GET', '/demo/hello/Fabien');
+
+ $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
+ }
+}
74 src/Acme/DemoBundle/Twig/Extension/DemoExtension.php
View
@@ -0,0 +1,74 @@
+<?php
+
+namespace Acme\DemoBundle\Twig\Extension;
+
+use Symfony\Component\HttpKernel\KernelInterface;
+use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
+
+class DemoExtension extends \Twig_Extension
+{
+ protected $loader;
+ protected $controller;
+
+ public function __construct(FilesystemLoader $loader)
+ {
+ $this->loader = $loader;
+ }
+
+ public function setController($controller)
+ {
+ $this->controller = $controller;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getFunctions()
+ {
+ return array(
+ 'code' => new \Twig_Function_Method($this, 'getCode', array('is_safe' => array('html'))),
+ );
+ }
+
+ public function getCode($template)
+ {
+ $controller = htmlspecialchars($this->getControllerCode(), ENT_QUOTES, 'UTF-8');
+ $template = htmlspecialchars($this->getTemplateCode($template), ENT_QUOTES, 'UTF-8');
+
+ // remove the code block
+ $template = str_replace('{% set code = code(_self) %}', '', $template);
+
+ return <<<EOF
+<p><strong>Controller Code</strong></p>
+<pre>$controller</pre>
+
+<p><strong>Template Code</strong></p>
+<pre>$template</pre>
+EOF;
+ }
+
+ protected function getControllerCode()
+ {
+ $r = new \ReflectionClass($this->controller[0]);
+ $m = $r->getMethod($this->controller[1]);
+
+ $code = file($r->getFilename());
+
+ return ' '.$m->getDocComment()."\n".implode('', array_slice($code, $m->getStartline() - 1, $m->getEndLine() - $m->getStartline() + 1));
+ }
+
+ protected function getTemplateCode($template)
+ {
+ return $this->loader->getSource($template->getTemplateName());
+ }
+
+ /**
+ * Returns the name of the extension.
+ *
+ * @return string The extension name
+ */
+ public function getName()
+ {
+ return 'demo';
+ }
+}
5 web/.htaccess
View
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^(.*)$ app.php [QSA,L]
+</IfModule>
12 web/app.php
View
@@ -0,0 +1,12 @@
+<?php
+
+require_once __DIR__.'/../app/bootstrap.php.cache';
+require_once __DIR__.'/../app/AppKernel.php';
+//require_once __DIR__.'/../app/AppCache.php';
+
+use Symfony\Component\HttpFoundation\Request;
+
+$kernel = new AppKernel('prod', false);
+$kernel->loadClassCache();
+//$kernel = new AppCache($kernel);
+$kernel->handle(Request::createFromGlobals())->send();
24 web/app_dev.php
View
@@ -0,0 +1,24 @@
+<?php
+
+// if you don't want to setup permissions the proper way, just uncomment the following PHP line
+// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
+//umask(0000);
+
+// this check prevents access to debug front controllers that are deployed by accident to production servers.
+// feel free to remove this, extend it, or make something more sophisticated.
+if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
+ '127.0.0.1',
+ '::1',
+))) {
+ header('HTTP/1.0 403 Forbidden');
+ exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
+}
+
+require_once __DIR__.'/../app/bootstrap.php.cache';
+require_once __DIR__.'/../app/AppKernel.php';
+
+use Symfony\Component\HttpFoundation\Request;
+
+$kernel = new AppKernel('dev', true);
+$kernel->loadClassCache();
+$kernel->handle(Request::createFromGlobals())->send();
BIN  web/apple-touch-icon.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
213 web/config.php
View
@@ -0,0 +1,213 @@
+<?php
+
+if (!isset($_SERVER['HTTP_HOST'])) {
+ exit('This script cannot be run from the CLI. Run it from a browser.');
+}
+
+if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
+ '127.0.0.1',
+ '::1',
+))) {
+ header('HTTP/1.0 403 Forbidden');
+ exit('This script is only accessible from localhost.');
+}
+
+$majorProblems = array();
+$minorProblems = array();
+$phpini = false;
+
+// minimum
+if (!version_compare(phpversion(), '5.3.2', '>=')) {
+ $version = phpversion();
+ $majorProblems[] = <<<EOF
+ You are running PHP version "<strong>$version</strong>", but Symfony
+ needs at least PHP "<strong>5.3.2</strong>" to run. Before using Symfony, install
+ PHP "<strong>5.3.2</strong>" or newer.
+EOF;
+}
+
+if (!is_writable(__DIR__ . '/../app/cache')) {
+ $majorProblems[] = 'Change the permissions of the "<strong>app/cache/</strong>"
+ directory so that the web server can write into it.';
+}
+
+if (!is_writable(__DIR__ . '/../app/logs')) {
+ $majorProblems[] = 'Change the permissions of the "<strong>app/logs/</strong>"
+ directory so that the web server can write into it.';
+}
+
+// extensions
+if (!class_exists('DomDocument')) {
+ $minorProblems[] = 'Install and enable the <strong>php-xml</strong> module.';
+}
+
+if (!((function_exists('apc_store') && ini_get('apc.enabled')) || function_exists('eaccelerator_put') && ini_get('eaccelerator.enable') || function_exists('xcache_set'))) {
+ $minorProblems[] = 'Install and enable a <strong>PHP accelerator</strong> like APC (highly recommended).';
+}
+
+if (!(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='))) {
+ $majorProblems[] = 'Upgrade your <strong>APC</strong> extension (3.0.17+)';
+}
+
+if (!function_exists('token_get_all')) {
+ $minorProblems[] = 'Install and enable the <strong>Tokenizer</strong> extension.';
+}
+
+if (!function_exists('mb_strlen')) {
+ $minorProblems[] = 'Install and enable the <strong>mbstring</strong> extension.';
+}
+
+if (!function_exists('iconv')) {
+ $minorProblems[] = 'Install and enable the <strong>iconv</strong> extension.';
+}
+
+if (!function_exists('utf8_decode')) {
+ $minorProblems[] = 'Install and enable the <strong>XML</strong> extension.';
+}
+
+if (PHP_OS != 'WINNT' && !function_exists('posix_isatty')) {
+ $minorProblems[] = 'Install and enable the <strong>php_posix</strong> extension (used to colorize the CLI output).';
+}
+
+if (!class_exists('Locale')) {
+ $minorProblems[] = 'Install and enable the <strong>intl</strong> extension.';
+} else {
+ $version = '';
+
+ if (defined('INTL_ICU_VERSION')) {
+ $version = INTL_ICU_VERSION;
+ } else {
+ $reflector = new \ReflectionExtension('intl');
+
+ ob_start();
+ $reflector->info();
+ $output = strip_tags(ob_get_clean());
+
+ preg_match('/^ICU version (.*)$/m', $output, $matches);
+ $version = $matches[1];
+ }
+
+ if (!version_compare($version, '4.0', '>=')) {
+ $minorProblems[] = 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).';
+ }
+}
+
+if (!class_exists('SQLite3') && !in_array('sqlite', PDO::getAvailableDrivers())) {
+ $majorProblems[] = 'Install and enable the <strong>SQLite3</strong> or <strong>PDO_SQLite</strong> extension.';
+}
+
+if (!function_exists('json_encode')) {
+ $majorProblems[] = 'Install and enable the <strong>json</strong> extension.';
+}
+
+if (!function_exists('session_start')) {
+ $majorProblems[] = 'Install and enable the <strong>session</strong> extension.';
+}
+
+if (!function_exists('ctype_alpha')) {
+ $majorProblems[] = 'Install and enable the <strong>ctype</strong> extension.';
+}
+
+if (!function_exists('token_get_all')) {
+ $majorProblems[] = 'Install and enable the <strong>Tokenizer</strong> extension.';
+}
+
+// php.ini
+if (!ini_get('date.timezone')) {
+ $phpini = true;
+ $majorProblems[] = 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).';
+}
+
+if (ini_get('short_open_tag')) {
+ $phpini = true;
+ $minorProblems[] = 'Set <strong>short_open_tag</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.';
+}
+
+if (ini_get('magic_quotes_gpc')) {
+ $phpini = true;
+ $minorProblems[] = 'Set <strong>magic_quotes_gpc</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.';
+}
+
+if (ini_get('register_globals')) {
+ $phpini = true;
+ $minorProblems[] = 'Set <strong>register_globals</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.';
+}
+
+if (ini_get('session.auto_start')) {
+ $phpini = true;
+ $minorProblems[] = 'Set <strong>session.auto_start</strong> to <strong>off</strong> in php.ini<a href="#phpini">*</a>.';
+}
+?>
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <link href="bundles/sensiodistribution/webconfigurator/css/install.css" rel="stylesheet" type="text/css" media="all" />
+ <title>Symfony Configuration</title>
+ </head>
+ <body>
+ <div id="symfony-wrapper">
+ <div id="symfony-content">
+ <div class="symfony-blocks-install">
+ <div class="symfony-block-logo">
+ <img src="bundles/sensiodistribution/webconfigurator/images/logo-big.gif" alt="sf_symfony" />
+ </div>
+
+ <div class="symfony-block-content">
+ <h1>Welcome!</h1>
+ <p>Welcome to your new Symfony project.</p>
+ <p>This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘<strong>app/config/parameters.ini</strong>’ file directly.</p>
+
+ <?php if (count($majorProblems)): ?>
+ <h2>
+ <span><?php echo count($majorProblems) ?> Major problems</span>
+ </h2>
+ <p>Major problems have been detected and <strong>must</strong> be fixed before continuing :</p>
+ <ol>
+ <?php foreach ($majorProblems as $problem): ?>
+ <li><?php echo $problem; ?></li>
+ <?php endforeach ?>
+ </ol>
+ <?php endif ?>
+
+ <?php if (count($minorProblems)): ?>
+ <h2>Recommendations</h2>
+ <p>
+ <?php if ($majorProblems): ?>
+ Additionally, to
+ <?php else: ?>
+ To<?php endif; ?>
+ enhance your Symfony experience, it’s recommended that you fix the following :
+ </p>
+ <ol>
+ <?php foreach ($minorProblems as $problem): ?>
+ <li><?php echo $problem; ?></li>
+ <?php endforeach; ?>
+ </ol>
+ <?php endif ?>
+
+ <?php if ($phpini): ?>
+ <a id="phpini"></a>
+ <p>*
+ <?php if (get_cfg_var('cfg_file_path')): ?>
+ Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo get_cfg_var('cfg_file_path') ?></strong>".
+ <?php else: ?>
+ To change settings, create a "<strong>php.ini</strong>".
+ <?php endif; ?>
+ </p>
+ </div>
+ <?php endif; ?>
+
+ <ul class="symfony-install-continue">
+ <?php if (!count($majorProblems)): ?>
+ <li><a href="app_dev.php/_configurator/">Configure your Symfony Application online</a></li>
+ <li><a href="app_dev.php/">Bypass configuration and go to the Welcome page</a></li>
+ <?php endif ?>
+ <li><a href="config.php">Re-check configuration</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="version">Symfony Standard Edition</div>
+ </body>
+</html>
BIN  web/favicon.ico
View
Binary file not shown
4 web/robots.txt
View
@@ -0,0 +1,4 @@
+# www.robotstxt.org/
+# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
+
+User-agent: *
Please sign in to comment.
Something went wrong with that request. Please try again.