Skip to content
Browse files

Added vendors as git submodules.

  • Loading branch information...
1 parent 91dbdaf commit dd8a8eceffb8b585019f264c70a97b0833834952 @umpirsky committed Jul 20, 2011
Showing with 17 additions and 9,795 deletions.
  1. +12 −0 .gitmodules
  2. +3 −3 src/bootstrap.php
  3. +1 −0 vendor/Silex
  4. +1 −0 vendor/Twig
  5. BIN vendor/silex.phar
  6. +0 −19 vendor/silex/LICENSE
  7. +0 −38 vendor/silex/README.md
  8. +0 −17 vendor/silex/autoload.php
  9. +0 −9 vendor/silex/compile
  10. +0 −17 vendor/silex/doc/conf.py
  11. +0 −24 vendor/silex/doc/contributing.rst
  12. +0 −172 vendor/silex/doc/extensions.rst
  13. +0 −87 vendor/silex/doc/extensions/doctrine.rst
  14. +0 −74 vendor/silex/doc/extensions/http_cache.rst
  15. +0 −14 vendor/silex/doc/extensions/index.rst
  16. +0 −54 vendor/silex/doc/extensions/monolog.rst
  17. +0 −72 vendor/silex/doc/extensions/session.rst
  18. +0 −132 vendor/silex/doc/extensions/translation.rst
  19. +0 −78 vendor/silex/doc/extensions/twig.rst
  20. +0 −51 vendor/silex/doc/extensions/url_generator.rst
  21. +0 −104 vendor/silex/doc/extensions/validator.rst
  22. +0 −14 vendor/silex/doc/index.rst
  23. +0 −91 vendor/silex/doc/internals.rst
  24. +0 −47 vendor/silex/doc/intro.rst
  25. +0 −264 vendor/silex/doc/services.rst
  26. +0 −185 vendor/silex/doc/testing.rst
  27. +0 −583 vendor/silex/doc/usage.rst
  28. +0 −8 vendor/silex/example.htaccess
  29. +0 −19 vendor/silex/phpunit.xml.dist
  30. +0 −426 vendor/silex/src/Silex/Application.php
  31. +0 −141 vendor/silex/src/Silex/Compiler.php
  32. +0 −154 vendor/silex/src/Silex/Controller.php
  33. +0 −67 vendor/silex/src/Silex/ControllerCollection.php
  34. +0 −21 vendor/silex/src/Silex/Exception/ControllerFrozenException.php
  35. +0 −52 vendor/silex/src/Silex/Extension/DoctrineExtension.php
  36. +0 −49 vendor/silex/src/Silex/Extension/FormExtension.php
  37. +0 −40 vendor/silex/src/Silex/Extension/HttpCacheExtension.php
  38. +0 −64 vendor/silex/src/Silex/Extension/MonologExtension.php
  39. +0 −54 vendor/silex/src/Silex/Extension/SessionExtension.php
  40. +0 −74 vendor/silex/src/Silex/Extension/SwiftmailerExtension.php
  41. +0 −29 vendor/silex/src/Silex/Extension/SymfonyBridgesExtension.php
  42. +0 −52 vendor/silex/src/Silex/Extension/TranslationExtension.php
  43. +0 −62 vendor/silex/src/Silex/Extension/TwigExtension.php
  44. +0 −29 vendor/silex/src/Silex/Extension/UrlGeneratorExtension.php
  45. +0 −45 vendor/silex/src/Silex/Extension/ValidatorExtension.php
  46. +0 −17 vendor/silex/src/Silex/ExtensionInterface.php
  47. +0 −32 vendor/silex/src/Silex/GetResponseForErrorEvent.php
  48. +0 −32 vendor/silex/src/Silex/HttpCache.php
  49. +0 −57 vendor/silex/src/Silex/LazyApplication.php
  50. +0 −33 vendor/silex/src/Silex/RedirectableUrlMatcher.php
  51. +0 −22 vendor/silex/src/Silex/SilexEvents.php
  52. +0 −38 vendor/silex/src/Silex/StringResponseConverter.php
  53. +0 −56 vendor/silex/src/Silex/WebTestCase.php
  54. +0 −127 vendor/silex/tests/Silex/Tests/ApplicationTest.php
  55. +0 −183 vendor/silex/tests/Silex/Tests/BeforeAfterFilterTest.php
  56. +0 −88 vendor/silex/tests/Silex/Tests/ControllerCollectionTest.php
  57. +0 −91 vendor/silex/tests/Silex/Tests/ControllerTest.php
  58. +0 −161 vendor/silex/tests/Silex/Tests/ErrorHandlerTest.php
  59. +0 −71 vendor/silex/tests/Silex/Tests/Extension/MonologExtensionTest.php
  60. +0 −58 vendor/silex/tests/Silex/Tests/Extension/SessionExtensionTest.php
  61. +0 −50 vendor/silex/tests/Silex/Tests/Extension/TwigExtensionTest.php
  62. +0 −120 vendor/silex/tests/Silex/Tests/Extension/UrlGeneratorExtensionTest.php
  63. +0 −129 vendor/silex/tests/Silex/Tests/FunctionalTest.php
  64. +0 −213 vendor/silex/tests/Silex/Tests/RouterTest.php
  65. +0 −56 vendor/silex/tests/Silex/Tests/WebTestCaseTest.php
  66. +0 −16 vendor/silex/tests/bootstrap.php
  67. +0 −10 vendor/silex/vendor/monolog/CHANGELOG.mdown
  68. +0 −19 vendor/silex/vendor/monolog/LICENSE
  69. +0 −93 vendor/silex/vendor/monolog/README.mdown
  70. +0 −18 vendor/silex/vendor/monolog/composer.json
  71. +0 −15 vendor/silex/vendor/monolog/phpunit.xml.dist
  72. +0 −36 vendor/silex/vendor/monolog/src/Monolog/Formatter/FormatterInterface.php
  73. +0 −40 vendor/silex/vendor/monolog/src/Monolog/Formatter/JsonFormatter.php
  74. +0 −105 vendor/silex/vendor/monolog/src/Monolog/Formatter/LineFormatter.php
  75. +0 −83 vendor/silex/vendor/monolog/src/Monolog/Formatter/WildfireFormatter.php
  76. +0 −169 vendor/silex/vendor/monolog/src/Monolog/Handler/AbstractHandler.php
  77. +0 −70 vendor/silex/vendor/monolog/src/Monolog/Handler/AbstractProcessingHandler.php
  78. +0 −67 vendor/silex/vendor/monolog/src/Monolog/Handler/BufferHandler.php
  79. +0 −95 vendor/silex/vendor/monolog/src/Monolog/Handler/FingersCrossedHandler.php
  80. +0 −145 vendor/silex/vendor/monolog/src/Monolog/Handler/FirePHPHandler.php
  81. +0 −74 vendor/silex/vendor/monolog/src/Monolog/Handler/GroupHandler.php
  82. +0 −77 vendor/silex/vendor/monolog/src/Monolog/Handler/HandlerInterface.php
  83. +0 −54 vendor/silex/vendor/monolog/src/Monolog/Handler/MailHandler.php
  84. +0 −49 vendor/silex/vendor/monolog/src/Monolog/Handler/NativeMailerHandler.php
  85. +0 −37 vendor/silex/vendor/monolog/src/Monolog/Handler/NullHandler.php
  86. +0 −109 vendor/silex/vendor/monolog/src/Monolog/Handler/RotatingFileHandler.php
  87. +0 −72 vendor/silex/vendor/monolog/src/Monolog/Handler/StreamHandler.php
  88. +0 −55 vendor/silex/vendor/monolog/src/Monolog/Handler/SwiftMailerHandler.php
  89. +0 −109 vendor/silex/vendor/monolog/src/Monolog/Handler/SyslogHandler.php
  90. +0 −120 vendor/silex/vendor/monolog/src/Monolog/Handler/TestHandler.php
  91. +0 −380 vendor/silex/vendor/monolog/src/Monolog/Logger.php
  92. +0 −58 vendor/silex/vendor/monolog/src/Monolog/Processor/IntrospectionProcessor.php
  93. +0 −60 vendor/silex/vendor/monolog/src/Monolog/Processor/WebProcessor.php
  94. +0 −35 vendor/silex/vendor/monolog/tests/Monolog/Formatter/JsonFormatterTest.php
  95. +0 −113 vendor/silex/vendor/monolog/tests/Monolog/Formatter/LineFormatterTest.php
  96. +0 −38 vendor/silex/vendor/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php
  97. +0 −30 vendor/silex/vendor/monolog/tests/Monolog/Functional/Handler/FirePHPHandlerTest.php
  98. +0 −93 vendor/silex/vendor/monolog/tests/Monolog/Handler/AbstractHandlerTest.php
  99. +0 −72 vendor/silex/vendor/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php
  100. +0 −84 vendor/silex/vendor/monolog/tests/Monolog/Handler/BufferHandlerTest.php
  101. +0 −136 vendor/silex/vendor/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php
  102. +0 −91 vendor/silex/vendor/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php
  103. 0 vendor/silex/vendor/monolog/tests/Monolog/Handler/Fixtures/.gitkeep
  104. +0 −71 vendor/silex/vendor/monolog/tests/Monolog/Handler/GroupHandlerTest.php
  105. +0 −69 vendor/silex/vendor/monolog/tests/Monolog/Handler/MailHandlerTest.php
  106. +0 −33 vendor/silex/vendor/monolog/tests/Monolog/Handler/NullHandlerTest.php
  107. +0 −100 vendor/silex/vendor/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php
  108. +0 −77 vendor/silex/vendor/monolog/tests/Monolog/Handler/StreamHandlerTest.php
  109. +0 −41 vendor/silex/vendor/monolog/tests/Monolog/Handler/SyslogHandlerTest.php
  110. +0 −54 vendor/silex/vendor/monolog/tests/Monolog/Handler/TestHandlerTest.php
  111. +0 −166 vendor/silex/vendor/monolog/tests/Monolog/LoggerTest.php
  112. +0 −64 vendor/silex/vendor/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php
  113. +0 −39 vendor/silex/vendor/monolog/tests/Monolog/Processor/WebProcessorTest.php
  114. +0 −58 vendor/silex/vendor/monolog/tests/Monolog/TestCase.php
  115. +0 −21 vendor/silex/vendor/monolog/tests/bootstrap.php
  116. +0 −19 vendor/silex/vendor/pimple/LICENSE
  117. +0 −109 vendor/silex/vendor/pimple/README.rst
  118. +0 −130 vendor/silex/vendor/pimple/lib/Pimple.php
  119. +0 −19 vendor/silex/vendor/pimple/phpunit.xml.dist
  120. +0 −144 vendor/silex/vendor/pimple/tests/Pimple/Tests/PimpleTest.php
  121. +0 −39 vendor/silex/vendor/pimple/tests/Pimple/Tests/Service.php
  122. +0 −13 vendor/silex/vendor/pimple/tests/bootstrap.php
  123. +0 −9 vendor/silex/vendor/twig/AUTHORS
  124. +0 −343 vendor/silex/vendor/twig/CHANGELOG
  125. +0 −31 vendor/silex/vendor/twig/LICENSE
  126. +0 −8 vendor/silex/vendor/twig/README.markdown
  127. +0 −42 vendor/silex/vendor/twig/bin/create_pear_package.php
