commit e2649bbfb65241d7ca7ab44639804ab7d2d2f905 Author: Polonkai Gergely Date: Fri Apr 13 19:16:29 2012 +0000 Initial commit Empty Symfony install with no vendors and the Acme Bundle deleted Signed-off-by: Gergely POLONKAI (W00d5t0ck) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cdffe7a --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2012 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..864d170 --- /dev/null +++ b/README.md @@ -0,0 +1,147 @@ +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! diff --git a/app/.htaccess b/app/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/app/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/app/AppCache.php b/app/AppCache.php new file mode 100644 index 0000000..ddb51db --- /dev/null +++ b/app/AppCache.php @@ -0,0 +1,9 @@ +getEnvironment(), array('dev', 'test'))) { + $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'); + } +} diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig new file mode 100644 index 0000000..4b9151e --- /dev/null +++ b/app/Resources/views/base.html.twig @@ -0,0 +1,13 @@ + + + + + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} + + + + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + + diff --git a/app/autoload.php b/app/autoload.php new file mode 100644 index 0000000..64ba187 --- /dev/null +++ b/app/autoload.php @@ -0,0 +1,45 @@ +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'); + diff --git a/app/bootstrap.php.cache b/app/bootstrap.php.cache new file mode 100644 index 0000000..0a056b1 --- /dev/null +++ b/app/bootstrap.php.cache @@ -0,0 +1,1497 @@ +parameterBag = null === $parameterBag ? new ParameterBag() : $parameterBag; + + $this->services = array(); + $this->scopes = array(); + $this->scopeChildren = array(); + $this->scopedServices = array(); + $this->scopeStacks = array(); + + $this->set('service_container', $this); + } + + + public function compile() + { + $this->parameterBag->resolve(); + + $this->parameterBag = new FrozenParameterBag($this->parameterBag->all()); + } + + + public function isFrozen() + { + return $this->parameterBag instanceof FrozenParameterBag; + } + + + public function getParameterBag() + { + return $this->parameterBag; + } + + + public function getParameter($name) + { + return $this->parameterBag->get($name); + } + + + public function hasParameter($name) + { + return $this->parameterBag->has($name); + } + + + public function setParameter($name, $value) + { + $this->parameterBag->set($name, $value); + } + + + public function set($id, $service, $scope = self::SCOPE_CONTAINER) + { + if (self::SCOPE_PROTOTYPE === $scope) { + throw new \InvalidArgumentException('You cannot set services of scope "prototype".'); + } + + $id = strtolower($id); + + if (self::SCOPE_CONTAINER !== $scope) { + if (!isset($this->scopedServices[$scope])) { + throw new \RuntimeException('You cannot set services of inactive scopes.'); + } + + $this->scopedServices[$scope][$id] = $service; + } + + $this->services[$id] = $service; + } + + + public function has($id) + { + $id = strtolower($id); + + return isset($this->services[$id]) || method_exists($this, 'get'.strtr($id, array('_' => '', '.' => '_')).'Service'); + } + + + public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE) + { + $id = strtolower($id); + + if (isset($this->services[$id])) { + return $this->services[$id]; + } + + if (isset($this->loading[$id])) { + throw new ServiceCircularReferenceException($id, array_keys($this->loading)); + } + + if (method_exists($this, $method = 'get'.strtr($id, array('_' => '', '.' => '_')).'Service')) { + $this->loading[$id] = true; + + try { + $service = $this->$method(); + } catch (\Exception $e) { + unset($this->loading[$id]); + throw $e; + } + + unset($this->loading[$id]); + + return $service; + } + + if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) { + throw new ServiceNotFoundException($id); + } + } + + + public function getServiceIds() + { + $ids = array(); + $r = new \ReflectionClass($this); + foreach ($r->getMethods() as $method) { + if (preg_match('/^get(.+)Service$/', $method->getName(), $match)) { + $ids[] = self::underscore($match[1]); + } + } + + return array_unique(array_merge($ids, array_keys($this->services))); + } + + + public function enterScope($name) + { + if (!isset($this->scopes[$name])) { + throw new \InvalidArgumentException(sprintf('The scope "%s" does not exist.', $name)); + } + + if (self::SCOPE_CONTAINER !== $this->scopes[$name] && !isset($this->scopedServices[$this->scopes[$name]])) { + throw new \RuntimeException(sprintf('The parent scope "%s" must be active when entering this scope.', $this->scopes[$name])); + } + + if (isset($this->scopedServices[$name])) { + $services = array($this->services, $name => $this->scopedServices[$name]); + unset($this->scopedServices[$name]); + + foreach ($this->scopeChildren[$name] as $child) { + $services[$child] = $this->scopedServices[$child]; + unset($this->scopedServices[$child]); + } + + $this->services = call_user_func_array('array_diff_key', $services); + array_shift($services); + + if (!isset($this->scopeStacks[$name])) { + $this->scopeStacks[$name] = new \SplStack(); + } + $this->scopeStacks[$name]->push($services); + } + + $this->scopedServices[$name] = array(); + } + + + public function leaveScope($name) + { + if (!isset($this->scopedServices[$name])) { + throw new \InvalidArgumentException(sprintf('The scope "%s" is not active.', $name)); + } + + $services = array($this->services, $this->scopedServices[$name]); + unset($this->scopedServices[$name]); + foreach ($this->scopeChildren[$name] as $child) { + if (!isset($this->scopedServices[$child])) { + continue; + } + + $services[] = $this->scopedServices[$child]; + unset($this->scopedServices[$child]); + } + $this->services = call_user_func_array('array_diff_key', $services); + + if (isset($this->scopeStacks[$name]) && count($this->scopeStacks[$name]) > 0) { + $services = $this->scopeStacks[$name]->pop(); + $this->scopedServices += $services; + + array_unshift($services, $this->services); + $this->services = call_user_func_array('array_merge', $services); + } + } + + + public function addScope(ScopeInterface $scope) + { + $name = $scope->getName(); + $parentScope = $scope->getParentName(); + + if (self::SCOPE_CONTAINER === $name || self::SCOPE_PROTOTYPE === $name) { + throw new \InvalidArgumentException(sprintf('The scope "%s" is reserved.', $name)); + } + if (isset($this->scopes[$name])) { + throw new \InvalidArgumentException(sprintf('A scope with name "%s" already exists.', $name)); + } + if (self::SCOPE_CONTAINER !== $parentScope && !isset($this->scopes[$parentScope])) { + throw new \InvalidArgumentException(sprintf('The parent scope "%s" does not exist, or is invalid.', $parentScope)); + } + + $this->scopes[$name] = $parentScope; + $this->scopeChildren[$name] = array(); + + while ($parentScope !== self::SCOPE_CONTAINER) { + $this->scopeChildren[$parentScope][] = $name; + $parentScope = $this->scopes[$parentScope]; + } + } + + + public function hasScope($name) + { + return isset($this->scopes[$name]); + } + + + public function isScopeActive($name) + { + return isset($this->scopedServices[$name]); + } + + + static public function camelize($id) + { + return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $id); + } + + + static public function underscore($id) + { + return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.'))); + } +} +} + + + + +namespace Symfony\Component\HttpKernel +{ + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + + +interface HttpKernelInterface +{ + const MASTER_REQUEST = 1; + const SUB_REQUEST = 2; + + + function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true); +} +} + + + + +namespace Symfony\Component\HttpKernel +{ + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\Config\Loader\LoaderInterface; + + +interface KernelInterface extends HttpKernelInterface, \Serializable +{ + + function registerBundles(); + + + function registerContainerConfiguration(LoaderInterface $loader); + + + function boot(); + + + function shutdown(); + + + function getBundles(); + + + function isClassInActiveBundle($class); + + + function getBundle($name, $first = true); + + + function locateResource($name, $dir = null, $first = true); + + + function getName(); + + + function getEnvironment(); + + + function isDebug(); + + + function getRootDir(); + + + function getContainer(); + + + function getStartTime(); + + + function getCacheDir(); + + + function getLogDir(); +} +} + + + + +namespace Symfony\Component\HttpKernel +{ + +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Dumper\PhpDumper; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; +use Symfony\Component\DependencyInjection\Loader\IniFileLoader; +use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use Symfony\Component\DependencyInjection\Loader\ClosureLoader; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Bundle\BundleInterface; +use Symfony\Component\HttpKernel\Config\FileLocator; +use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass; +use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass; +use Symfony\Component\HttpKernel\DependencyInjection\Extension as DIExtension; +use Symfony\Component\HttpKernel\Debug\ErrorHandler; +use Symfony\Component\HttpKernel\Debug\ExceptionHandler; +use Symfony\Component\Config\Loader\LoaderResolver; +use Symfony\Component\Config\Loader\DelegatingLoader; +use Symfony\Component\Config\ConfigCache; +use Symfony\Component\ClassLoader\ClassCollectionLoader; +use Symfony\Component\ClassLoader\DebugUniversalClassLoader; + + +abstract class Kernel implements KernelInterface +{ + protected $bundles; + protected $bundleMap; + protected $container; + protected $rootDir; + protected $environment; + protected $debug; + protected $booted; + protected $name; + protected $startTime; + protected $classes; + + const VERSION = '2.0.12'; + + + public function __construct($environment, $debug) + { + $this->environment = $environment; + $this->debug = (Boolean) $debug; + $this->booted = false; + $this->rootDir = $this->getRootDir(); + $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir)); + $this->classes = array(); + + if ($this->debug) { + $this->startTime = microtime(true); + } + + $this->init(); + } + + public function init() + { + if ($this->debug) { + ini_set('display_errors', 1); + error_reporting(-1); + + DebugUniversalClassLoader::enable(); + ErrorHandler::register(); + if ('cli' !== php_sapi_name()) { + ExceptionHandler::register(); + } + } else { + ini_set('display_errors', 0); + } + } + + public function __clone() + { + if ($this->debug) { + $this->startTime = microtime(true); + } + + $this->booted = false; + $this->container = null; + } + + + public function boot() + { + if (true === $this->booted) { + return; + } + + $this->initializeBundles(); + + $this->initializeContainer(); + + foreach ($this->getBundles() as $bundle) { + $bundle->setContainer($this->container); + $bundle->boot(); + } + + $this->booted = true; + } + + + public function shutdown() + { + if (false === $this->booted) { + return; + } + + $this->booted = false; + + foreach ($this->getBundles() as $bundle) { + $bundle->shutdown(); + $bundle->setContainer(null); + } + + $this->container = null; + } + + + public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) + { + if (false === $this->booted) { + $this->boot(); + } + + return $this->getHttpKernel()->handle($request, $type, $catch); + } + + + protected function getHttpKernel() + { + return $this->container->get('http_kernel'); + } + + + public function getBundles() + { + return $this->bundles; + } + + + public function isClassInActiveBundle($class) + { + foreach ($this->getBundles() as $bundle) { + if (0 === strpos($class, $bundle->getNamespace())) { + return true; + } + } + + return false; + } + + + public function getBundle($name, $first = true) + { + if (!isset($this->bundleMap[$name])) { + throw new \InvalidArgumentException(sprintf('Bundle "%s" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your %s.php file?', $name, get_class($this))); + } + + if (true === $first) { + return $this->bundleMap[$name][0]; + } + + return $this->bundleMap[$name]; + } + + + public function locateResource($name, $dir = null, $first = true) + { + if ('@' !== $name[0]) { + throw new \InvalidArgumentException(sprintf('A resource name must start with @ ("%s" given).', $name)); + } + + if (false !== strpos($name, '..')) { + throw new \RuntimeException(sprintf('File name "%s" contains invalid characters (..).', $name)); + } + + $bundleName = substr($name, 1); + $path = ''; + if (false !== strpos($bundleName, '/')) { + list($bundleName, $path) = explode('/', $bundleName, 2); + } + + $isResource = 0 === strpos($path, 'Resources') && null !== $dir; + $overridePath = substr($path, 9); + $resourceBundle = null; + $bundles = $this->getBundle($bundleName, false); + $files = array(); + + foreach ($bundles as $bundle) { + if ($isResource && file_exists($file = $dir.'/'.$bundle->getName().$overridePath)) { + if (null !== $resourceBundle) { + throw new \RuntimeException(sprintf('"%s" resource is hidden by a resource from the "%s" derived bundle. Create a "%s" file to override the bundle resource.', + $file, + $resourceBundle, + $dir.'/'.$bundles[0]->getName().$overridePath + )); + } + + if ($first) { + return $file; + } + $files[] = $file; + } + + if (file_exists($file = $bundle->getPath().'/'.$path)) { + if ($first && !$isResource) { + return $file; + } + $files[] = $file; + $resourceBundle = $bundle->getName(); + } + } + + if (count($files) > 0) { + return $first && $isResource ? $files[0] : $files; + } + + throw new \InvalidArgumentException(sprintf('Unable to find file "%s".', $name)); + } + + + public function getName() + { + return $this->name; + } + + + public function getEnvironment() + { + return $this->environment; + } + + + public function isDebug() + { + return $this->debug; + } + + + public function getRootDir() + { + if (null === $this->rootDir) { + $r = new \ReflectionObject($this); + $this->rootDir = dirname($r->getFileName()); + } + + return $this->rootDir; + } + + + public function getContainer() + { + return $this->container; + } + + + public function loadClassCache($name = 'classes', $extension = '.php') + { + if (!$this->booted && file_exists($this->getCacheDir().'/classes.map')) { + ClassCollectionLoader::load(include($this->getCacheDir().'/classes.map'), $this->getCacheDir(), $name, $this->debug, false, $extension); + } + } + + + public function setClassCache(array $classes) + { + file_put_contents($this->getCacheDir().'/classes.map', sprintf('debug ? $this->startTime : -INF; + } + + + public function getCacheDir() + { + return $this->rootDir.'/cache/'.$this->environment; + } + + + public function getLogDir() + { + return $this->rootDir.'/logs'; + } + + + protected function initializeBundles() + { + $this->bundles = array(); + $topMostBundles = array(); + $directChildren = array(); + + foreach ($this->registerBundles() as $bundle) { + $name = $bundle->getName(); + if (isset($this->bundles[$name])) { + throw new \LogicException(sprintf('Trying to register two bundles with the same name "%s"', $name)); + } + $this->bundles[$name] = $bundle; + + if ($parentName = $bundle->getParent()) { + if (isset($directChildren[$parentName])) { + throw new \LogicException(sprintf('Bundle "%s" is directly extended by two bundles "%s" and "%s".', $parentName, $name, $directChildren[$parentName])); + } + if ($parentName == $name) { + throw new \LogicException(sprintf('Bundle "%s" can not extend itself.', $name)); + } + $directChildren[$parentName] = $name; + } else { + $topMostBundles[$name] = $bundle; + } + } + + if (count($diff = array_values(array_diff(array_keys($directChildren), array_keys($this->bundles))))) { + throw new \LogicException(sprintf('Bundle "%s" extends bundle "%s", which is not registered.', $directChildren[$diff[0]], $diff[0])); + } + + $this->bundleMap = array(); + foreach ($topMostBundles as $name => $bundle) { + $bundleMap = array($bundle); + $hierarchy = array($name); + + while (isset($directChildren[$name])) { + $name = $directChildren[$name]; + array_unshift($bundleMap, $this->bundles[$name]); + $hierarchy[] = $name; + } + + foreach ($hierarchy as $bundle) { + $this->bundleMap[$bundle] = $bundleMap; + array_pop($bundleMap); + } + } + + } + + + protected function getContainerClass() + { + return $this->name.ucfirst($this->environment).($this->debug ? 'Debug' : '').'ProjectContainer'; + } + + + protected function getContainerBaseClass() + { + return 'Container'; + } + + + protected function initializeContainer() + { + $class = $this->getContainerClass(); + $cache = new ConfigCache($this->getCacheDir().'/'.$class.'.php', $this->debug); + $fresh = true; + if (!$cache->isFresh()) { + $container = $this->buildContainer(); + $this->dumpContainer($cache, $container, $class, $this->getContainerBaseClass()); + + $fresh = false; + } + + require_once $cache; + + $this->container = new $class(); + $this->container->set('kernel', $this); + + if (!$fresh && $this->container->has('cache_warmer')) { + $this->container->get('cache_warmer')->warmUp($this->container->getParameter('kernel.cache_dir')); + } + } + + + protected function getKernelParameters() + { + $bundles = array(); + foreach ($this->bundles as $name => $bundle) { + $bundles[$name] = get_class($bundle); + } + + return array_merge( + array( + 'kernel.root_dir' => $this->rootDir, + 'kernel.environment' => $this->environment, + 'kernel.debug' => $this->debug, + 'kernel.name' => $this->name, + 'kernel.cache_dir' => $this->getCacheDir(), + 'kernel.logs_dir' => $this->getLogDir(), + 'kernel.bundles' => $bundles, + 'kernel.charset' => 'UTF-8', + 'kernel.container_class' => $this->getContainerClass(), + ), + $this->getEnvParameters() + ); + } + + + protected function getEnvParameters() + { + $parameters = array(); + foreach ($_SERVER as $key => $value) { + if (0 === strpos($key, 'SYMFONY__')) { + $parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value; + } + } + + return $parameters; + } + + + protected function buildContainer() + { + foreach (array('cache' => $this->getCacheDir(), 'logs' => $this->getLogDir()) as $name => $dir) { + if (!is_dir($dir)) { + if (false === @mkdir($dir, 0777, true)) { + throw new \RuntimeException(sprintf("Unable to create the %s directory (%s)\n", $name, $dir)); + } + } elseif (!is_writable($dir)) { + throw new \RuntimeException(sprintf("Unable to write in the %s directory (%s)\n", $name, $dir)); + } + } + + $container = new ContainerBuilder(new ParameterBag($this->getKernelParameters())); + $extensions = array(); + foreach ($this->bundles as $bundle) { + $bundle->build($container); + + if ($extension = $bundle->getContainerExtension()) { + $container->registerExtension($extension); + $extensions[] = $extension->getAlias(); + } + + if ($this->debug) { + $container->addObjectResource($bundle); + } + } + $container->addObjectResource($this); + + $container->getCompilerPassConfig()->setMergePass(new MergeExtensionConfigurationPass($extensions)); + + if (null !== $cont = $this->registerContainerConfiguration($this->getContainerLoader($container))) { + $container->merge($cont); + } + + $container->addCompilerPass(new AddClassesToCachePass($this)); + $container->compile(); + + return $container; + } + + + protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) + { + $dumper = new PhpDumper($container); + $content = $dumper->dump(array('class' => $class, 'base_class' => $baseClass)); + if (!$this->debug) { + $content = self::stripComments($content); + } + + $cache->write($content, $container->getResources()); + } + + + protected function getContainerLoader(ContainerInterface $container) + { + $locator = new FileLocator($this); + $resolver = new LoaderResolver(array( + new XmlFileLoader($container, $locator), + new YamlFileLoader($container, $locator), + new IniFileLoader($container, $locator), + new PhpFileLoader($container, $locator), + new ClosureLoader($container), + )); + + return new DelegatingLoader($resolver); + } + + + static public function stripComments($source) + { + if (!function_exists('token_get_all')) { + return $source; + } + + $output = ''; + foreach (token_get_all($source) as $token) { + if (is_string($token)) { + $output .= $token; + } elseif (!in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { + $output .= $token[1]; + } + } + + $output = preg_replace(array('/\s+$/Sm', '/\n+/S'), "\n", $output); + + return $output; + } + + public function serialize() + { + return serialize(array($this->environment, $this->debug)); + } + + public function unserialize($data) + { + list($environment, $debug) = unserialize($data); + + $this->__construct($environment, $debug); + } +} +} + + + + +namespace Symfony\Component\ClassLoader +{ + + +class ClassCollectionLoader +{ + static private $loaded; + + + static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php') + { + if (isset(self::$loaded[$name])) { + return; + } + + self::$loaded[$name] = true; + + if ($adaptive) { + $classes = array_diff($classes, get_declared_classes(), get_declared_interfaces()); + + $name = $name.'-'.substr(md5(implode('|', $classes)), 0, 5); + } + + $cache = $cacheDir.'/'.$name.$extension; + + $reload = false; + if ($autoReload) { + $metadata = $cacheDir.'/'.$name.$extension.'.meta'; + if (!file_exists($metadata) || !file_exists($cache)) { + $reload = true; + } else { + $time = filemtime($cache); + $meta = unserialize(file_get_contents($metadata)); + + if ($meta[1] != $classes) { + $reload = true; + } else { + foreach ($meta[0] as $resource) { + if (!file_exists($resource) || filemtime($resource) > $time) { + $reload = true; + + break; + } + } + } + } + } + + if (!$reload && file_exists($cache)) { + require_once $cache; + + return; + } + + $files = array(); + $content = ''; + foreach ($classes as $class) { + if (!class_exists($class) && !interface_exists($class) && (!function_exists('trait_exists') || !trait_exists($class))) { + throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class)); + } + + $r = new \ReflectionClass($class); + $files[] = $r->getFileName(); + + $c = preg_replace(array('/^\s*<\?php/', '/\?>\s*$/'), '', file_get_contents($r->getFileName())); + + if (!$r->inNamespace()) { + $c = "\nnamespace\n{\n".self::stripComments($c)."\n}\n"; + } else { + $c = self::fixNamespaceDeclarations('namespaces; + } + + + public function getPrefixes() + { + return $this->prefixes; + } + + + public function getNamespaceFallbacks() + { + return $this->namespaceFallbacks; + } + + + public function getPrefixFallbacks() + { + return $this->prefixFallbacks; + } + + + public function registerNamespaceFallbacks(array $dirs) + { + $this->namespaceFallbacks = $dirs; + } + + + public function registerPrefixFallbacks(array $dirs) + { + $this->prefixFallbacks = $dirs; + } + + + public function registerNamespaces(array $namespaces) + { + foreach ($namespaces as $namespace => $locations) { + $this->namespaces[$namespace] = (array) $locations; + } + } + + + public function registerNamespace($namespace, $paths) + { + $this->namespaces[$namespace] = (array) $paths; + } + + + public function registerPrefixes(array $classes) + { + foreach ($classes as $prefix => $locations) { + $this->prefixes[$prefix] = (array) $locations; + } + } + + + public function registerPrefix($prefix, $paths) + { + $this->prefixes[$prefix] = (array) $paths; + } + + + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + require $file; + } + } + + + public function findFile($class) + { + if ('\\' == $class[0]) { + $class = substr($class, 1); + } + + if (false !== $pos = strrpos($class, '\\')) { + $namespace = substr($class, 0, $pos); + foreach ($this->namespaces as $ns => $dirs) { + if (0 !== strpos($namespace, $ns)) { + continue; + } + + foreach ($dirs as $dir) { + $className = substr($class, $pos + 1); + $file = $dir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $className).'.php'; + if (file_exists($file)) { + return $file; + } + } + } + + foreach ($this->namespaceFallbacks as $dir) { + $file = $dir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; + if (file_exists($file)) { + return $file; + } + } + } else { + foreach ($this->prefixes as $prefix => $dirs) { + if (0 !== strpos($class, $prefix)) { + continue; + } + + foreach ($dirs as $dir) { + $file = $dir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; + if (file_exists($file)) { + return $file; + } + } + } + + foreach ($this->prefixFallbacks as $dir) { + $file = $dir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $class).'.php'; + if (file_exists($file)) { + return $file; + } + } + } + } +} +} + + + + +namespace Symfony\Component\HttpKernel\Bundle +{ + +use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\Console\Application; +use Symfony\Component\Finder\Finder; + + +abstract class Bundle extends ContainerAware implements BundleInterface +{ + protected $name; + protected $reflected; + protected $extension; + + + public function boot() + { + } + + + public function shutdown() + { + } + + + public function build(ContainerBuilder $container) + { + } + + + public function getContainerExtension() + { + if (null === $this->extension) { + $basename = preg_replace('/Bundle$/', '', $this->getName()); + + $class = $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; + if (class_exists($class)) { + $extension = new $class(); + + $expectedAlias = Container::underscore($basename); + if ($expectedAlias != $extension->getAlias()) { + throw new \LogicException(sprintf( + 'The extension alias for the default extension of a '. + 'bundle must be the underscored version of the '. + 'bundle name ("%s" instead of "%s")', + $expectedAlias, $extension->getAlias() + )); + } + + $this->extension = $extension; + } else { + $this->extension = false; + } + } + + if ($this->extension) { + return $this->extension; + } + } + + + public function getNamespace() + { + if (null === $this->reflected) { + $this->reflected = new \ReflectionObject($this); + } + + return $this->reflected->getNamespaceName(); + } + + + public function getPath() + { + if (null === $this->reflected) { + $this->reflected = new \ReflectionObject($this); + } + + return dirname($this->reflected->getFileName()); + } + + + public function getParent() + { + return null; + } + + + final public function getName() + { + if (null !== $this->name) { + return $this->name; + } + + $name = get_class($this); + $pos = strrpos($name, '\\'); + + return $this->name = false === $pos ? $name : substr($name, $pos + 1); + } + + + public function registerCommands(Application $application) + { + if (!$dir = realpath($this->getPath().'/Command')) { + return; + } + + $finder = new Finder(); + $finder->files()->name('*Command.php')->in($dir); + + $prefix = $this->getNamespace().'\\Command'; + foreach ($finder as $file) { + $ns = $prefix; + if ($relativePath = $file->getRelativePath()) { + $ns .= '\\'.strtr($relativePath, '/', '\\'); + } + $r = new \ReflectionClass($ns.'\\'.$file->getBasename('.php')); + if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) { + $application->add($r->newInstance()); + } + } + } +} +} + + + + +namespace Symfony\Component\HttpKernel\Bundle +{ + +use Symfony\Component\DependencyInjection\ContainerBuilder; + + +interface BundleInterface +{ + + function boot(); + + + function shutdown(); + + + function build(ContainerBuilder $container); + + + function getContainerExtension(); + + + function getParent(); + + + function getName(); + + + function getNamespace(); + + + function getPath(); +} +} + + + + +namespace Symfony\Component\Config +{ + + +class ConfigCache +{ + private $debug; + private $file; + + + public function __construct($file, $debug) + { + $this->file = $file; + $this->debug = (Boolean) $debug; + } + + + public function __toString() + { + return $this->file; + } + + + public function isFresh() + { + if (!file_exists($this->file)) { + return false; + } + + if (!$this->debug) { + return true; + } + + $metadata = $this->file.'.meta'; + if (!file_exists($metadata)) { + return false; + } + + $time = filemtime($this->file); + $meta = unserialize(file_get_contents($metadata)); + foreach ($meta as $resource) { + if (!$resource->isFresh($time)) { + return false; + } + } + + return true; + } + + + public function write($content, array $metadata = null) + { + $dir = dirname($this->file); + if (!is_dir($dir)) { + if (false === @mkdir($dir, 0777, true)) { + throw new \RuntimeException(sprintf('Unable to create the %s directory', $dir)); + } + } elseif (!is_writable($dir)) { + throw new \RuntimeException(sprintf('Unable to write in the %s directory', $dir)); + } + + $tmpFile = tempnam(dirname($this->file), basename($this->file)); + if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $this->file)) { + chmod($this->file, 0666); + } else { + throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $this->file)); + } + + if (null !== $metadata && true === $this->debug) { + $file = $this->file.'.meta'; + $tmpFile = tempnam(dirname($file), basename($file)); + if (false !== @file_put_contents($tmpFile, serialize($metadata)) && @rename($tmpFile, $file)) { + chmod($file, 0666); + } + } + } +} +} diff --git a/app/check.php b/app/check.php new file mode 100644 index 0000000..9481c07 --- /dev/null +++ b/app/check.php @@ -0,0 +1,108 @@ +='), 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"; +} diff --git a/app/config/config.yml b/app/config/config.yml new file mode 100644 index 0000000..b6da31e --- /dev/null +++ b/app/config/config.yml @@ -0,0 +1,60 @@ +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 + # java: /usr/bin/java + 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 diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml new file mode 100644 index 0000000..671f52f --- /dev/null +++ b/app/config/config_dev.yml @@ -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 diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml new file mode 100644 index 0000000..0b91d4d --- /dev/null +++ b/app/config/config_prod.yml @@ -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 diff --git a/app/config/config_test.yml b/app/config/config_test.yml new file mode 100644 index 0000000..7dba2fb --- /dev/null +++ b/app/config/config_test.yml @@ -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 diff --git a/app/config/parameters.ini b/app/config/parameters.ini new file mode 100644 index 0000000..3628066 --- /dev/null +++ b/app/config/parameters.ini @@ -0,0 +1,19 @@ +; These parameters can be imported into other config files +; by enclosing the key with % (like %database_user%) +; Comments start with ';', as in php.ini +[parameters] + database_driver = pdo_mysql + database_host = localhost + database_port = + database_name = symfony + database_user = root + database_password = + + mailer_transport = smtp + mailer_host = localhost + mailer_user = + mailer_password = + + locale = en + + secret = ThisTokenIsNotSoSecretChangeIt diff --git a/app/config/routing.yml b/app/config/routing.yml new file mode 100644 index 0000000..8b4740a --- /dev/null +++ b/app/config/routing.yml @@ -0,0 +1,4 @@ +# Internal routing configuration to handle ESI +#_internal: +# resource: "@FrameworkBundle/Resources/config/routing/internal.xml" +# prefix: /_internal diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml new file mode 100644 index 0000000..27bc683 --- /dev/null +++ b/app/config/routing_dev.yml @@ -0,0 +1,18 @@ +_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 diff --git a/app/config/security.yml b/app/config/security.yml new file mode 100644 index 0000000..586d1d0 --- /dev/null +++ b/app/config/security.yml @@ -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 } diff --git a/app/console b/app/console new file mode 100755 index 0000000..468cc84 --- /dev/null +++ b/app/console @@ -0,0 +1,22 @@ +#!/usr/bin/env php +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(); diff --git a/app/logs/.gitkeep b/app/logs/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/app/phpunit.xml.dist b/app/phpunit.xml.dist new file mode 100644 index 0000000..1e31086 --- /dev/null +++ b/app/phpunit.xml.dist @@ -0,0 +1,41 @@ + + + + + + + + ../src/*/*Bundle/Tests + ../src/*/Bundle/*Bundle/Tests + + + + + + + + ../src + + ../src/*/*Bundle/Resources + ../src/*/*Bundle/Tests + ../src/*/Bundle/*Bundle/Resources + ../src/*/Bundle/*Bundle/Tests + + + + + diff --git a/bin/.htaccess b/bin/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/bin/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/bin/vendors b/bin/vendors new file mode 100755 index 0000000..0e4fb85 --- /dev/null +++ b/bin/vendors @@ -0,0 +1,154 @@ +#!/usr/bin/env php + + * + * 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(<< $dep) { + $dep = array_map('trim', $dep); + + // install dir + $installDir = isset($dep['target']) ? $vendorDir.'/'.$dep['target'] : $vendorDir.'/'.$name; + if (in_array('--reinstall', $argv) && realpath($installDir)) { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir)))); + } else { + system(sprintf('rm -rf %s', escapeshellarg($installDir))); + } + } + + if ('install' === $command || 'update' === $command) { + echo '> Installing/Updating '.$name.PHP_EOL; + + // url + if (!isset($dep['git'])) { + exit(sprintf('The "git" value for the "%s" dependency must be set.', $name).PHP_EOL); + } + $url = $dep['git']; + + if (!is_dir($installDir)) { + system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir))); + } + + // revision + if (isset($versions[$name])) { + $rev = $versions[$name]; + } else { + $rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD'; + } + + $status = system(sprintf('cd %s && git status --porcelain', escapeshellarg($installDir))); + if (!empty($status)) { + exit(sprintf('"%s" has local modifications. Please revert or commit/push them before running this command again.', $name).PHP_EOL); + } + $current_rev = system(sprintf('cd %s && git rev-list --max-count=1 HEAD', escapeshellarg($installDir))); + if ($current_rev === $rev) { + continue; + } + + system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev))); + } + + if ('update' === $command || 'lock' === $command) { + ob_start(); + system(sprintf('cd %s && git log -n 1 --format=%%H', escapeshellarg($installDir))); + $newversion = trim(ob_get_clean()); + + ob_start(); + system(sprintf('cd %s && git name-rev --tags --name-only %s', escapeshellarg($installDir), $newversion)); + // remove trailing ^0 from tags, those are the tags themselves + $niceversion = preg_replace('/\^0$/', '', trim(ob_get_clean())); + + // undefined is returned in case no name-rev could be found + if ('undefined' !== $niceversion) { + $newversions[] = $name.' '.$niceversion; + } else { + $newversions[] = $name.' '.$newversion; + } + } +} + +// update? +if ('update' === $command || 'lock' === $command) { + echo '> Updating deps.lock'.PHP_EOL; + + file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions)."\n"); +} + +// php on windows can't use the shebang line from system() +$interpreter = defined('PHP_WINDOWS_VERSION_BUILD') ? 'php.exe' : ''; + +// Update the bootstrap files +system(sprintf('%s %s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'), escapeshellarg($rootDir))); + +// 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'))); diff --git a/deps b/deps new file mode 100644 index 0000000..1ff5139 --- /dev/null +++ b/deps @@ -0,0 +1,63 @@ +[symfony] + git=http://github.com/symfony/symfony.git + version=v2.0.12 + +[twig] + git=http://github.com/fabpot/Twig.git + version=v1.6.2 + +[monolog] + git=http://github.com/Seldaek/monolog.git + version=1.0.2 + +[doctrine-common] + git=http://github.com/doctrine/common.git + version=2.1.4 + +[doctrine-dbal] + git=http://github.com/doctrine/dbal.git + version=2.1.6 + +[doctrine] + git=http://github.com/doctrine/doctrine2.git + version=2.1.6 + +[swiftmailer] + git=http://github.com/swiftmailer/swiftmailer.git + version=v4.1.5 + +[assetic] + git=http://github.com/kriswallsmith/assetic.git + version=v1.0.3 + +[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 + version=origin/2.0 + +[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/2.0 + +[SensioGeneratorBundle] + git=http://github.com/sensio/SensioGeneratorBundle.git + target=/bundles/Sensio/Bundle/GeneratorBundle + version=origin/2.0 + +[AsseticBundle] + git=http://github.com/symfony/AsseticBundle.git + target=/bundles/Symfony/Bundle/AsseticBundle + version=v1.0.1 diff --git a/deps.lock b/deps.lock new file mode 100644 index 0000000..2a464b7 --- /dev/null +++ b/deps.lock @@ -0,0 +1,15 @@ +symfony v2.0.12 +twig v1.6.2 +monolog 1.0.2 +doctrine-common 2.1.4 +doctrine-dbal 2.1.6 +doctrine 2.1.6 +swiftmailer v4.1.5 +assetic v1.0.3 +twig-extensions 1dfff8e793f50f651c4f74f796c2c68a4aee3147 +metadata 1.0.0 +SensioFrameworkExtraBundle 638f545b7020b9e9d5944a7e3167f60ed848250d +JMSSecurityExtraBundle 541a4c242328dc04b99540c75346cc74a7c0cfb5 +SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf +SensioGeneratorBundle b1ccb78c1743f30817b0fce9bb5c6baff6ed7bf8 +AsseticBundle v1.0.1 diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/src/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/web/.htaccess b/web/.htaccess new file mode 100644 index 0000000..0355c20 --- /dev/null +++ b/web/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ app.php [QSA,L] + diff --git a/web/app.php b/web/app.php new file mode 100644 index 0000000..5a9e02d --- /dev/null +++ b/web/app.php @@ -0,0 +1,12 @@ +loadClassCache(); +//$kernel = new AppCache($kernel); +$kernel->handle(Request::createFromGlobals())->send(); diff --git a/web/app_dev.php b/web/app_dev.php new file mode 100644 index 0000000..00d78ac --- /dev/null +++ b/web/app_dev.php @@ -0,0 +1,24 @@ +loadClassCache(); +$kernel->handle(Request::createFromGlobals())->send(); diff --git a/web/apple-touch-icon.png b/web/apple-touch-icon.png new file mode 100644 index 0000000..11f17e6 Binary files /dev/null and b/web/apple-touch-icon.png differ diff --git a/web/bundles/framework/css/exception.css b/web/bundles/framework/css/exception.css new file mode 100644 index 0000000..0d31027 --- /dev/null +++ b/web/bundles/framework/css/exception.css @@ -0,0 +1,226 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.1.2 +build: 56 +*/ +.sf-exceptionreset html{color:#000;background:#FFF;}.sf-exceptionreset body,.sf-exceptionreset div,.sf-exceptionreset dl,.sf-exceptionreset dt,.sf-exceptionreset dd,.sf-exceptionreset ul,.sf-exceptionreset ol,.sf-exceptionreset li,.sf-exceptionreset h1,.sf-exceptionreset h2,.sf-exceptionreset h3,.sf-exceptionreset h4,.sf-exceptionreset h5,.sf-exceptionreset h6,.sf-exceptionreset pre,.sf-exceptionreset code,.sf-exceptionreset form,.sf-exceptionreset fieldset,.sf-exceptionreset legend,.sf-exceptionreset input,.sf-exceptionreset textarea,.sf-exceptionreset p,.sf-exceptionreset blockquote,.sf-exceptionreset th,.sf-exceptionreset td{margin:0;padding:0;}.sf-exceptionreset table{border-collapse:collapse;border-spacing:0;}.sf-exceptionreset fieldset,.sf-exceptionreset img{border:0;}.sf-exceptionreset address,.sf-exceptionreset caption,.sf-exceptionreset cite,.sf-exceptionreset code,.sf-exceptionreset dfn,.sf-exceptionreset em,.sf-exceptionreset strong,.sf-exceptionreset th,.sf-exceptionreset var{font-style:normal;font-weight:normal;}.sf-exceptionreset li{list-style:none;}.sf-exceptionreset caption,.sf-exceptionreset th{text-align:left;}.sf-exceptionreset h1,.sf-exceptionreset h2,.sf-exceptionreset h3,.sf-exceptionreset h4,.sf-exceptionreset h5,.sf-exceptionreset h6{font-size:100%;font-weight:normal;}.sf-exceptionreset q:before,.sf-exceptionreset q:after{content:'';}.sf-exceptionreset abbr,.sf-exceptionreset acronym{border:0;font-variant:normal;}.sf-exceptionreset sup{vertical-align:text-top;}.sf-exceptionreset sub{vertical-align:text-bottom;}.sf-exceptionreset input,.sf-exceptionreset textarea,.sf-exceptionreset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-exceptionreset input,.sf-exceptionreset textarea,.sf-exceptionreset select{*font-size:100%;}.sf-exceptionreset legend{color:#000;} + +.sf-exceptionreset html, +.sf-exceptionreset body { + width: 100%; + min-height: 100%; + _height: 100%; + margin: 0; + padding: 0; +} +.sf-exceptionreset body { + font: 1em "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + text-align: left; + background-color: #efefef; +} + +.sf-exceptionreset abbr { + border-bottom: 1px dotted #000; + cursor: help; +} + +.sf-exceptionreset p { + font-size: 14px; + line-height: 20px; + color: #868686; + padding-bottom: 20px; +} + +.sf-exceptionreset strong { + color: #313131; + font-weight: bold; +} + +.sf-exceptionreset a { + color: #6c6159; +} +.sf-exceptionreset a img { + border: none; +} +.sf-exceptionreset a:hover { + text-decoration: underline; +} + +.sf-exceptionreset em { + font-style: italic; +} + +.sf-exceptionreset h2, +.sf-exceptionreset h3 { + font-weight: bold; +} +.sf-exceptionreset h1 { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 20px; + color: #313131; +} + +.sf-exceptionreset li { + padding-bottom: 10px; +} + +.sf-exceptionreset .traces { + padding-bottom: 14px; +} +.sf-exceptionreset .traces li { + font-size: 12px; + color: #868686; + padding: 5px 4px; + list-style-type: decimal; + margin-left: 20px; +} +.sf-exceptionreset #logs .traces li.error { + font-style: normal; + color: #AA3333; + background: #f9ecec; +} +/* fix for Opera not liking empty
  • */ +.sf-exceptionreset .traces li:after { + content: "\00A0"; +} + +.sf-exceptionreset .trace { + border: 1px solid #D3D3D3; + padding: 10px; + overflow: auto; + margin: 10px 0 20px; +} + +.sf-exceptionreset .block, +.sf-exceptionreset .block_exception { + -moz-border-radius: 16px; + -webkit-border-radius: 16px; + border-radius: 16px; + margin-bottom: 20px; +} +.sf-exceptionreset .block { + background-color: #FFFFFF; + border: 1px solid #dfdfdf; + padding: 40px 50px; +} +.sf-exceptionreset .block_exception { + background-color: #f6f6f6; + border: 1px solid #dfdfdf; + padding: 30px 28px; +} +.sf-exceptionreset .block_exception div { + color: #313131; + font-size: 10px; +} + +.sf-exceptionreset .block_exception_detected .illustration_exception, +.sf-exceptionreset .block_exception_detected .text_exception { + float: left; +} +.sf-exceptionreset .block_exception_detected .illustration_exception { + width: 152px; +} +.sf-exceptionreset .block_exception_detected .text_exception { + width: 670px; + padding: 30px 44px 24px 46px; + position: relative; +} + +.sf-exceptionreset .text_exception .open_quote, +.sf-exceptionreset .text_exception .close_quote { + position: absolute; +} +.sf-exceptionreset .open_quote { + top: 0; + left: 0; +} +.sf-exceptionreset .close_quote { + bottom: 0; + right: 50px; +} + +.sf-exceptionreset .block_exception p { + font-family: Arial, Helvetica, sans-serif; +} +.sf-exceptionreset .block_exception p a, +.sf-exceptionreset .block_exception p a:hover { + color: #565656; +} + +.sf-exceptionreset h2 { + font-size: 16px; + font-family: Arial, Helvetica, sans-serif; + padding-bottom: 16px; +} + +.sf-exceptionreset li a { + background: none; + color: #868686; + text-decoration: none; +} + +.sf-exceptionreset li a:hover { + background: none; + color: #313131; + text-decoration: underline; +} + +.sf-exceptionreset .logs h2 { + float: left; + width: 654px; +} + +.sf-exceptionreset .error_count { + float: right; + width: 170px; + text-align: right; +} + +.sf-exceptionreset .error_count span { + display: inline-block; + background-color: #aacd4e; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + padding: 4px; + color: white; + margin-right: 2px; + font-size: 11px; + font-weight: bold; +} + +.sf-exceptionreset .toggle { + vertical-align: middle; +} + +.sf-exceptionreset .linked ul, +.sf-exceptionreset .linked li { + display: inline; +} + +.sf-exceptionreset #output_content { + color: #000; + font-size: 12px; +} + +.sf-exceptionreset ol { + padding: 10px 0; +} +.sf-exceptionreset ol li { + list-style: decimal; + margin-left: 20px; + padding: 2px; + padding-bottom: 20px; +} +.sf-exceptionreset ol ol li { + list-style-position: inside; + margin-left: 0; + white-space: nowrap; + font-size: 12px; + padding-bottom: 0; +} +.sf-exceptionreset li .selected { + background-color: #ffd; +} diff --git a/web/bundles/framework/css/exception_layout.css b/web/bundles/framework/css/exception_layout.css new file mode 100644 index 0000000..95eac9e --- /dev/null +++ b/web/bundles/framework/css/exception_layout.css @@ -0,0 +1,131 @@ +html { + background: #eee; +} + +body { + font: 11px Verdana, Arial, sans-serif; + color: #333; +} + +.sf-exceptionreset, .sf-exceptionreset .block, .sf-exceptionreset #message { + margin: auto; +} + +img { + border: 0; +} + +.clear { + clear: both; + height: 0; + font-size: 0; + line-height: 0; +} + +.clear_fix:after { + content: "\0020"; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +.clear_fix { + display: inline-block; +} +* html .clear_fix { + height: 1%; +} +.clear_fix { + display: block; +} + +.header { + padding: 30px 30px 20px 30px; +} + +.header_logo { + float: left; +} + +.search { + float: right; + padding-top: 20px; +} + +.search label { + line-height: 28px; + vertical-align: middle; +} + +.search input { + width: 188px; + margin-right: 10px; + font-size: 12px; + border: 1px solid #dadada; + background: #FFFFFF url(../images/input_bg.gif) repeat-x left top; + padding: 5px 6px; + color: #565656; +} + +.search input[type="search"] { + -webkit-appearance: textfield; +} + +.search button { + -webkit-appearance: button-bevel; + float: none; + padding: 0; + margin: 0; + overflow: visible; + width: auto; + text-decoration: none; + cursor: pointer; + white-space: nowrap; + display: inline-block; + text-align: center; + vertical-align: middle; + border: 0; + background: none; +} + +.search button:-moz-focus-inner { + padding: 0; + border: none; +} + +.search button:hover { + text-decoration: none; +} + +.search button span span, +.search button span span span { + position: static; +} + +.search button span { + position: relative; + text-decoration: none; + display: block; + height: 28px; + float: left; + padding: 0 0 0 8px; + background: transparent url(../images/border_l.png) no-repeat top left; +} + +.search button span span { + padding: 0 8px 0 0; + background: transparent url(../images/border_r.png) right top no-repeat; +} + +.search button span span span { + padding: 0 7px; + font: bold 11px Arial, Helvetica, sans-serif; + color: #6b6b6b; + line-height: 28px; + background: transparent url(../images/btn_bg.png) repeat-x top left; +} + +#content { + width: 970px; + margin: 0 auto; +} diff --git a/web/bundles/framework/images/blue_picto_less.gif b/web/bundles/framework/images/blue_picto_less.gif new file mode 100644 index 0000000..dc70f6a Binary files /dev/null and b/web/bundles/framework/images/blue_picto_less.gif differ diff --git a/web/bundles/framework/images/blue_picto_more.gif b/web/bundles/framework/images/blue_picto_more.gif new file mode 100644 index 0000000..098e388 Binary files /dev/null and b/web/bundles/framework/images/blue_picto_more.gif differ diff --git a/web/bundles/framework/images/border_l.png b/web/bundles/framework/images/border_l.png new file mode 100644 index 0000000..3d96564 Binary files /dev/null and b/web/bundles/framework/images/border_l.png differ diff --git a/web/bundles/framework/images/border_r.png b/web/bundles/framework/images/border_r.png new file mode 100644 index 0000000..3665355 Binary files /dev/null and b/web/bundles/framework/images/border_r.png differ diff --git a/web/bundles/framework/images/btn_bg.png b/web/bundles/framework/images/btn_bg.png new file mode 100644 index 0000000..f168bfa Binary files /dev/null and b/web/bundles/framework/images/btn_bg.png differ diff --git a/web/bundles/framework/images/close_quote.gif b/web/bundles/framework/images/close_quote.gif new file mode 100644 index 0000000..b97296a Binary files /dev/null and b/web/bundles/framework/images/close_quote.gif differ diff --git a/web/bundles/framework/images/exception_detected.gif b/web/bundles/framework/images/exception_detected.gif new file mode 100644 index 0000000..fc41287 Binary files /dev/null and b/web/bundles/framework/images/exception_detected.gif differ diff --git a/web/bundles/framework/images/grey_magnifier.png b/web/bundles/framework/images/grey_magnifier.png new file mode 100644 index 0000000..3c88b6a Binary files /dev/null and b/web/bundles/framework/images/grey_magnifier.png differ diff --git a/web/bundles/framework/images/icon_log.png b/web/bundles/framework/images/icon_log.png new file mode 100644 index 0000000..a56e582 Binary files /dev/null and b/web/bundles/framework/images/icon_log.png differ diff --git a/web/bundles/framework/images/input_bg.gif b/web/bundles/framework/images/input_bg.gif new file mode 100644 index 0000000..7c0efc1 Binary files /dev/null and b/web/bundles/framework/images/input_bg.gif differ diff --git a/web/bundles/framework/images/logo_symfony.gif b/web/bundles/framework/images/logo_symfony.gif new file mode 100644 index 0000000..703cf45 Binary files /dev/null and b/web/bundles/framework/images/logo_symfony.gif differ diff --git a/web/bundles/framework/images/open_quote.gif b/web/bundles/framework/images/open_quote.gif new file mode 100644 index 0000000..0e116ce Binary files /dev/null and b/web/bundles/framework/images/open_quote.gif differ diff --git a/web/bundles/sensiodistribution/webconfigurator/css/configure.css b/web/bundles/sensiodistribution/webconfigurator/css/configure.css new file mode 100644 index 0000000..71bf225 --- /dev/null +++ b/web/bundles/sensiodistribution/webconfigurator/css/configure.css @@ -0,0 +1,438 @@ +/* +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; + +} + +h2.configure-error +{ + background-color: #CC514F; +} + +p +{ + line-height: 20px; + padding-bottom: 20px; +} + +ul 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; +} + +#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; +} +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; +} + +#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; +} +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; +} + +#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: 5px; +} + +#symfony-search +{ + position: absolute; + + top: 50px; + right: 30px; +} + +#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] +{ + 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-block-steps span +{ + display: inline-block; + padding: 2px 3px; + font-size: 11px; + line-height: 15px; + color: #868686; + font-weight: bold; + text-transform: uppercase; +} + +.symfony-block-steps span.selected +{ + background-color: #aacd4e; + color: #FFFFFF; +} + +h1 +{ + margin-top: 10px; + font-size: 26px; +} + +.symfony-form-row +{ + padding-bottom: 40px; +} + +.symfony-form-column +{ + width: 430px; + float: left; +} + +.symfony-form-footer +{ + padding-top: 20px; + clear: both; +} + +.symfony-form-field +{ + height: 20px; +} + +.symfony-form-row label +{ + display: block; + padding-bottom: 8px; +} + +.symfony-form-field input[type=text], +.symfony-form-field input[type=password], +.symfony-form-field textarea, +.symfony-form-field select +{ + font-size: 13px; + color: #565656; + width: 200px; +} + +.symfony-form-field input[type=text], +.symfony-form-field input[type=password], +.symfony-form-field textarea +{ + border: 1px solid #dadada; + background: #FFFFFF url(../images/background-textfield.gif) repeat-x left top; + width: 194px; + padding: 5px 6px; +} + +.symfony-form-errors ul +{ + padding: 0; +} + +.symfony-form-errors li +{ + background: url(../images/notification.gif) no-repeat left 6px; + font-size: 11px; + line-height: 16px; + color: #759e1a; + padding: 10px 25px; +} + +.symfony-configuration +{ + margin: 10px 0; + width: 100%; + height: 240px; +} + +.version +{ + text-align: right; + font-size: 10px; + margin-right: 20px; +} diff --git a/web/bundles/sensiodistribution/webconfigurator/css/install.css b/web/bundles/sensiodistribution/webconfigurator/css/install.css new file mode 100644 index 0000000..68b8a17 --- /dev/null +++ b/web/bundles/sensiodistribution/webconfigurator/css/install.css @@ -0,0 +1,374 @@ +/* +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 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; +} + +#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; +} +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; +} + +#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; +} +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; +} + +#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: 5px; +} + +#symfony-search +{ + position: absolute; + + top: 50px; + right: 30px; +} + +#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] +{ + 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-wrapper +{ + padding-top: 50px; +} + +.symfony-blocks-install +{ + overflow:hidden; +} + +.symfony-blocks-install .symfony-block-logo +{ + float: left; + width: 358px; +} + +.symfony-blocks-install .symfony-block-content +{ + float: left; + width: 510px; +} + +.symfony-install-continue +{ + font-size: 0.95em; + padding-left: 0; +} + +.symfony-install-continue li +{ + padding-bottom: 10px; +} + +.version +{ + text-align: right; + font-size: 10px; + margin-right: 20px; +} diff --git a/web/bundles/sensiodistribution/webconfigurator/images/background-textfield.gif b/web/bundles/sensiodistribution/webconfigurator/images/background-textfield.gif new file mode 100644 index 0000000..7c0efc1 Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/background-textfield.gif differ diff --git a/web/bundles/sensiodistribution/webconfigurator/images/blue-arrow.png b/web/bundles/sensiodistribution/webconfigurator/images/blue-arrow.png new file mode 100644 index 0000000..fa82d4b Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/blue-arrow.png differ diff --git a/web/bundles/sensiodistribution/webconfigurator/images/favicon.ico b/web/bundles/sensiodistribution/webconfigurator/images/favicon.ico new file mode 100644 index 0000000..8648036 Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/favicon.ico differ diff --git a/web/bundles/sensiodistribution/webconfigurator/images/logo-big.gif b/web/bundles/sensiodistribution/webconfigurator/images/logo-big.gif new file mode 100644 index 0000000..721f12a Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/logo-big.gif differ diff --git a/web/bundles/sensiodistribution/webconfigurator/images/logo-small.gif b/web/bundles/sensiodistribution/webconfigurator/images/logo-small.gif new file mode 100644 index 0000000..703cf45 Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/logo-small.gif differ diff --git a/web/bundles/sensiodistribution/webconfigurator/images/notification.gif b/web/bundles/sensiodistribution/webconfigurator/images/notification.gif new file mode 100644 index 0000000..017fac8 Binary files /dev/null and b/web/bundles/sensiodistribution/webconfigurator/images/notification.gif differ diff --git a/web/bundles/webprofiler/css/profiler.css b/web/bundles/webprofiler/css/profiler.css new file mode 100644 index 0000000..834c4f8 --- /dev/null +++ b/web/bundles/webprofiler/css/profiler.css @@ -0,0 +1,442 @@ +/* +Copyright (c) 2008, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 2.6.0 +*/ +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: 1em "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + text-align: left; +} + +p { + font-size: 14px; + line-height: 20px; + color: #313131; + padding-bottom: 20px +} + +strong { + color: #313131; + font-weight: bold; +} +em { + font-style: italic; +} + +a { + color: #6c6159; +} +a img { + border: none; +} +a:hover { + text-decoration: underline; +} + +button::-moz-focus-inner { + padding: 0; + border: none; +} +button { + overflow: visible; + width: auto; + background-color: transparent; + font-weight: bold; +} + +caption { + margin-bottom: 7px; +} +table, tr, th, td { + border-collapse: collapse; + border: 1px solid #d0dbb3; +} +table { + width: 100%; + margin: 10px 0 30px; +} +table th { + font-weight: bold; + background-color: #f1f7e2; +} +table th, table td { + font-size: 12px; + padding: 8px 10px; +} + +fieldset { + border: none; +} + +abbr { + border-bottom: 1px dotted #000; + cursor: help; +} + +.clear { + clear: both; + height: 0; + font-size: 0; + line-height: 0; +} +.clear_fix:after +{ + content: "\0020"; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +* html .clear_fix +{ + height: 1%; +} +.clear_fix +{ + display: block; +} + +#content { + padding: 0 50px; + margin: 0 auto; + font-family: Arial, Helvetica, sans-serif; + min-width: 970px; +} + +#header { + padding: 30px 30px 20px; +} + +#header h1 { + float: left; +} + +.search { + float: right; +} + +#menu_profiler { + border-right: 1px solid #dfdfdf; +} + +#menu_profiler li { + border-bottom: 1px solid #dfdfdf; + position: relative; + padding-bottom: 0; + display: block; + background-color: #f6f6f6; +} + +#menu_profiler li a { + color: #404040; + display: block; + font-size: 13px; + text-transform: uppercase; + text-decoration: none; + cursor: pointer; +} + +#menu_profiler li a span.label { + display: block; + padding: 20px 20px 16px 65px; + min-height: 24px; + _height: 24px; +} + +#menu_profiler li a span.icon { + display: block; + position: absolute; + left: 0; + top: 12px; + width: 60px; + text-align: center; +} + +#menu_profiler li.selected a, +#menu_profiler li a:hover { + background: #d1d1d1 url(../images/profiler/bg_submenu.gif) repeat-x 0 0; +} + +#navigation div:first-child, +#menu_profiler li:first-child, +#menu_profiler li:first-child a, +#menu_profiler li:first-child a span.label { + -moz-border-radius: 16px 0 0 0; + -webkit-border-radius: 16px 0 0 0; + border-radius: 16px 0 0 0; +} + +#menu_profiler li a span.count { + padding: 0; + position: absolute; + right: 10px; + top: 20px; +} + +#collector_wrapper { + float: left; + width: 100%; +} + +#collector_content { + margin-left: 250px; + padding: 40px 50px; +} + +#navigation { + float: left; + width: 250px; + margin-left: -100%; +} + +#collector_content table td { + background-color: white; +} + +h1 { + font-family: Georgia, "Times New Roman", Times, serif; + color: #404040; +} +h2, h3 { + font-weight: bold; + margin-bottom: 20px; +} + +li { + padding-bottom: 10px; + +} + +#main, #resume { + -moz-border-radius: 16px; + -webkit-border-radius: 16px; + border-radius: 16px; + margin-bottom: 20px; +} + +#menu_profiler span.count span { + display: inline-block; + background-color: #aacd4e; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + padding: 4px; + color: white; + margin-right: 2px; + font-size: 11px; +} + +#resume { + background-color: #f6f6f6; + border: 1px solid #dfdfdf; + padding: 16px 28px; +} + +#resume p { + color: #313131; + font-size: 12px; +} + +#resume .date { + display: block; +} + +table th.value { + width: 450px; + background-color: #dfeeb8; +} + +#content h2 { + font-size: 24px; + color: #313131; + font-weight: bold; +} + +#content #main { + padding: 0; + background-color: #FFF; + border: 1px solid #dfdfdf; +} + +#content #main p { + color: #313131; + font-size: 14px; + padding-bottom: 20px; +} + +.sf-toolbarreset { + border-top: 0; + padding: 0; +} + +.sf-exceptionreset .block_exception_detected .text_exception { + width: 520px; +} + +.sf-exceptionreset .block_exception_detected .illustration_exception { + display: none; +} + +ul.alt { + margin: 10px 0 30px; +} + +ul.alt li { + padding: 5px 7px; + font-size: 13px; +} + +ul.alt li.even { + background: #f1f7e2; +} + +ul.alt li.error { + background-color: #f66; + margin-bottom: 1px; +} + +td.main, td.menu { + text-align: left; + margin: 0; + padding: 0; + border: 0; + vertical-align: top; +} + +.search { + padding-top: 20px; +} + +.search label { + line-height: 28px; + vertical-align: middle; +} + +.search input { + width: 188px; + margin-right: 10px; + font-size: 12px; + border: 1px solid #dadada; + background: #FFF url(../images/profiler/input_bg.gif) repeat-x left top; + padding: 5px 6px; + color: #565656; +} + +.search input[type="search"] { + -webkit-appearance: textfield; +} + +.search button { + -webkit-appearance: button-bevel; + float: none; + padding: 0; + margin: 0; + border: 0; + text-decoration: none; + cursor: pointer; + white-space: nowrap; + display: inline-block; + text-align: center; + vertical-align: middle; + background: none; +} + +.search button:hover { + text-decoration: none; +} + +.search button span span, +.search button span span span { + position: static; +} + +.search button span { + position: relative; + text-decoration: none; + display: block; + height: 28px; + float: left; + padding: 0 0 0 8px; + background: transparent url(../images/profiler/border_l.png) no-repeat top left; +} + +.search button span span { + padding: 0 8px 0 0; + background: transparent url(../images/profiler/border_r.png) right top no-repeat; +} + +.search button span span span { + padding: 0 7px; + font: bold 11px Arial, Helvetica, sans-serif; + color: #6b6b6b; + line-height: 28px; + background: transparent url(../images/profiler/btn_bg.png) repeat-x top left; +} + +#navigation div:first-child { + margin: 0 0 20px; + border-top: 0; +} + +#navigation .search { + padding-top: 15px; + float: none; + background: #f6f6f6; + color: #333; + margin: 20px 0; + border: 1px solid #dfdfdf; + border-left: none; +} + +#navigation .search h3 { + font-family: Arial, Helvetica, sans-serif; + text-transform: uppercase; + margin-left: 10px; + font-size: 13px; +} + +#navigation .search form { + padding: 15px 0; +} + +#navigation .search button { + float: right; + margin-right: 20px; +} + +#navigation .search label { + display: block; + float: left; + width: 50px; +} + +#navigation .search input, +#navigation .search select, +#navigation .search label, +#navigation .search a { + font-size: 12px; +} + +#navigation .search form { + padding-left: 10px; +} + +#navigation .search input { + width: 160px; +} + +#navigation .import label { + float: none; + display: inline; +} + +#navigation .import input { + margin: 5px 0; + width: 210px; +} \ No newline at end of file diff --git a/web/bundles/webprofiler/css/toolbar.css b/web/bundles/webprofiler/css/toolbar.css new file mode 100644 index 0000000..504e3fe --- /dev/null +++ b/web/bundles/webprofiler/css/toolbar.css @@ -0,0 +1,28 @@ +/* +Copyright (c) 2010, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 3.1.2 +build: 56 +*/ +.sf-toolbarreset div,.sf-toolbarreset dl,.sf-toolbarreset dt,.sf-toolbarreset dd,.sf-toolbarreset ul,.sf-toolbarreset ol,.sf-toolbarreset li,.sf-toolbarreset h1,.sf-toolbarreset h2,.sf-toolbarreset h3,.sf-toolbarreset h4,.sf-toolbarreset h5,.sf-toolbarreset h6,.sf-toolbarreset pre,.sf-toolbarreset code,.sf-toolbarreset form,.sf-toolbarreset fieldset,.sf-toolbarreset legend,.sf-toolbarreset input,.sf-toolbarreset textarea,.sf-toolbarreset p,.sf-toolbarreset blockquote,.sf-toolbarreset th,.sf-toolbarreset td{margin:0;padding:0;}.sf-toolbarreset table{border-collapse:collapse;border-spacing:0;}.sf-toolbarreset fieldset,.sf-toolbarreset img{border:0;}.sf-toolbarreset address,.sf-toolbarreset caption,.sf-toolbarreset cite,.sf-toolbarreset code,.sf-toolbarreset dfn,.sf-toolbarreset em,.sf-toolbarreset strong,.sf-toolbarreset th,.sf-toolbarreset var{font-style:normal;font-weight:normal;}.sf-toolbarreset li{list-style:none;}.sf-toolbarreset caption,.sf-toolbarreset th{text-align:left;}.sf-toolbarreset h1,.sf-toolbarreset h2,.sf-toolbarreset h3,.sf-toolbarreset h4,.sf-toolbarreset h5,.sf-toolbarreset h6{font-size:100%;font-weight:normal;}.sf-toolbarreset q:before,.sf-toolbarreset q:after{content:'';}.sf-toolbarreset abbr,.sf-toolbarreset acronym{border:0;font-variant:normal;}.sf-toolbarreset sup{vertical-align:text-top;}.sf-toolbarreset sub{vertical-align:text-bottom;}.sf-toolbarreset input,.sf-toolbarreset textarea,.sf-toolbarreset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-toolbarreset input,.sf-toolbarreset textarea,.sf-toolbarreset select{*font-size:100%;}.sf-toolbarreset legend{color:#000;} + +.sf-toolbarreset { + background: #cbcbcb; + background-image: -moz-linear-gradient(-90deg, #e8e8e8, #cbcbcb); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#e8e8e8), to(#cbcbcb)); + bottom: 0; + left: 0; + z-index: 6000000; + width: 100%; + border-top: 1px solid #bbb; + padding: 5px 0; + margin: 0; + font: 11px Verdana, Arial, sans-serif; + color: #000; +} + +.sf-toolbarreset abbr { + border-bottom: 1px dotted #000000; + cursor: help; +} diff --git a/web/bundles/webprofiler/favicon.ico b/web/bundles/webprofiler/favicon.ico new file mode 100644 index 0000000..8648036 Binary files /dev/null and b/web/bundles/webprofiler/favicon.ico differ diff --git a/web/bundles/webprofiler/images/close.png b/web/bundles/webprofiler/images/close.png new file mode 100644 index 0000000..f28db61 Binary files /dev/null and b/web/bundles/webprofiler/images/close.png differ diff --git a/web/bundles/webprofiler/images/config.png b/web/bundles/webprofiler/images/config.png new file mode 100644 index 0000000..6907b48 Binary files /dev/null and b/web/bundles/webprofiler/images/config.png differ diff --git a/web/bundles/webprofiler/images/db.png b/web/bundles/webprofiler/images/db.png new file mode 100644 index 0000000..8bfe151 Binary files /dev/null and b/web/bundles/webprofiler/images/db.png differ diff --git a/web/bundles/webprofiler/images/events.png b/web/bundles/webprofiler/images/events.png new file mode 100644 index 0000000..5306afe Binary files /dev/null and b/web/bundles/webprofiler/images/events.png differ diff --git a/web/bundles/webprofiler/images/exception.png b/web/bundles/webprofiler/images/exception.png new file mode 100644 index 0000000..08d5bcb Binary files /dev/null and b/web/bundles/webprofiler/images/exception.png differ diff --git a/web/bundles/webprofiler/images/import.png b/web/bundles/webprofiler/images/import.png new file mode 100644 index 0000000..180584b Binary files /dev/null and b/web/bundles/webprofiler/images/import.png differ diff --git a/web/bundles/webprofiler/images/logger.png b/web/bundles/webprofiler/images/logger.png new file mode 100644 index 0000000..a56e582 Binary files /dev/null and b/web/bundles/webprofiler/images/logger.png differ diff --git a/web/bundles/webprofiler/images/mail.png b/web/bundles/webprofiler/images/mail.png new file mode 100644 index 0000000..4e535e7 Binary files /dev/null and b/web/bundles/webprofiler/images/mail.png differ diff --git a/web/bundles/webprofiler/images/memory.png b/web/bundles/webprofiler/images/memory.png new file mode 100644 index 0000000..54f2d80 Binary files /dev/null and b/web/bundles/webprofiler/images/memory.png differ diff --git a/web/bundles/webprofiler/images/profiler/bg_submenu.gif b/web/bundles/webprofiler/images/profiler/bg_submenu.gif new file mode 100644 index 0000000..fc77660 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/bg_submenu.gif differ diff --git a/web/bundles/webprofiler/images/profiler/border_l.png b/web/bundles/webprofiler/images/profiler/border_l.png new file mode 100644 index 0000000..3d96564 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/border_l.png differ diff --git a/web/bundles/webprofiler/images/profiler/border_r.png b/web/bundles/webprofiler/images/profiler/border_r.png new file mode 100644 index 0000000..3665355 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/border_r.png differ diff --git a/web/bundles/webprofiler/images/profiler/btn_bg.png b/web/bundles/webprofiler/images/profiler/btn_bg.png new file mode 100644 index 0000000..f168bfa Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/btn_bg.png differ diff --git a/web/bundles/webprofiler/images/profiler/config.png b/web/bundles/webprofiler/images/profiler/config.png new file mode 100644 index 0000000..6907b48 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/config.png differ diff --git a/web/bundles/webprofiler/images/profiler/db.png b/web/bundles/webprofiler/images/profiler/db.png new file mode 100644 index 0000000..8c4fc0e Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/db.png differ diff --git a/web/bundles/webprofiler/images/profiler/events.png b/web/bundles/webprofiler/images/profiler/events.png new file mode 100644 index 0000000..c3c4c8a Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/events.png differ diff --git a/web/bundles/webprofiler/images/profiler/exception.png b/web/bundles/webprofiler/images/profiler/exception.png new file mode 100644 index 0000000..ddf5472 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/exception.png differ diff --git a/web/bundles/webprofiler/images/profiler/grey_magnifier.png b/web/bundles/webprofiler/images/profiler/grey_magnifier.png new file mode 100644 index 0000000..3c88b6a Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/grey_magnifier.png differ diff --git a/web/bundles/webprofiler/images/profiler/input_bg.gif b/web/bundles/webprofiler/images/profiler/input_bg.gif new file mode 100644 index 0000000..7c0efc1 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/input_bg.gif differ diff --git a/web/bundles/webprofiler/images/profiler/logger.png b/web/bundles/webprofiler/images/profiler/logger.png new file mode 100644 index 0000000..a399160 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/logger.png differ diff --git a/web/bundles/webprofiler/images/profiler/logo_symfony_profiler.gif b/web/bundles/webprofiler/images/profiler/logo_symfony_profiler.gif new file mode 100644 index 0000000..61d5f94 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/logo_symfony_profiler.gif differ diff --git a/web/bundles/webprofiler/images/profiler/mail.png b/web/bundles/webprofiler/images/profiler/mail.png new file mode 100644 index 0000000..30bcdb1 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/mail.png differ diff --git a/web/bundles/webprofiler/images/profiler/request.png b/web/bundles/webprofiler/images/profiler/request.png new file mode 100644 index 0000000..72ec62d Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/request.png differ diff --git a/web/bundles/webprofiler/images/profiler/security.png b/web/bundles/webprofiler/images/profiler/security.png new file mode 100644 index 0000000..3147d09 Binary files /dev/null and b/web/bundles/webprofiler/images/profiler/security.png differ diff --git a/web/bundles/webprofiler/images/request.png b/web/bundles/webprofiler/images/request.png new file mode 100644 index 0000000..4e4fe19 Binary files /dev/null and b/web/bundles/webprofiler/images/request.png differ diff --git a/web/bundles/webprofiler/images/search.png b/web/bundles/webprofiler/images/search.png new file mode 100644 index 0000000..03ccf72 Binary files /dev/null and b/web/bundles/webprofiler/images/search.png differ diff --git a/web/bundles/webprofiler/images/security.png b/web/bundles/webprofiler/images/security.png new file mode 100644 index 0000000..b0e683b Binary files /dev/null and b/web/bundles/webprofiler/images/security.png differ diff --git a/web/bundles/webprofiler/images/spacer.gif b/web/bundles/webprofiler/images/spacer.gif new file mode 100644 index 0000000..d112d8a Binary files /dev/null and b/web/bundles/webprofiler/images/spacer.gif differ diff --git a/web/bundles/webprofiler/images/symfony.png b/web/bundles/webprofiler/images/symfony.png new file mode 100644 index 0000000..1321f60 Binary files /dev/null and b/web/bundles/webprofiler/images/symfony.png differ diff --git a/web/bundles/webprofiler/images/timer.png b/web/bundles/webprofiler/images/timer.png new file mode 100644 index 0000000..7ab04e3 Binary files /dev/null and b/web/bundles/webprofiler/images/timer.png differ diff --git a/web/config.php b/web/config.php new file mode 100644 index 0000000..4ad46b9 --- /dev/null +++ b/web/config.php @@ -0,0 +1,212 @@ +=')) { + $version = phpversion(); + $majorProblems[] = <<$version", but Symfony + needs at least PHP "5.3.2" to run. Before using Symfony, install + PHP "5.3.2" or newer. +EOF; +} + +if (!is_writable(__DIR__ . '/../app/cache')) { + $majorProblems[] = 'Change the permissions of the "app/cache/" + directory so that the web server can write into it.'; +} + +if (!is_writable(__DIR__ . '/../app/logs')) { + $majorProblems[] = 'Change the permissions of the "app/logs/" + directory so that the web server can write into it.'; +} + +// extensions +if (!class_exists('DomDocument')) { + $minorProblems[] = 'Install and enable the php-xml 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 PHP accelerator like APC (highly recommended).'; +} + +if (!(!(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='))) { + $majorProblems[] = 'Upgrade your APC extension (3.0.17+)'; +} + +if (!function_exists('token_get_all')) { + $minorProblems[] = 'Install and enable the Tokenizer extension.'; +} + +if (!function_exists('mb_strlen')) { + $minorProblems[] = 'Install and enable the mbstring extension.'; +} + +if (!function_exists('iconv')) { + $minorProblems[] = 'Install and enable the iconv extension.'; +} + +if (!function_exists('utf8_decode')) { + $minorProblems[] = 'Install and enable the XML extension.'; +} + +if (PHP_OS != 'WINNT' && !function_exists('posix_isatty')) { + $minorProblems[] = 'Install and enable the php_posix extension (used to colorize the CLI output).'; +} + +if (!class_exists('Locale')) { + $minorProblems[] = 'Install and enable the intl 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 intl extension with a newer ICU version (4+).'; + } +} + +if (!class_exists('SQLite3') && !in_array('sqlite', PDO::getAvailableDrivers())) { + $majorProblems[] = 'Install and enable the SQLite3 or PDO_SQLite extension.'; +} + +if (!function_exists('json_encode')) { + $majorProblems[] = 'Install and enable the json extension.'; +} + +if (!function_exists('session_start')) { + $majorProblems[] = 'Install and enable the session extension.'; +} + +if (!function_exists('ctype_alpha')) { + $majorProblems[] = 'Install and enable the ctype extension.'; +} + +if (!function_exists('token_get_all')) { + $majorProblems[] = 'Install and enable the Tokenizer extension.'; +} + +// php.ini +if (!ini_get('date.timezone')) { + $phpini = true; + $majorProblems[] = 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).'; +} + +if (ini_get('short_open_tag')) { + $phpini = true; + $minorProblems[] = 'Set short_open_tag to off in php.ini*.'; +} + +if (ini_get('magic_quotes_gpc')) { + $phpini = true; + $minorProblems[] = 'Set magic_quotes_gpc to off in php.ini*.'; +} + +if (ini_get('register_globals')) { + $phpini = true; + $minorProblems[] = 'Set register_globals to off in php.ini*.'; +} + +if (ini_get('session.auto_start')) { + $phpini = true; + $minorProblems[] = 'Set session.auto_start to off in php.ini*.'; +} +?> + + + + + + Symfony Configuration + + +
    +
    +
    + + +
    +

    Welcome!

    +

    Welcome to your new Symfony project.

    +

    This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘app/config/parameters.ini’ file directly.

    + + +

    + Major problems +

    +

    Major problems have been detected and must be fixed before continuing :

    +
      + +
    1. + +
    + + + +

    Recommendations

    +

    + + Additionally, to + + To + enhance your Symfony experience, it’s recommended that you fix the following : +

    +
      + +
    1. + +
    + + + + +

    * + + Changes to the php.ini file must be done in "". + + To change settings, create a "php.ini". + +

    + + + +
    +
    +
    +
    Symfony Standard Edition
    + + diff --git a/web/favicon.ico b/web/favicon.ico new file mode 100644 index 0000000..8648036 Binary files /dev/null and b/web/favicon.ico differ diff --git a/web/robots.txt b/web/robots.txt new file mode 100644 index 0000000..214e411 --- /dev/null +++ b/web/robots.txt @@ -0,0 +1,4 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: *