Sorry, we could not display the entire diff because too many files (2,997) changed.
View
12 .gitmodules
@@ -0,0 +1,12 @@
+[submodule "vendor/Silex"]
+ path = vendor/Silex
+ url = https://github.com/fabpot/Silex.git
+[submodule "vendor/symfony"]
+ path = vendor/symfony
+ url = https://github.com/symfony/symfony.git
+[submodule "vendor/Twig"]
+ path = vendor/Twig
+ url = https://github.com/fabpot/Twig.git
+[submodule "vendor/swiftmailer"]
+ path = vendor/swiftmailer
+ url = https://github.com/swiftmailer/swiftmailer.git
View
6 src/bootstrap.php
@@ -6,7 +6,7 @@
* (c) Saša Stamenković <umpirsky@gmail.com>
*/
-include __DIR__ . '/../vendor/silex/autoload.php';
+include __DIR__ . '/../vendor/Silex/autoload.php';
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;
@@ -17,7 +17,7 @@
// Register extensions
$app->register(new Silex\Extension\TwigExtension(), array(
'twig.path' => __DIR__ . '/../views',
- 'twig.class_path' => __DIR__ . '/../vendor/twig/lib',
+ 'twig.class_path' => __DIR__ . '/../vendor/Twig/lib',
));
$app->register(new Silex\Extension\UrlGeneratorExtension());
@@ -103,4 +103,4 @@ function (\Exception $e) use ($app) {
// Run
-$app->run();
+$app->run();
1 vendor/Silex
@@ -0,0 +1 @@
+Subproject commit b6dca08cec9d246834fd89a35b58e666967573bf
1 vendor/Twig
@@ -0,0 +1 @@
+Subproject commit e44ea9b0d4608db773d2dfce48c23f04be24e4d3
View
BIN vendor/silex.phar
Binary file not shown.
View
19 vendor/silex/LICENSE
@@ -1,19 +0,0 @@
-Copyright (c) 2010 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.
View
38 vendor/silex/README.md
@@ -1,38 +0,0 @@
-Silex, a simple Web Framework
-=============================
-
-Silex is a simple web framework to develop simple websites based on
-[Symfony2][1] components:
-
-
-```php
-<?php
-require_once __DIR__.'/silex.phar';
-
-$app = new Silex\Application();
-
-$app->get('/hello/{name}', function ($name) use ($app) {
- return 'Hello '.$app->escape($name);
-});
-
-$app->run();
-```
-
-Silex works with PHP 5.3.2 or later.
-
-## Installation
-
-Installing Silex is as easy as it can get. Download the [`silex.phar`][2] file
-and you're done!
-
-## More Information
-
-Read the [documentation][3] for more information.
-
-## License
-
-Silex is licensed under the MIT license.
-
-[1]: http://symfony.com
-[2]: http://silex-project.org/get/silex.phar
-[3]: http://silex-project.org/documentation
View
17 vendor/silex/autoload.php
@@ -1,17 +0,0 @@
-<?php
-
-if (false === class_exists('Symfony\Component\ClassLoader\UniversalClassLoader', false)) {
- require_once __DIR__.'/../../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
-}
-
-use Symfony\Component\ClassLoader\UniversalClassLoader;
-
-$loader = new UniversalClassLoader();
-$loader->registerNamespaces(array(
- 'Symfony' => __DIR__.'/../../vendor/symfony/src',
- 'Silex' => __DIR__.'/src',
-));
-$loader->registerPrefixes(array(
- 'Pimple' => __DIR__.'/vendor/pimple/lib',
-));
-$loader->register();
View
9 vendor/silex/compile
@@ -1,9 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-require_once __DIR__.'/autoload.php';
-
-use Silex\Compiler;
-
-$compiler = new Compiler();
-$compiler->compile();
View
17 vendor/silex/doc/conf.py
@@ -1,17 +0,0 @@
-import sys, os
-from sphinx.highlighting import lexers
-from pygments.lexers.web import PhpLexer
-
-sys.path.append(os.path.abspath('_exts'))
-
-extensions = []
-master_doc = 'index'
-highlight_language = 'php'
-
-project = u'Silex'
-copyright = u'2010 Fabien Potencier'
-
-version = '0'
-release = '0.0.0'
-
-lexers['php'] = PhpLexer(startinline=True)
View
24 vendor/silex/doc/contributing.rst
@@ -1,24 +0,0 @@
-Contributing
-============
-
-We are open to contributions to the Silex code. If you find
-a bug or want to contribute an extension, just follow these
-steps.
-
-* Fork `the Silex repository <https://github.com/fabpot/Silex>`_
- on github.
-
-* Make your feature addition or bug fix.
-
-* Add tests for it. This is important so we don't break it in a future version unintentionally.
-
-* Send a pull request. Bonus points for topic branches.
-
-If you have a big change or would like to discuss something,
-please join us on the `mailing list
-<http://groups.google.com/group/silex-php>`_.
-
-.. note::
-
- Any code you contribute must be licensed under the MIT
- License.
View
172 vendor/silex/doc/extensions.rst
@@ -1,172 +0,0 @@
-Extensions
-==========
-
-Silex provides a common interface for extensions. These
-define services on the application.
-
-Loading extensions
-------------------
-
-In order to load and use an extension, you must register it
-on the application. ::
-
- $app = new Silex\Application();
-
- $app->register(new Acme\DatabaseExtension());
-
-You can also provide some parameters as a second argument. These
-will be set **before** the extension is registered.
-
-::
-
- $app->register(new Acme\DatabaseExtension(), array(
- 'database.dsn' => 'mysql:host=localhost;dbname=myapp',
- 'database.user' => 'root',
- 'database.password' => 'secret_root_password',
- ));
-
-Conventions
------------
-
-You need to watch out in what order you do certain things when
-interacting with extensions. Just keep to these rules:
-
-* Class paths (for the autoloader) must be defined **before**
- the extension is registered. Passing it as a second argument
- to ``Application::register`` qualifies too, because it sets
- the passed parameters first.
-
- *Reason: The extension will set up the autoloader at
- extension register time. If the class path is not set
- at that point, no autoloader can be registered.*
-
-* Overriding existing services must occur **after** the
- extension is registered.
-
- *Reason: If the services already exist, the extension
- will overwrite it.*
-
-* You can set parameters any time before the service is
- accessed.
-
-Make sure to stick to this behavior when creating your
-own extensions.
-
-Included extensions
--------------------
-
-There are a few extensions that you get out of the box.
-All of these are within the ``Silex\Extension`` namespace.
-
-* :doc:`DoctrineExtension <extensions/doctrine>`
-* :doc:`MonologExtension <extensions/monolog>`
-* :doc:`SessionExtension <extensions/session>`
-* :doc:`TwigExtension <extensions/twig>`
-* :doc:`TranslationExtension <extensions/translation>`
-* :doc:`UrlGeneratorExtension <extensions/url_generator>`
-* :doc:`ValidatorExtension <extensions/validator>`
-* :doc:`HttpCacheExtension <extensions/http_cache>`
-
-Creating an extension
----------------------
-
-Extensions must implement the ``Silex\ExtensionInterface``.
-
-::
-
- interface ExtensionInterface
- {
- function register(Application $app);
- }
-
-This is very straight forward, just create a new class that
-implements the ``register`` method. In this method you must
-define services on the application which then may make use
-of other services and parameters.
-
-Here is an example of such an extension::
-
- namespace Acme;
-
- use Silex\Application;
- use Silex\ExtensionInterface;
-
- class HelloExtension implements ExtensionInterface
- {
- public function register(Application $app)
- {
- $app['hello'] = $app->protect(function ($name) use ($app) {
- $default = $app['hello.default_name'] ? $app['hello.default_name'] : '';
- $name = $name ?: $default;
-
- return 'Hello '.$app->escape($name);
- });
- }
- }
-
-This class provides a ``hello`` service which is a protected
-closure. It takes a name argument and will return
-``hello.default_name`` if no name is given. If the default
-is also missing, it will use an empty string.
-
-You can now use this extension as follows::
-
- $app = new Silex\Application();
-
- $app->register(new Acme\HelloExtension(), array(
- 'hello.default_name' => 'Igor',
- ));
-
- $app->get('/hello', function () use ($app) {
- $name = $app['request']->get('name');
-
- return $app['hello']($name);
- });
-
-In this example we are getting the ``name`` parameter from the
-query string, so the request path would have to be ``/hello?name=Fabien``.
-
-Class loading
-~~~~~~~~~~~~~
-
-Extensions are great for tying in external libraries as you
-can see by looking at the ``MonologExtension`` and
-``TwigExtension``. If the library is decent and follows the
-`PSR-0 Naming Standard <http://groups.google.com/group/php-standards/web/psr-0-final-proposal>`_
-or the PEAR Naming Convention, it is possible to autoload
-classes using the ``UniversalClassLoader``.
-
-As described in the *Services* chapter, there is an
-*autoloader* service which can be used for this.
-
-Here is an example of how to use it (based on `Buzz <https://github.com/kriswallsmith/Buzz>`_)::
-
- namespace Acme;
-
- use Silex\Application;
- use Silex\ExtensionInterface;
-
- class BuzzExtension implements ExtensionInterface
- {
- public function register(Application $app)
- {
- $app['buzz'] = $app->share(function () { ... });
-
- if (isset($app['buzz.class_path'])) {
- $app['autoloader']->registerNamespace('Buzz', $app['buzz.class_path']);
- }
- }
- }
-
-This allows you to simply provide the class path as an
-option when registering the extension::
-
- $app->register(new BuzzExtension(), array(
- 'buzz.class_path' => __DIR__.'/vendor/buzz/lib',
- ));
-
-.. note::
-
- For libraries that do not use PHP 5.3 namespaces you can use ``registerPrefix``
- instead of ``registerNamespace``, which will use an underscore as directory
- delimiter.
View
87 vendor/silex/doc/extensions/doctrine.rst
@@ -1,87 +0,0 @@
-DoctrineExtension
-=================
-
-The *DoctrineExtension* provides integration with the `Doctrine DBAL
-<http://www.doctrine-project.org/projects/dbal>`_ for easy database acccess.
-
-.. note::
-
- There is only a Doctrine DBAL. An ORM service is **not** supplied.
-
-Parameters
-----------
-
-* **db.options**: Array of Doctrine DBAL options.
-
- These options are available:
-
- * **driver**: The database driver to use, defaults to ``pdo_mysql``.
- Can be any of: ``pdo_mysql``, ``pdo_sqlite``, ``pdo_pgsql``,
- ``pdo_oci``, ``oci8``, ``ibm_db2``, ``pdo_ibm``, ``pdo_sqlsrv``.
-
- * **dbname**: The name of the database to connect to.
-
- * **host**: The host of the database to connect to. Defaults to
- localhost.
-
- * **user**: The user of the database to connect to. Defaults to
- root.
-
- * **password**: The password of the database to connect to.
-
- * **path**: Only relevant for ``pdo_sqlite``, specifies the path to
- the SQLite database.
-
- These and additional options are described in detail in the `Doctrine DBAL
- configuration documentation <http://www.doctrine-project.org/docs/dbal/2.0/en/reference/configuration.html>`_.
-
-* **db.dbal.class_path** (optional): Path to where the
- Doctrine DBAL is located.
-
-* **db.common.class_path** (optional): Path to where
- Doctrine Common is located.
-
-Services
---------
-
-* **db**: The database connection, instance of
- ``Doctrine\DBAL\Connection``.
-
-* **db.config**: Configuration object for Doctrine. Defaults to
- an empty ``Doctrine\DBAL\Configuration``.
-
-* **db.event_manager**: Event Manager for Doctrine.
-
-Registering
------------
-
-Make sure you place a copy of *Doctrine DBAL* in ``vendor/doctrine-dbal``
-and *Doctrine Common* in ``vendor/doctrine-common``.
-
-::
-
- $app->register(new Silex\Extension\DoctrineExtension(), array(
- 'db.options' => array(
- 'driver' => 'pdo_sqlite',
- 'path' => __DIR__.'/app.db',
- ),
- 'db.dbal.class_path' => __DIR__.'/vendor/doctrine-dbal/lib',
- 'db.common.class_path' => __DIR__.'/vendor/doctrine-common/lib',
- ));
-
-Usage
------
-
-The Doctrine extension provides a ``db`` service. Here is a usage
-example::
-
- $app->get('/blog/show/{id}', function ($id) use ($app) {
- $sql = "SELECT * FROM posts WHERE id = ?";
- $post = $app['db']->fetchAssoc($sql, array((int) $id));
-
- return "<h1>{$post['title']}</h1>".
- "<p>{$post['body']}</p>";
- });
-
-For more information, consult the `Doctrine DBAL documentation
-<http://www.doctrine-project.org/docs/dbal/2.0/en/>`_.
View
74 vendor/silex/doc/extensions/http_cache.rst
@@ -1,74 +0,0 @@
-HttpCacheExtension
-==================
-
-The *HttpCacheExtension* provides support for the Symfony2 Reverse Proxy.
-
-Parameters
-----------
-
-* **http_cache.cache_dir**: The cache directory to store the HTTP cache data.
-
-* **http_cache.options** (optional): An array of options for the `HttpCache
- <http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_
- constructor.
-
-Services
---------
-
-* **http_cache**: An instance of `HttpCache
- <http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpCache/HttpCache.html>`_,
-
-Registering
------------
-
-::
-
- $app->register(new Silex\Extension\HttpCacheExtension(), array(
- 'http_cache.cache_dir' => __DIR__.'/cache/',
- ));
-
-Usage
------
-
-Silex already supports any Reverse Proxy like Varnish out of the box by
-setting Response HTTP cache headers::
-
- $app->get('/', function() {
- return new Response('Foo', 200, array(
- 'Cache-Control' => 's-maxage=5',
- ));
- });
-
-This extension allows you to use the Symfony2 reverse proxy natively with
-Silex applications by using the `http_cache` service::
-
- $app['http_cache']->run();
-
-The extension also provide ESI support::
-
- $app->get('/', function() {
- return new Response(<<<EOF
- <html>
- <body>
- Hello
- <esi:include src="/included" />
- </body>
- </html>
-
- EOF
- , 200, array(
- 'Cache-Control' => 's-maxage=20',
- 'Surrogate-Control' => 'content="ESI/1.0"',
- ));
- });
-
- $app->get('/included', function() {
- return new Response('Foo', 200, array(
- 'Cache-Control' => 's-maxage=5',
- ));
- });
-
- $app['http_cache']->run();
-
-For more information, consult the `Symfony2 HTTP Cache documentation
-<http://symfony.com/doc/current/book/http_cache.html>`_.
View
14 vendor/silex/doc/extensions/index.rst
@@ -1,14 +0,0 @@
-Silex
-=====
-
-.. toctree::
- :maxdepth: 1
-
- doctrine
- monolog
- session
- translation
- twig
- url_generator
- validator
- http_cache
View
54 vendor/silex/doc/extensions/monolog.rst
@@ -1,54 +0,0 @@
-MonologExtension
-================
-
-The *MonologExtension* provides a default logging mechanism
-through Jordi Boggiano's `Monolog <https://github.com/Seldaek/monolog>`_
-library.
-
-It will log requests and errors and allow you to add debug
-logging to your application, so you don't have to use
-``var_dump`` so much anymore. You can use the grown-up
-version called ``tail -f``.
-
-Parameters
-----------
-
-* **monolog.logfile**: File where logs are written to.
-
-* **monolog.class_path** (optional): Path to where the
- Monolog library is located.
-
-* **monolog.level** (optional): Level of logging defaults
- to ``DEBUG``. Must be one of ``Logger::DEBUG``, ``Logger::INFO``,
- ``Logger::WARNING``, ``Logger::ERROR``. ``DEBUG`` will log
- everything, ``INFO`` will log everything except ``DEBUG``,
- etc.
-
-* **monolog.name** (optional): Name of the monolog channel,
- defaults to ``myapp``.
-
-Services
---------
-
-* **monolog**: The monolog logger instance.
-
- Example usage::
-
- $app['monolog']->addDebug('Testing the Monolog logging.');
-
-* **monolog.configure**: Protected closure that takes the
- logger as an argument. You can override it if you do not
- want the default behavior.
-
-Registering
------------
-
-Make sure you place a copy of *Monolog* in the ``vendor/monolog``
-directory.
-
-::
-
- $app->register(new Silex\Extension\MonologExtension(), array(
- 'monolog.logfile' => __DIR__.'/development.log',
- 'monolog.class_path' => __DIR__.'/vendor/monolog/src',
- ));
View
72 vendor/silex/doc/extensions/session.rst
@@ -1,72 +0,0 @@
-SessionExtension
-================
-
-The *SessionExtension* provides a service for storing data persistently
-between requests.
-
-Parameters
-----------
-
-* **session.storage.options**: An array of options that is passed to the
- constructor of the ``session.storage`` service.
-
- In case of the default ``NativeSessionStorage``, the possible options are:
-
- * **name**: The cookie name (_SESS by default)
- * **id**: The session id (null by default)
- * **lifetime**: Cookie lifetime
- * **path**: Cookie path
- * **domain**: Cookie domain
- * **secure**: Cookie secure (HTTPS)
- * **httponly**: Whether the cookie is http only
-
- However, all of these are optional. Sessions last as long as the browser
- is open. To override this, set the ``lifetime`` option.
-
-Services
---------
-
-* **session**: An instance of Symfony2's `Session
- <http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Session.html>`_.
-
-* **session.storage**: A service that is used for persistence of the
- session data. Defaults to a `NativeSessionStorage
- <http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/SessionStorage/NativeSessionStorage.html>`_.
-
-Registering
------------
-
-::
-
- $app->register(new Silex\Extension\SessionExtension());
-
-Usage
------
-
-The Session extension provides a ``session`` service. Here is an
-example that authenticates a user and creates a session for him::
-
- use Symfony\Component\HttpFoundation\Response;
-
- $app->get('/login', function () use ($app) {
- $username = $app['request']->server->get('PHP_AUTH_USER', false);
- $password = $app['request']->server->get('PHP_AUTH_PW');
-
- if ('igor' === $username && 'password' === $password) {
- $app['session']->set('user', array('username' => $username));
- return $app->redirect('/account');
- }
-
- $response = new Response();
- $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', 'site_login'));
- $response->setStatusCode(401, 'Please sign in.');
- return $response;
- });
-
- $app->get('/account', function () use ($app) {
- if (null === $user = $app['session']->get('user')) {
- return $app->redirect('/login');
- }
-
- return "Welcome {$user['username']}!";
- });
View
132 vendor/silex/doc/extensions/translation.rst
@@ -1,132 +0,0 @@
-TranslationExtension
-=====================
-
-The *TranslationExtension* provides a service for translating your application
-into different languages.
-
-Parameters
-----------
-
-* **translator.messages**: A mapping of locales to message arrays. This parameter
- contains the translation data in all languages.
-
-* **locale** (optional): The locale for the translator. You will most likely want
- to set this based on some request parameter. Defaults to ``en``.
-
-* **locale_fallback** (optional): Fallback locale for the translator. It will
- be used when the current locale has no messages set.
-
-* **translation.class_path** (optional): Path to where
- the Symfony2 Translation component is located.
-
-Services
---------
-
-* **translator**: An instance of `Translator
- <http://api.symfony.com/2.0/Symfony/Component/Translation/Translator.html>`_,
- that is used for translation.
-
-* **translator.loader**: An instance of an implementation of the translation
- `LoaderInterface <http://api.symfony.com/2.0/Symfony/Component/Translation/Loader/LoaderInterface.html>`_,
- defaults to an `ArrayLoader
- <http://api.symfony.com/2.0/Symfony/Component/Translation/Loader/ArrayLoader.html>`_.
-
-* **translator.message_selector**: An instance of `MessageSelector
- <http://api.symfony.com/2.0/Symfony/Component/Translation/MessageSelector.html>`_.
-
-Registering
------------
-
-Make sure you place a copy of the Symfony2 Translation component in
-``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor.
-
-::
-
- $app->register(new Silex\Extension\TranslationExtension(), array(
- 'locale_fallback' => 'en',
- 'translation.class_path' => __DIR__.'/vendor/symfony/src',
- ));
-
-Usage
------
-
-The Translation extension provides a ``translator`` service and makes use of
-the ``translator.messages`` parameter.
-
-::
-
- $app['translator.messages'] = array(
- 'en' => array(
- 'hello' => 'Hello %name%',
- 'goodbye' => 'Goodbye %name%',
- ),
- 'de' => array(
- 'hello' => 'Hallo %name%',
- 'goodbye' => 'Tschüss %name%',
- ),
- 'fr' => array(
- 'hello' => 'Bonjour %name%',
- 'goodbye' => 'Au revoir %name%',
- ),
- );
-
- $app->before(function () use ($app) {
- if ($locale = $app['request']->get('locale')) {
- $app['locale'] = $locale;
- }
- });
-
- $app->get('/{locale}/{message}/{name}', function ($message, $name) use ($app) {
- return $app['translator']->trans($message, array('%name%' => $name));
- });
-
-The above example will result in following routes:
-
-* ``/en/hello/igor`` will return ``Hello igor``.
-
-* ``/de/hello/igor`` will return ``Hallo igor``.
-
-* ``/fr/hello/igor`` will return ``Bonjour igor``.
-
-* ``/it/hello/igor`` will return ``Hello igor`` (because of the fallback).
-
-Recipes
--------
-
-YAML-based language files
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Having your translation in PHP files can be inconvenient. This recipe will
-show you how to load translations from external YAML files.
-
-First you will need the ``Config`` and ``Yaml`` components from Symfony2. Also
-make sure you register them with the autoloader. You can just clone the entire
-Symfony2 repository into ``vendor/symfony``.
-
-::
-
- $app['autoloader']->registerNamespace('Symfony', __DIR__.'/vendor/symfony/src');
-
-Next, you have to create the language mappings in YAML files. A naming you can
-use is ``locales/en.yml``. Just do the mapping in this file as follows:
-
-.. code-block:: yaml
-
- hello: Hello %name%
- goodbye: Goodbye %name%
-
-Repeat this for all of your languages. Then set up the ``translator.messages`` to map
-languages to files::
-
- $app['translator.messages'] = array(
- 'en' => __DIR__.'/locales/en.yml',
- 'de' => __DIR__.'/locales/de.yml',
- 'fr' => __DIR__.'/locales/fr.yml',
- );
-
-Finally override the ``translator.loader`` to use a ``YamlFileLoader`` instead of the
-default ``ArrayLoader``::
-
- $app['translator.loader'] = new Symfony\Component\Translation\Loader\YamlFileLoader();
-
-And that's all you need to load translations from YAML files.
View
78 vendor/silex/doc/extensions/twig.rst
@@ -1,78 +0,0 @@
-TwigExtension
-=============
-
-The *TwigExtension* provides integration with the `Twig
-<http://www.twig-project.org/>`_ template engine.
-
-Parameters
-----------
-
-* **twig.path**: Path to the directory containing twig template
- files.
-
-* **twig.templates** (optional): If this option is provided
- you don't have to provide a ``twig.path``. It is an
- associative array of template names to template contents.
- Use this if you want to define your templates inline.
-
-* **twig.options** (optional): An associative array of twig
- options. Check out the twig documentation for more information.
-
-* **twig.class_path** (optional): Path to where the Twig
- library is located.
-
-Services
---------
-
-* **twig**: The ``Twig_Environment`` instance. The main way of
- interacting with Twig.
-
-* **twig.configure**: Protected closure that takes the Twig
- environment as an argument. You can use it to add more
- custom globals.
-
-* **twig.loader**: The loader for Twig templates which uses
- the ``twig.path`` and the ``twig.templates`` options. You
- can also replace the loader completely.
-
-Registering
------------
-
-Make sure you place a copy of *Twig* in the ``vendor/twig``
-directory.
-
-::
-
- $app->register(new Silex\Extension\TwigExtension(), array(
- 'twig.path' => __DIR__.'/views',
- 'twig.class_path' => __DIR__.'/vendor/twig/lib',
- ));
-
-.. note::
-
- Twig is not compiled into the ``silex.phar`` file. You have to
- add your own copy of Twig to your application.
-
-Usage
------
-
-The Twig extension provides a ``twig`` service.
-
-::
-
- $app->get('/hello/{name}', function ($name) use ($app) {
- return $app['twig']->render('hello.twig', array(
- 'name' => $name,
- ));
- });
-
-This will render a file named ``views/hello.twig``.
-
-It also registers the application as a global named
-``app``. So you can access any services from within your
-view. For example to access ``$app['request']->getHost()``,
-just put this in your template:
-
-.. code-block:: jinja
-
- {{ app.request.host }}
View
51 vendor/silex/doc/extensions/url_generator.rst
@@ -1,51 +0,0 @@
-UrlGeneratorExtension
-=====================
-
-The *UrlGeneratorExtension* provides a service for generating
-URLs for named routes.
-
-Parameters
-----------
-
-None.
-
-Services
---------
-
-* **url_generator**: An instance of `UrlGenerator
- <http://api.symfony.com/2.0/Symfony/Component/Routing/Generator/UrlGenerator.html>`_,
- using the `RouteCollection
- <http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
- that is provided through the ``routes`` service.
- It has a ``generate`` method, which takes the route name as an argument,
- followed by an array of route parameters.
-
-Registering
------------
-
-::
-
- $app->register(new Silex\Extension\UrlGeneratorExtension());
-
-Usage
------
-
-The UrlGenerator extension provides a ``url_generator`` service.
-
-::
-
- $app->get('/', function () {
- return 'welcome to the homepage';
- })
- ->bind('homepage');
-
- $app->get('/hello/{name}', function ($name) {
- return "Hello $name!";
- })
- ->bind('hello');
-
- $app->get('/navigation', function () use ($app) {
- return '<a href="'.$app['url_generator']->generate('homepage').'">Home</a>'.
- ' | '.
- '<a href="'.$app['url_generator']->generate('hello', array('name' => 'Igor')).'">Hello Igor</a>';
- });
View
104 vendor/silex/doc/extensions/validator.rst
@@ -1,104 +0,0 @@
-ValidatorExtension
-=====================
-
-The *ValidatorExtension* provides a service for validating data. It is
-most useful when used with the *FormExtension*, but can also be used
-standalone.
-
-Parameters
-----------
-
-* **validator.class_path** (optional): Path to where
- the Symfony2 Validator component is located.
-
-Services
---------
-
-* **validator**: An instance of `Validator
- <http://api.symfony.com/2.0/Symfony/Component/Validator/Validator.html>`_.
-
-* **validator.mapping.class_metadata_factory**: Factory for metadata loaders,
- which can read validation constraint information from classes. Defaults to
- StaticMethodLoader--ClassMetadataFactory.
-
- This means you can define a static ``loadValidatorMetadata`` method on your
- data class, which takes a ClassMetadata argument. Then you can set
- constraints on this ClassMetadata instance.
-
-* **validator.validator_factory**: Factory for ConstraintValidators. Defaults
- to a standard ``ConstraintValidatorFactory``. Mostly used internally by the
- Validator.
-
-Registering
------------
-
-Make sure you place a copy of the Symfony2 Validator component in
-``vendor/symfony/src``. You can simply clone the whole Symfony2 into vendor.
-
-::
-
- $app->register(new Silex\Extension\ValidatorExtension(), array(
- 'validator.class_path' => __DIR__.'/vendor/symfony/src',
- ));
-
-Usage
------
-
-The Validator extension provides a ``validator`` service.
-
-Validating values
-~~~~~~~~~~~~~~~~~
-
-You can validate values directly using the ``validateValue`` validator method.
-
-::
-
- use Symfony\Component\Validator\Constraints;
-
- $app->get('/validate-url', function () use ($app) {
- $violations = $app['validator']->validateValue($app['request']->get('url'), new Constraints\Url());
- return $violations;
- });
-
-This is relatively limited.
-
-Validating object properties
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-If you want to add validations to a class, you can implement a static
-``loadValidatorMetadata`` method as described under *Services*. This allows
-you to define constraints for your object properties. It also works with
-getters.
-
-::
-
- use Symfony\Component\Validator\Mapping\ClassMetadata;
- use Symfony\Component\Validator\Constraints;
-
- class Post
- {
- public $title;
- public $body;
-
- static public function loadValidatorMetadata(ClassMetadata $metadata)
- {
- $metadata->addPropertyConstraint('title', new Constraints\NotNull());
- $metadata->addPropertyConstraint('title', new Constraints\NotBlank());
- $metadata->addPropertyConstraint('body', new Constraints\MinLength(array('limit' => 10)));
- }
- }
-
- $app->post('/posts/new', function () use ($app) {
- $post = new Post();
- $post->title = $app['request']->get('title');
- $post->body = $app['request']->get('body');
-
- $violations = $app['validator']->validate($post);
- return $violations;
- });
-
-You will have to handle the display of these violations yourself. You can
-however use the *FormExtension* which can make use of the *ValidatorExtension*.
-
-For more information, consult the `Symfony2 Validation documentation
-<http://symfony.com/doc/2.0/book/validation.html>`_.
View
14 vendor/silex/doc/index.rst
@@ -1,14 +0,0 @@
-Silex
-=====
-
-.. toctree::
- :maxdepth: 1
-
- intro
- usage
- services
- extensions
- testing
- internals
- contributing
- extensions/index
View
91 vendor/silex/doc/internals.rst
@@ -1,91 +0,0 @@
-Internals
-=========
-
-This chapter will tell you a bit about how Silex works
-internally.
-
-Silex
------
-
-Application
-~~~~~~~~~~~
-
-The application is the main interface to Silex. It
-implements Symfony2's `HttpKernelInterface
-<http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpKernelInterface.html>`_,
-so you can pass a `Request
-<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_
-to the ``handle`` method and it will return a `Response
-<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html>`_.
-
-It extends the ``Pimple`` service container, allowing
-for flexibility on the outside as well as the inside. you
-could replace any service, and you are also able to read
-them.
-
-The application makes strong use of the `EventDispatcher
-<http://api.symfony.com/2.0/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
-to hook into the Symfony2 HttpKernel events. This allows
-fetching the ``Request``, converting string responses into
-``Response`` objects and handling Exceptions. We also use it
-to dispatch some custom events like before/after filters and
-errors.
-
-Controller
-~~~~~~~~~~
-
-The Symfony2 `Route
-<http://api.symfony.com/2.0/Symfony/Component/Routing/Route.html>`_
-is actually quite powerful. Routes
-can be named, which allows for URL generation. They can
-also have requirements for the variable parts. In order
-to allow settings these through a nice interface the
-``match`` method (which is used by ``get``, ``post``, etc.)
-returns an instance of the ``Controller``, which wraps
-a route.
-
-ControllerCollection
-~~~~~~~~~~~~~~~~~~~~
-
-One of the goals of exposing the `RouteCollection
-<http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
-was to make it mutable, so extensions could add stuff to it.
-The challenge here is the fact that routes know nothing
-about their name. The name only has meaning in context
-of the ``RouteCollection`` and cannot be changed.
-
-To solve this challenge we came up with a staging area
-for routes. The ``ControllerCollection`` holds the
-controllers until ``flush`` is called, at which point
-the routes are added to the ``RouteCollection``. Also,
-the controllers are then frozen. This means that they can
-no longer be modified and will throw an Exception if
-you try to do so.
-
-Unfortunately no good way for flushing implicitly
-could be found, which is why flushing is now always
-explicit. The Application will flush, but if you want
-to read the ``ControllerCollection`` before the
-request takes place, you will have to call flush
-yourself.
-
-The ``Application`` provides a shortcut ``flush``
-method for flushing the ``ControllerCollection``.
-
-Symfony2
---------
-
-Following Symfony2 components are used by Silex:
-
-* **ClassLoader**: For autoloading classes.
-
-* **HttpFoundation**: For ``Request`` and ``Response``.
-
-* **HttpKernel**: Because we need a heart.
-
-* **Routing**: For matching defined routes.
-
-* **EventDispatcher**: For hooking into the HttpKernel.
-
-For more information, `check out the Symfony website
-<http://symfony.com/>`_.
View
47 vendor/silex/doc/intro.rst
@@ -1,47 +0,0 @@
-Introduction
-============
-
-Silex is a PHP microframework for PHP 5.3. It is built on the shoulders
-of Symfony2 and Pimple and also inspired by sinatra.
-
-A microframework provides the guts for building simple single-file apps.
-Silex aims to be:
-
-* *Concise*: Silex exposes a intuitive and concise API that is fun to use.
-
-* *Extensible*: Silex has an extension system based around the Pimple
- micro service-container that makes it even easier to tie in third party
- libraries.
-
-* *Testable*: Silex uses Symfony2's HttpKernel which abstracts request and
- response. This makes it very easy to test apps and the framework itself.
- It also respects the HTTP specification and encourages its proper use.
-
-In a nutshell, you define controllers and map them to routes, all in one
-step.
-
-**Let's go!** ::
-
- require_once __DIR__.'/silex.phar';
-
- $app = new Silex\Application();
-
- $app->get('/hello/{name}', function ($name) use ($app) {
- return 'Hello '.$app->escape($name);
- });
-
- $app->run();
-
-All that is needed to get access to the Framework is to include
-``silex.phar``. This phar (PHP Archive) file will take care of the rest.
-
-Next we define a route to ``/hello/{name}`` that matches for ``GET``
-requests. When the route matches, the function is executed and the return
-value is sent back to the client.
-
-Finally, the app is run. It's really that easy!
-
-Installing Silex is as easy as it can get. Download the `silex.phar`_ file
-and you're done!
-
-.. _silex.phar: http://silex-project.org/get/silex.phar
View
264 vendor/silex/doc/services.rst
@@ -1,264 +0,0 @@
-Services
-========
-
-Silex is not only a microframework. It is also a micro service container.
-It does this by extending `Pimple <https://github.com/fabpot/Pimple>`_
-which provides service goodness in just 44 NCLOC.
-
-Dependency Injection
---------------------
-
-.. note::
-
- You can skip this if you already know what Dependency Injection is.
-
-Dependency Injection is a design pattern where you pass dependencies
-to services instead of creating them from within the service or
-relying on globals. This generally leads to code that is decoupled,
-re-usable, flexible and testable.
-
-Here is an example of a class that takes a ``User`` object and stores
-it as a file in JSON format::
-
- class JsonUserPersister
- {
- private $basePath;
-
- public function __construct($basePath)
- {
- $this->basePath = $basePath;
- }
-
- public function persist(User $user)
- {
- $data = $user->getAttributes();
- $json = json_encode($data);
- $filename = $this->basePath.'/'.$user->id.'.json';
- file_put_contents($filename, $json, LOCK_EX);
- }
- }
-
-In this simple example the dependency is the ``basePath`` property.
-It is passed to the constructor. This means you can create several
-independent instances with different base paths. Of course
-dependencies do not have to be simple strings. More often they are
-in fact other services.
-
-Container
-~~~~~~~~~
-
-A DI or service container is responsible for creating and storing
-services. It can recursively create dependencies of the requested
-services and inject them. It does so lazily, which means a service
-is only created when you actually need it.
-
-Most containers are quite complex and are configured through XML
-or YAML files.
-
-Pimple is different.
-
-Pimple
-------
-
-Pimple is probably the simplest service container out there. It
-makes strong use of closures implements the ArrayAccess interface.
-
-We will start off by creating a new instance of Pimple -- and
-because ``Silex\Application`` extends ``Pimple`` all of this
-applies to Silex as well. ::
-
- $container = new Pimple();
-
-or ::
-
- $app = new Silex\Application();
-
-Parameters
-~~~~~~~~~~
-
-You can set parameters (which are usually strings) by setting
-an array key on the container::
-
- $app['some_parameter'] = 'value';
-
-The array key can be anything, by convention periods are
-used for namespacing. ::
-
- $app['asset.host'] = 'http://cdn.mysite.com/';
-
-Reading parameter values is possible with the same
-syntax. ::
-
- echo $app['some_parameter'];
-
-Service definitions
-~~~~~~~~~~~~~~~~~~~
-
-Defining services is no different than defining parameters.
-You just set an array key on the container to be a closure.
-However, when you retrieve the service, the closure is executed.
-This allows for lazy service creation.
-
-::
-
- $app['some_service'] = function () {
- return new Service();
- };
-
-And to retrieve the service, use::
-
- $service = $app['some_service'];
-
-Every time you call ``$app['some_service']``, a new instance
-of the service is created.
-
-Shared services
-~~~~~~~~~~~~~~~
-
-You may want to use the same instance of a service across all
-of your code. In order to do that you can make a *shared*
-service. ::
-
- $app['some_service'] = $app->share(function () {
- return new Service();
- });
-
-This will create the service on first invocation, and then
-return the existing instance on any subsequent access.
-
-Access container from closure
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In many cases you will want to access the service container
-from within a service definition closure. For example when
-fetching services the current service depends on.
-
-Because of this, the container is passed to the closure as
-an argument. ::
-
- $app['some_service'] = function ($app) {
- return new Service($app['some_other_service'], $app['some_service.config']);
- };
-
-Here you can see an example of Dependency Injection.
-``some_service`` depends on ``some_other_service`` and
-takes ``some_service.config`` as configuration options.
-The dependency is only created when ``some_service`` is
-accessed, and it is possible to replace either of the
-dependencies by simply overriding those definitions.
-
-.. note::
-
- This also works for shared services.
-
-Protected closures
-~~~~~~~~~~~~~~~~~~
-
-Because the container sees closures as factories for
-services, it will always execute them when reading them.
-
-In some cases you will however want to store a closure
-as a parameter, so that you can fetch it and execute it
-yourself -- with your own arguments.
-
-This is why Pimple allows you to protect your closures
-from being executed, by using the ``protect`` method.
-
-::
-
- $app['closure_parameter'] = $app->protect(function ($a, $b) {
- return $a + $b;
- });
-
- // will not execute the closure
- $add = $app['closure_parameter'];
-
- // calling it now
- echo $add(2, 3);
-
-Note that protected closures do not get access to
-the container.
-
-Core services
--------------
-
-Silex defines a range of services which can be used
-or replaced. You probably don't want to mess with most
-of them.
-
-* **request**: Contains the current request object,
- which is an instance of `Request
- <http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_.
- It gives you access to ``GET``, ``POST`` parameters
- and lots more!
-
- Example usage::
-
- $id = $app['request']->get('id');
-
- This is only available when a request is being served, you can only access it
- from within a controller, before filter, after filter or error handler.
-
-* **autoloader**: This service provides you with a
- `UniversalClassLoader
- <http://api.symfony.com/2.0/Symfony/Component/ClassLoader/UniversalClassLoader.html>`_
- that is already registered. You can register prefixes
- and namespaces on it.
-
- Example usage, autoloads Twig classes::
-
- $app['autoloader']->registerPrefix('Twig_', $app['twig.class_path']);
-
- For more information, check out the `Symfony autoloader documentation
- <http://symfony.com/doc/2.0/cookbook/tools/autoloader.html>`_.
-
-* **routes**: The `RouteCollection
- <http://api.symfony.com/2.0/Symfony/Component/Routing/RouteCollection.html>`_
- that is used internally. You can add, modify, read
- routes.
-
-* **controllers**: The ``Silex\ControllerCollection``
- that is used internally. Check the *Internals*
- chapter for more information.
-
-* **dispatcher**: The `EventDispatcher
- <http://api.symfony.com/2.0/Symfony/Component/EventDispatcher/EventDispatcher.html>`_
- that is used internally. It is the core of the Symfony2
- system and is used quite a bit by Silex.
-
-* **resolver**: The `ControllerResolver
- <http://api.symfony.com/2.0/Symfony/Component/HttpKernel/Controller/ControllerResolver.html>`_
- that is used internally. It takes care of executing the
- controller with the right arguments.
-
-* **kernel**: The `HttpKernel
- <http://api.symfony.com/2.0/Symfony/Component/HttpKernel/HttpKernel.html>`_
- that is used internally. The HttpKernel is the heart of
- Symfony2, it takes a Request as input and returns a
- Response as output.
-
-* **request_context**: The request context is a simplified representation
- of the request that is used by the Router and the UrlGenerator.
-
-.. note::
-
- All of these Silex core services are shared.
-
-Core parameters
----------------
-
-* **request.http_port** (optional): Allows you to override the default port
- for non-HTTPS URLs. If the current request is HTTP, it will always use the
- current port.
-
- Defaults to 80.
-
- This parameter can be used by the ``UrlGeneratorExtension``.
-
-* **request.https_port** (optional): Allows you to override the default port
- for HTTPS URLs. If the current request is HTTPS, it will always use the
- current port.
-
- Defaults to 443.
-
- This parameter can be used by the ``UrlGeneratorExtension``.
View
185 vendor/silex/doc/testing.rst
@@ -1,185 +0,0 @@
-Testing
-=======
-
-Because Silex is built on top of Symfony2, it is very easy to write functional
-tests for your application. Functional tests are automated software tests that
-ensure that your code is working correctly. They go through the user interface,
-using a fake browser, and mimic the actions a user would do.
-
-Why
----
-
-If you are not familiar with software tests, you may be wondering why you would
-need this. Every time you make a change to your application, you have to test
-it. This means going through all the pages and making sure they are still
-working. Functional tests save you a lot of time, because they enable you to
-test your application in usually under a second by running a single command.
-
-For more information on functional testing, unit testing, and automated
-software tests in general, check out `PHPUnit <https://github.com/sebastianbergmann/phpunit>`_
-and `Bulat Shakirzyanov's talk on Clean Code <http://www.slideshare.net/avalanche123/clean-code-5609451>`_.
-
-PHPUnit
--------
-
-`PHPUnit <https://github.com/sebastianbergmann/phpunit>`_
-is the de-facto standard testing framework for PHP. It was built for
-writing unit tests, but it can be used for functional tests too. You write
-tests by creating a new class, that extends the ``PHPUnit_Framework_TestCase``.
-Your test cases are methods prefixed with ``test``.
-
-::
-
- class ContactFormTest extends PHPUnit_Framework_TestCase
- {
- public function testInitialPage()
- {
- ...
- }
- }
-
-In your test cases, you do assertions on the state of what you are testing. In
-this case we are testing a contact form, so we would want to assert that the
-page loaded correctly and contains our form.
-
-::
-
- public function testInitialPage()
- {
- $statusCode = ...
- $pageContent = ...
-
- $this->assertEquals(200, $statusCode);
- $this->assertContains('Contact us', $pageContent);
- $this->assertContains('<form', $pageContent);
- }
-
-Here you see some of the available assertions. There is a full list available
-in the `Writing Tests for PHPUnit
-<http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html>`_
-section of the PHPUnit documentation.
-
-WebTestCase
------------
-
-Symfony2 provides a WebTestCase class that can be used to write functional
-tests. The Silex version of this class is ``Silex\WebTestCase``, and you can
-use it by making your test extend it::
-
- use Silex\WebTestCase;
-
- class ContactFormTest extends WebTestCase
- {
- ...
- }
-
-.. note::
-
- To make your application testable, you need to make sure you follow "Reusing
- applications" instructions from :doc:`usage`.
-
-For your WebTestCase, you will have to implement a ``createApplication``
-method, which returns your application. It will probably look like this::
-
- public function createApplication()
- {
- return require __DIR__.'/path/to/app.php';
- }
-
-Make sure you do **not** use ``require_once`` here, as this method will be
-executed before every test.
-
-The WebTestCase provides a ``createClient`` method. A client acts as a browser,
-and allows you to interact with your application. Here's how it works::
-
- public function testInitialPage()
- {
- $client = $this->createClient();
- $crawler = $client->request('GET', '/');
-
- $this->assertTrue($client->getResponse()->isOk());
- $this->assertEquals(1, count($crawler->filter('h1:contains("Contact us")')));
- $this->assertEquals(1, count($crawler->filter('form')));
- ...
- }
-
-There are several things going on here. You have both a ``Client`` and a
-``Crawler``.
-
-You can also access the application through ``$this->app``.
-
-Client
-------
-
-The client represents a browser. It holds your browsing history, cookies and
-more. The ``request`` method allows you to make a request to a page on your
-application.
-
-.. note::
-
- You can find some documentation for it in `the client section of the testing
- chapter of the Symfony2 documentation
- <http://symfony.com/doc/current/book/testing.html#the-test-client>`_.
-
-Crawler
--------
-
-The crawler allows you to inspect the content of a page. You can filter it
-using CSS expressions and lots more.
-
-.. note::
-
- You can find some documentation for it in `the crawler section of the testing
- chapter of the Symfony2 documentation
- <http://symfony.com/doc/current/book/testing.html#the-test-client>`_.
-
-Configuration
--------------
-
-The suggested way to configure PHPUnit is to create a ``phpunit.xml.dist``
-file, a ``tests`` folder and your tests in ``tests/YourApp/Tests/YourTest.php``.
-The ``phpunit.xml.dist`` file should look like this:
-
-.. code-block:: xml
-
- <?xml version="1.0" encoding="UTF-8"?>
- <phpunit backupGlobals="false"
- backupStaticAttributes="false"
- colors="true"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- processIsolation="false"
- stopOnFailure="false"
- syntaxCheck="false"
- >
- <testsuites>
- <testsuite name="YourApp Test Suite">
- <directory>./tests/</directory>
- </testsuite>
- </testsuites>
- </phpunit>
-
-You can also configure a bootstrap file for autoloading and whitelisting for
-code coverage reports.
-
-Your ``tests/YourApp/Tests/YourTest.php`` should look like this::
-
- namespace YourApp\Tests;
-
- use Silex\WebTestCase;
-
- class YourTest extends WebTestCase
- {
- public function createApplication()
- {
- return require __DIR__.'/../../../app.php';
- }
-
- public function testFooBar()
- {
- ...
- }
- }
-
-Now, when running ``phpunit`` on the command line, your tests should run.
View
583 vendor/silex/doc/usage.rst
@@ -1,583 +0,0 @@
-Usage
-=====
-
-This chapter describes how to use Silex.
-
-Bootstrap
----------
-
-To include the Silex all you need to do is require the ``silex.phar``
-file and create an instance of ``Silex\Application``. After your
-controller definitions, call the ``run`` method on your application.
-
-::
-
- require_once __DIR__.'/silex.phar';
-
- $app = new Silex\Application();
-
- // definitions
-
- $app->run();
-
-One other thing you have to do is configure your web server. If you
-are using apache you can use a ``.htaccess`` file for this.
-
-.. code-block:: apache
-
- <IfModule mod_rewrite.c>
- Options -MultiViews
-
- RewriteEngine On
- #RewriteBase /path/to/app
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*)$ index.php [QSA,L]
- </IfModule>
-
-.. note::
-
- If your site is not at the webroot level you will have to uncomment the
- ``RewriteBase`` statement and adjust the path to point to your directory,
- relative from the webroot.
-
-Routing
--------
-
-In Silex you define a route and the controller that is called when that
-route is matched
-
-A route pattern consists of:
-
-* *Pattern*: The route pattern defines a path that points to a resource.
- The pattern can include variable parts and you are able to set
- RegExp requirements for them.
-
-* *Method*: One of the following HTTP methods: ``GET``, ``POST``, ``PUT``
- ``DELETE``. This describes the interaction with the resource. Commonly
- only ``GET`` and ``POST`` are used, but it is possible to use the
- others as well.
-
-The controller is defined using a closure like this::
-
- function () {
- // do something
- }
-
-Closures are anonymous functions that may import state from outside
-of their definition. This is different from globals, because the outer
-state does not have to be global. For instance, you could define a
-closure in a function and import local variables of that function.
-
-.. note::
-
- Closures that do not import scope are referred to as lambdas.
- Because in PHP all anonymous functions are instances of the
- ``Closure`` class, we will not make a distinction here.
-
-The return value of the closure becomes the content of the page.
-
-There is also an alternate way for defining controllers using a
-class method. The syntax for that is ``ClassName::methodName``.
-Static methods are also possible.
-
-Example GET route
-~~~~~~~~~~~~~~~~~
-
-Here is an example definition of a ``GET`` route::
-
- $blogPosts = array(
- 1 => array(
- 'date' => '2011-03-29',
- 'author' => 'igorw',
- 'title' => 'Using Silex',
- 'body' => '...',
- ),
- );
-
- $app->get('/blog', function () use ($blogPosts) {
- $output = '';
- foreach ($blogPosts as $post) {
- $output .= $post['title'];
- $output .= '<br />';
- }
-
- return $output;
- });
-
-Visiting ``/blog`` will return a list of blog post titles. The ``use``
-statement means something different in this context. It tells the
-closure to import the $blogPosts variable from the outer scope. This
-allows you to use it from within the closure.
-
-Dynamic routing
-~~~~~~~~~~~~~~~
-
-Now, you can create another controller for viewing individual blog
-posts::
-
- use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-
- $app->get('/blog/show/{id}', function ($id) use ($blogPosts) {
- if (!isset($blogPosts[$id])) {
- throw new NotFoundHttpException();
- }
-
- $post = $blogPosts[$id];
-
- return "<h1>{$post['title']}</h1>".
- "<p>{$post['body']}</p>";
- });
-
-This route definition has a variable ``{id}`` part which is passed
-to the closure.
-
-As you can see, we are throwing a ``NotFoundHttpException`` if the
-post does not exist. We will see how to handle this later on.
-
-Example POST route
-~~~~~~~~~~~~~~~~~~
-
-POST routes signify the creation of a resource. An example for this is a
-feedback form. We will use `Swift Mailer
-<http://swiftmailer.org/>`_ and assume a copy of it to be present in the
-``vendor/swiftmailer`` directory.
-
-::
-
- require_once __DIR__.'/vendor/swiftmailer/lib/swift_required.php';
-
- use Symfony\Component\HttpFoundation\Response;
-
- $app->post('/feedback', function () use ($app) {
- $request = $app['request'];
-
- $message = \Swift_Message::newInstance()
- ->setSubject('[YourSite] Feedback')
- ->setFrom(array('noreply@yoursite.com'))
- ->setTo(array('feedback@yoursite.com'))
- ->setBody($request->get('message'));
-
- $transport = \Swift_MailTransport::newInstance();
- $mailer = \Swift_Mailer::newInstance($transport);
- $mailer->send($message);
-
- return new Response('Thank you for your feedback!', 201);
- });
-
-It is pretty straight forward. We include the Swift Mailer library,
-set up a message and send that message.
-
-The current ``request`` service is retrieved using the array key syntax.
-You can find more information about services in the *Services* chapter.
-The request is an instance of `Request
-<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html>`_,
-so you can fetch variables using the request's ``get`` method.
-
-Instead of returning a string we are returning an instance of
-`Response
-<http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Response.html>`_.
-This allows setting an HTTP
-status code, in this case it is set to ``201 Created``.
-
-.. note::
-
- Silex always uses a ``Response`` internally, it converts strings to
- responses with status code ``200 Ok``.
-
-Other methods
-~~~~~~~~~~~~~
-
-You can create controllers for most HTTP methods. Just call one of these
-methods on your application: ``get``, ``post``, ``put``, ``delete``. You
-can also call ``match``, which will match all methods.
-
-::
-
- $app->put('/blog', function () {
- ...
- });
-
-.. note::
-
- The order in which the routes are defined is significant. The first
- matching route will be used, so place more generic routes at the bottom.
-
-Route variables
-~~~~~~~~~~~~~~~
-
-As has been show before you can define variable parts in a route like this::
-
- $app->get('/blog/show/{id}', function ($id) {
- ...
- });
-
-It is also possible to have more than one variable part, just make sure the
-closure arguments match the names of the variable parts.
-
-::
-
- $app->get('/blog/show/{postId}/{commentId}', function ($postId, $commentId) {
- ...
- });
-
-While it's not suggested, you could also do this (note the switched arguments)::
-
- $app->get('/blog/show/{postId}/{commentId}', function ($commentId, $postId) {
- ...
- });
-
-Route variables converters
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Before injecting the route variables into the controller, you can apply some
-converters::
-
- $app->get('/user/{id}', function ($id) {
- // ...
- })->convert('id', function ($id) { return (int) $id; });
-
-This is useful when you want to convert route variables to objects as it
-allows to reuse the conversion code across different controllers::
-
- $userProvider = function ($id) {
- return new User($id);
- };
-
- $app->get('/user/{user}', function (User $user) {
- // ...
- })->convert('user', $userProvider);
-
- $app->get('/user/{user}/edit', function (User $user) {
- // ...
- })->convert('user', $userProvider);
-
-The converter callback also receives the ``Request`` as its second argument::
-
- $callback = function ($post, Request $request) {
- return new Post($request->attributes->get('slug'));
- };
-
- $app->get('/blog/{id}/{slug}', function (Post $post) {
- // ...
- })->convert('post', $callback);
-
-Requirements
-~~~~~~~~~~~~
-
-In some cases you may want to only match certain expressions. You can define
-requirements using regular expressions by calling ``assert`` on the
-``Controller`` object, which is returned by the routing methods.
-
-The following will make sure the ``id`` argument is numeric, since ``\d+``
-matches any amount of digits::
-
- $app->get('/blog/show/{id}', function ($id) {
- ...
- })
- ->assert('id', '\d+');
-
-You can also chain these calls::
-
- $app->get('/blog/show/{postId}/{commentId}', function ($postId, $commentId) {
- ...
- })
- ->assert('postId', '\d+')
- ->assert('commentId', '\d+');
-
-Default values
-~~~~~~~~~~~~~~
-
-You can define a default value for any route variable by calling ``value`` on
-the ``Controller`` object.
-
-::
-
- $app->get('/{pageName}', function ($pageName) {
- ...
- })
- ->value('pageName', 'index');
-
-This will allow matching ``/``, in which case the ``pageName`` variable will
-have the value ``index``.
-
-Named routes
-~~~~~~~~~~~~
-
-Certain extensions (such as ``UrlGenerator``) can make use of named routes.
-By default Silex will generate a route name for you, that cannot really be
-used. You can give a route a name by calling ``bind`` on the ``Controller``
-object that is returned by the routing methods.
-
-::
-
- $app->get('/', function () {
- ...
- })
- ->bind('homepage');
-
- $app->get('/blog/show/{id}', function ($id) {
- ...
- })
- ->bind('blog_post');
-
-
-.. note::
-
- It only makes sense to name routes if you use extensions that make use
- of the ``RouteCollection``.
-
-Before and after filters
-------------------------
-
-Silex allows you to run code before and after every request. This happens
-through before and after filters. All you need to do is pass a closure::
-
- $app->before(function () {
- // set up
- });
-
- $app->after(function () {
- // tear down
- });
-
-Error handlers
---------------
-
-If some part of your code throws an exception you will want to display
-some kind of error page to the user. This is what error handlers do. You
-can also use them to do additional things, such as logging.
-
-To register an error handler, pass a closure to the ``error`` method
-which takes an ``Exception`` argument and returns a response::
-
- use Symfony\Component\HttpFoundation\Response;
-
- $app->error(function (\Exception $e) {
- return new Response('We are sorry, but something went terribly wrong.', 500);
- });
-
-You can also check for specific errors by using ``instanceof``, and handle
-them differently::
-
- use Symfony\Component\HttpFoundation\Response;
- use Symfony\Component\HttpKernel\Exception\HttpException;
- use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
-
- $app->error(function (\Exception $e) {
- if ($e instanceof NotFoundHttpException) {
- return new Response('The requested page could not be found.', 404);
- }
-
- $code = ($e instanceof HttpException) ? $e->getStatusCode() : 500;
- return new Response('We are sorry, but something went terribly wrong.', $code);
- });
-
-If you want to set up logging you can use a separate error handler for that.
-Just make sure you register it before the response error handlers, because
-once a response is returned, the following handlers are ignored.
-
-.. note::
-
- Silex ships with an extension for `Monolog <https://github.com/Seldaek/monolog>`_
- which handles logging of errors. Check out the *Extensions* chapter
- for details.
-
-Redirects
----------
-
-You can redirect to another page by returning a redirect response, which
-you can create by calling the ``redirect`` method::
-
- $app->get('/', function () use ($app) {
- return $app->redirect('/hello');
- });
-
-This will redirect from ``/`` to ``/hello``.
-
-Security
---------
-
-Make sure to protect your application against attacks.
-
-Escaping
-~~~~~~~~
-
-When outputting any user input (either route variables GET/POST variables
-obtained from the request), you will have to make sure to escape it
-correctly, to prevent Cross-Site-Scripting attacks.
-
-* **Escaping HTML**: PHP provides the ``htmlspecialchars`` function for this.
- Silex provides a shortcut ``escape`` method::
-
- $app->get('/name', function () use ($app) {
- $name = $app['request']->get('name');
- return "You provided the name {$app->escape($name)}.";
- });
-
- If you use the Twig template engine you should use its escaping or even
- auto-escaping mechanisms.
-
-* **Escaping JSON**: If you want to provide data in JSON format you should
- use the PHP ``json_encode`` function::
-
- use Symfony\Component\HttpFoundation\Response;
-
- $app->get('/name.json', function () use ($app) {
- $name = $app['request']->get('name');
- return new Response(
- json_encode(array('name' => $name)),
- 200,
- array('Content-Type' => 'application/json')
- );
- });
-
-Reusing applications
---------------------
-
-To make your applications reusable, return the ``$app`` variable instead of
-calling the ``run()`` method::
-
- // blog.php
- require_once __DIR__.'/silex.phar';
-
- $app = new Silex\Application();
-
- // define your blog app
- $app->get('/post/{id}', function ($id) { ... });
-
- // return the app instance
- return $app;
-
-Running this application can now be done like this::
-
- $app = require __DIR__.'/blog.php';
- $app->run();
-
-This pattern allows you to easily "mount" this application under any other
-one::
-
- $blog = require __DIR__.'/blog.php';
-
- $app = new Silex\Application();
- $app->mount('/blog', $blog);
-
- // define your main app
-
- $app->run();
-
-Now, blog posts are available under the ``/blog/post/{id}`` route, along side
-any other routes you might have defined.
-
-If you mount many applications, you might want to avoid the overhead of
-loading them all on each request by using the ``LazyApplication`` wrapper::
-
- $blog = new Silex\LazyApplication(__DIR__.'/blog.php');
-
-Console
--------
-
-Silex includes a lightweight console for updating to the latest
-version.
-
-To find out which version of Silex you are using, invoke ``silex.phar`` on the
-command-line with ``version`` as an argument:
-
-.. code-block:: text
-
- $ php silex.phar version
- Silex version 0a243d3 2011-04-17 14:49:31 +0200
-
-To check that your are using the latest version, run the ``check`` command:
-
-.. code-block:: text
-
- $ php silex.phar check
-
-To update ``silex.phar`` to the latest version, invoke the ``update``
-command:
-
-.. code-block:: text
-
- $ php silex.phar update
-
-This will automatically download a new ``silex.phar`` from
-``silex-project.org`` and replace the existing one.
-
-Pitfalls
---------
-
-There are some things that can go wrong. Here we will try and outline the
-most frequent ones.
-
-PHP configuration
-~~~~~~~~~~~~~~~~~
-
-Certain PHP distributions have restrictive default Phar settings. Setting
-the following may help.
-
-.. code-block:: ini
-
- phar.readonly = Off
- phar.require_hash = Off
-
-If you are on Suhosin you will also have to set this:
-
-.. code-block:: ini
-
- suhosin.executor.include.whitelist = phar
-
-Phar-Stub bug
-~~~~~~~~~~~~~
-
-Some PHP installations have a bug that throws a ``PharException`` when trying
-to include the Phar. It will also tell you that ``Silex\Application`` could not
-be found. A workaround is using the following include line::
-
- require_once 'phar://'.__DIR__.'/silex.phar/autoload.php';
-
-The exact cause of this issue could not be determined yet.
-
-ioncube loader bug
-~~~~~~~~~~~~~~~~~~
-
-Ioncube loader is an extension that can decode PHP encoded file.
-Unfortunately, old versions (prior to version 4.0.9) are not working well
-with phar archive.
-You must either upgrade Ioncube loder to version 4.0.9+ or disable it by
-commenting or removing this line in you php.ini file:
-
-.. code-block:: ini
-
- zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so
-
-
-IIS configuration
------------------
-
-If you are using the Internet Information Services from Windows, you can use
-this sample ``web.config`` file:
-
-.. code-block:: xml
-
- <?xml version="1.0"?>
- <configuration>
- <system.webServer>
- <defaultDocument>
- <files>
- <clear />
- <add value="index.php" />
- </files>
- </defaultDocument>
- <rewrite>
- <rules>
- <rule name="Silex Front Controller" stopProcessing="true">
- <match url="^(.*)$" ignoreCase="false" />
- <conditions logicalGrouping="MatchAll">
- <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
- </conditions>
- <action type="Rewrite" url="index.php" appendQueryString="true" />
- </rule>
- </rules>
- </rewrite>
- </system.webServer>
- </configuration>
View
8 vendor/silex/example.htaccess
@@ -1,8 +0,0 @@
-<IfModule mod_rewrite.c>
- Options -MultiViews
-
- RewriteEngine On
- #RewriteBase /path/to/app
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteRule ^(.*)$ index.php [QSA,L]
-</IfModule>
View
19 vendor/silex/phpunit.xml.dist
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<phpunit backupGlobals="false"
- backupStaticAttributes="false"
- colors="true"
- convertErrorsToExceptions="true"
- convertNoticesToExceptions="true"
- convertWarningsToExceptions="true"
- processIsolation="false"
- stopOnFailure="false"
- syntaxCheck="false"