├── 000-silex ├── .gitignore ├── reset.sh └── composer.json ├── classmap ├── .gitignore ├── reset.sh ├── composer.json ├── example.php └── classes.php ├── files ├── .gitignore ├── composer.json ├── example.php └── my-app-demo.php ├── psr-0 ├── .gitignore ├── reset.sh ├── composer.json ├── example.php └── src │ └── My │ └── App │ └── Demo.php ├── psr-4 ├── .gitignore ├── reset.sh ├── composer.json ├── example.php └── src │ └── Demo.php ├── 002-silex-lock-not-synced ├── .gitignore ├── reset.sh └── composer.json ├── 005-silex-vendor-tour ├── vendor │ ├── psr │ │ └── log │ │ │ ├── .gitignore │ │ │ ├── Psr │ │ │ └── Log │ │ │ │ ├── InvalidArgumentException.php │ │ │ │ ├── LoggerAwareInterface.php │ │ │ │ ├── LogLevel.php │ │ │ │ ├── LoggerAwareTrait.php │ │ │ │ └── NullLogger.php │ │ │ ├── composer.json │ │ │ ├── LICENSE │ │ │ └── README.md │ ├── pimple │ │ └── pimple │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── tests │ │ │ ├── bootstrap.php │ │ │ └── Pimple │ │ │ │ └── Tests │ │ │ │ ├── NonInvokable.php │ │ │ │ └── Service.php │ │ │ ├── phpunit.xml.dist │ │ │ ├── composer.json │ │ │ └── LICENSE │ ├── symfony │ │ ├── routing │ │ │ └── Symfony │ │ │ │ └── Component │ │ │ │ └── Routing │ │ │ │ ├── Tests │ │ │ │ ├── Fixtures │ │ │ │ │ ├── foo.xml │ │ │ │ │ ├── empty.yml │ │ │ │ │ ├── foo1.xml │ │ │ │ │ ├── annotated.php │ │ │ │ │ ├── nonvalid.yml │ │ │ │ │ ├── nonvalid2.yml │ │ │ │ │ ├── special_route_name.yml │ │ │ │ │ ├── withdoctype.xml │ │ │ │ │ ├── incomplete.yml │ │ │ │ │ ├── nonvalidkeys.yml │ │ │ │ │ ├── nonesense_resource_plus_path.yml │ │ │ │ │ ├── nonesense_type_without_resource.yml │ │ │ │ │ ├── dumper │ │ │ │ │ │ └── url_matcher2.apache │ │ │ │ │ ├── validresource.yml │ │ │ │ │ ├── nonvalidnode.xml │ │ │ │ │ ├── missing_id.xml │ │ │ │ │ ├── missing_path.xml │ │ │ │ │ ├── AnnotatedClasses │ │ │ │ │ │ ├── FooClass.php │ │ │ │ │ │ ├── AbstractClass.php │ │ │ │ │ │ └── BarClass.php │ │ │ │ │ ├── nonvalid.xml │ │ │ │ │ ├── null_values.xml │ │ │ │ │ ├── validresource.xml │ │ │ │ │ ├── nonvalidroute.xml │ │ │ │ │ ├── CustomXmlFileLoader.php │ │ │ │ │ ├── namespaceprefix.xml │ │ │ │ │ ├── validpattern.yml │ │ │ │ │ ├── validpattern.php │ │ │ │ │ ├── RedirectableUrlMatcher.php │ │ │ │ │ └── validpattern.xml │ │ │ │ ├── Matcher │ │ │ │ │ └── Dumper │ │ │ │ │ │ └── DumperCollectionTest.php │ │ │ │ ├── Loader │ │ │ │ │ └── AbstractAnnotationLoaderTest.php │ │ │ │ └── CompiledRouteTest.php │ │ │ │ ├── .gitignore │ │ │ │ ├── Exception │ │ │ │ ├── ExceptionInterface.php │ │ │ │ ├── RouteNotFoundException.php │ │ │ │ ├── InvalidParameterException.php │ │ │ │ ├── ResourceNotFoundException.php │ │ │ │ ├── MissingMandatoryParametersException.php │ │ │ │ └── MethodNotAllowedException.php │ │ │ │ ├── phpunit.xml.dist │ │ │ │ ├── RequestContextAwareInterface.php │ │ │ │ ├── RouteCompilerInterface.php │ │ │ │ ├── RouterInterface.php │ │ │ │ ├── Matcher │ │ │ │ ├── RedirectableUrlMatcherInterface.php │ │ │ │ ├── Dumper │ │ │ │ │ ├── MatcherDumper.php │ │ │ │ │ ├── MatcherDumperInterface.php │ │ │ │ │ └── DumperRoute.php │ │ │ │ └── RequestMatcherInterface.php │ │ │ │ ├── README.md │ │ │ │ ├── LICENSE │ │ │ │ ├── Generator │ │ │ │ └── Dumper │ │ │ │ │ ├── GeneratorDumper.php │ │ │ │ │ └── GeneratorDumperInterface.php │ │ │ │ └── Loader │ │ │ │ └── ClosureLoader.php │ │ ├── http-kernel │ │ │ └── Symfony │ │ │ │ └── Component │ │ │ │ └── HttpKernel │ │ │ │ ├── Tests │ │ │ │ ├── Fixtures │ │ │ │ │ ├── Bundle1Bundle │ │ │ │ │ │ ├── bar.txt │ │ │ │ │ │ ├── foo.txt │ │ │ │ │ │ └── Resources │ │ │ │ │ │ │ └── foo.txt │ │ │ │ │ ├── Bundle2Bundle │ │ │ │ │ │ └── foo.txt │ │ │ │ │ ├── BaseBundle │ │ │ │ │ │ └── Resources │ │ │ │ │ │ │ ├── foo.txt │ │ │ │ │ │ │ └── hide.txt │ │ │ │ │ ├── ChildBundle │ │ │ │ │ │ └── Resources │ │ │ │ │ │ │ ├── foo.txt │ │ │ │ │ │ │ └── hide.txt │ │ │ │ │ ├── Resources │ │ │ │ │ │ ├── BaseBundle │ │ │ │ │ │ │ └── hide.txt │ │ │ │ │ │ ├── ChildBundle │ │ │ │ │ │ │ └── foo.txt │ │ │ │ │ │ ├── FooBundle │ │ │ │ │ │ │ └── foo.txt │ │ │ │ │ │ └── Bundle1Bundle │ │ │ │ │ │ │ └── foo.txt │ │ │ │ │ ├── ExtensionAbsentBundle │ │ │ │ │ │ └── ExtensionAbsentBundle.php │ │ │ │ │ ├── ExtensionLoadedBundle │ │ │ │ │ │ ├── ExtensionLoadedBundle.php │ │ │ │ │ │ └── DependencyInjection │ │ │ │ │ │ │ └── ExtensionLoadedExtension.php │ │ │ │ │ ├── ExtensionPresentBundle │ │ │ │ │ │ ├── ExtensionPresentBundle.php │ │ │ │ │ │ ├── Command │ │ │ │ │ │ │ ├── BarCommand.php │ │ │ │ │ │ │ └── FooCommand.php │ │ │ │ │ │ └── DependencyInjection │ │ │ │ │ │ │ └── ExtensionPresentExtension.php │ │ │ │ │ ├── FooBarBundle.php │ │ │ │ │ ├── KernelForOverrideName.php │ │ │ │ │ ├── TestEventDispatcher.php │ │ │ │ │ ├── KernelForTest.php │ │ │ │ │ └── TestClient.php │ │ │ │ ├── TestHttpKernel.php │ │ │ │ ├── UriSignerTest.php │ │ │ │ ├── Bundle │ │ │ │ │ └── BundleTest.php │ │ │ │ └── DataCollector │ │ │ │ │ └── ExceptionDataCollectorTest.php │ │ │ │ ├── .gitignore │ │ │ │ ├── Event │ │ │ │ └── FinishRequestEvent.php │ │ │ │ ├── DataCollector │ │ │ │ ├── LateDataCollectorInterface.php │ │ │ │ └── DataCollectorInterface.php │ │ │ │ ├── Debug │ │ │ │ ├── ErrorHandler.php │ │ │ │ └── ExceptionHandler.php │ │ │ │ ├── CacheClearer │ │ │ │ ├── CacheClearerInterface.php │ │ │ │ └── ChainCacheClearer.php │ │ │ │ ├── CacheWarmer │ │ │ │ ├── WarmableInterface.php │ │ │ │ ├── CacheWarmerInterface.php │ │ │ │ └── CacheWarmer.php │ │ │ │ ├── Exception │ │ │ │ ├── FatalErrorException.php │ │ │ │ ├── FlattenException.php │ │ │ │ ├── HttpExceptionInterface.php │ │ │ │ ├── GoneHttpException.php │ │ │ │ ├── ConflictHttpException.php │ │ │ │ ├── BadRequestHttpException.php │ │ │ │ ├── NotFoundHttpException.php │ │ │ │ ├── NotAcceptableHttpException.php │ │ │ │ ├── LengthRequiredHttpException.php │ │ │ │ ├── PreconditionFailedHttpException.php │ │ │ │ ├── UnsupportedMediaTypeHttpException.php │ │ │ │ ├── UnprocessableEntityHttpException.php │ │ │ │ ├── AccessDeniedHttpException.php │ │ │ │ ├── PreconditionRequiredHttpException.php │ │ │ │ ├── HttpException.php │ │ │ │ ├── UnauthorizedHttpException.php │ │ │ │ ├── MethodNotAllowedHttpException.php │ │ │ │ ├── ServiceUnavailableHttpException.php │ │ │ │ └── TooManyRequestsHttpException.php │ │ │ │ ├── phpunit.xml.dist │ │ │ │ ├── DependencyInjection │ │ │ │ ├── RegisterListenersPass.php │ │ │ │ ├── Extension.php │ │ │ │ └── MergeExtensionConfigurationPass.php │ │ │ │ ├── Log │ │ │ │ └── DebugLoggerInterface.php │ │ │ │ ├── LICENSE │ │ │ │ ├── TerminableInterface.php │ │ │ │ └── HttpCache │ │ │ │ └── EsiResponseCacheStrategyInterface.php │ │ ├── debug │ │ │ └── Symfony │ │ │ │ └── Component │ │ │ │ └── Debug │ │ │ │ ├── .gitignore │ │ │ │ ├── Tests │ │ │ │ ├── Fixtures │ │ │ │ │ ├── PEARClass.php │ │ │ │ │ ├── notPsr0Bis.php │ │ │ │ │ ├── reallyNotPsr0.php │ │ │ │ │ ├── casemismatch.php │ │ │ │ │ ├── RequiredTwice.php │ │ │ │ │ ├── psr4 │ │ │ │ │ │ └── Psr4CaseMismatch.php │ │ │ │ │ └── ClassAlias.php │ │ │ │ └── MockExceptionHandler.php │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── Exception │ │ │ │ ├── OutOfMemoryException.php │ │ │ │ ├── DummyException.php │ │ │ │ ├── UndefinedMethodException.php │ │ │ │ ├── UndefinedFunctionException.php │ │ │ │ ├── ClassNotFoundException.php │ │ │ │ └── ContextErrorException.php │ │ │ │ ├── phpunit.xml.dist │ │ │ │ ├── composer.json │ │ │ │ ├── FatalErrorHandler │ │ │ │ └── FatalErrorHandlerInterface.php │ │ │ │ ├── LICENSE │ │ │ │ └── README.md │ │ ├── http-foundation │ │ │ └── Symfony │ │ │ │ └── Component │ │ │ │ └── HttpFoundation │ │ │ │ ├── Tests │ │ │ │ ├── File │ │ │ │ │ ├── Fixtures │ │ │ │ │ │ ├── directory │ │ │ │ │ │ │ └── .empty │ │ │ │ │ │ ├── .unknownextension │ │ │ │ │ │ ├── test │ │ │ │ │ │ └── test.gif │ │ │ │ │ └── FakeFile.php │ │ │ │ └── Session │ │ │ │ │ └── Storage │ │ │ │ │ ├── Proxy │ │ │ │ │ └── NativeProxyTest.php │ │ │ │ │ └── Handler │ │ │ │ │ └── NativeSessionHandlerTest.php │ │ │ │ ├── .gitignore │ │ │ │ ├── File │ │ │ │ ├── Exception │ │ │ │ │ ├── UploadException.php │ │ │ │ │ ├── FileException.php │ │ │ │ │ ├── UnexpectedTypeException.php │ │ │ │ │ ├── FileNotFoundException.php │ │ │ │ │ └── AccessDeniedException.php │ │ │ │ └── MimeType │ │ │ │ │ ├── ExtensionGuesserInterface.php │ │ │ │ │ └── MimeTypeGuesserInterface.php │ │ │ │ ├── Session │ │ │ │ ├── Storage │ │ │ │ │ ├── Handler │ │ │ │ │ │ └── NativeSessionHandler.php │ │ │ │ │ └── Proxy │ │ │ │ │ │ └── NativeProxy.php │ │ │ │ └── SessionBagInterface.php │ │ │ │ ├── phpunit.xml.dist │ │ │ │ ├── RequestMatcherInterface.php │ │ │ │ ├── composer.json │ │ │ │ ├── ApacheRequest.php │ │ │ │ └── LICENSE │ │ └── event-dispatcher │ │ │ └── Symfony │ │ │ └── Component │ │ │ └── EventDispatcher │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── CHANGELOG.md │ │ │ ├── phpunit.xml.dist │ │ │ ├── Debug │ │ │ └── TraceableEventDispatcherInterface.php │ │ │ ├── LICENSE │ │ │ └── composer.json │ ├── silex │ │ └── silex │ │ │ ├── .gitignore │ │ │ ├── bin │ │ │ ├── skeleton │ │ │ │ ├── slim_composer.json │ │ │ │ ├── index.php │ │ │ │ └── fat_composer.json │ │ │ └── compile │ │ │ ├── tests │ │ │ ├── bootstrap.php │ │ │ └── Silex │ │ │ │ └── Tests │ │ │ │ ├── Route │ │ │ │ └── SecurityRoute.php │ │ │ │ ├── Application │ │ │ │ ├── FormApplication.php │ │ │ │ ├── TwigApplication.php │ │ │ │ ├── MonologApplication.php │ │ │ │ ├── SecurityApplication.php │ │ │ │ ├── SwiftmailerApplication.php │ │ │ │ ├── TranslationApplication.php │ │ │ │ ├── UrlGeneratorApplication.php │ │ │ │ ├── FormTraitTest.php │ │ │ │ ├── SwiftmailerTraitTest.php │ │ │ │ └── MonologTraitTest.php │ │ │ │ ├── Provider │ │ │ │ ├── ValidatorServiceProviderTest │ │ │ │ │ └── Constraint │ │ │ │ │ │ ├── Custom.php │ │ │ │ │ │ └── CustomValidator.php │ │ │ │ ├── SpoolStub.php │ │ │ │ └── SerializerServiceProviderTest.php │ │ │ │ ├── ControllerResolverTest.php │ │ │ │ ├── ServiceControllerResolverRouterTest.php │ │ │ │ └── StreamTest.php │ │ │ ├── doc │ │ │ ├── index.rst │ │ │ ├── providers │ │ │ │ └── index.rst │ │ │ ├── conf.py │ │ │ └── cookbook │ │ │ │ ├── translating_validation_messages.rst │ │ │ │ ├── index.rst │ │ │ │ └── validator_yaml.rst │ │ │ ├── src │ │ │ └── Silex │ │ │ │ ├── Exception │ │ │ │ └── ControllerFrozenException.php │ │ │ │ ├── ControllerProviderInterface.php │ │ │ │ ├── Route │ │ │ │ └── SecurityTrait.php │ │ │ │ ├── Provider │ │ │ │ ├── ServiceControllerServiceProvider.php │ │ │ │ └── UrlGeneratorServiceProvider.php │ │ │ │ ├── Application │ │ │ │ ├── FormTrait.php │ │ │ │ ├── SwiftmailerTrait.php │ │ │ │ └── MonologTrait.php │ │ │ │ ├── HttpCache.php │ │ │ │ ├── ServiceProviderInterface.php │ │ │ │ ├── Translator.php │ │ │ │ ├── EventListener │ │ │ │ └── LocaleListener.php │ │ │ │ └── WebTestCase.php │ │ │ ├── phpunit.xml.dist │ │ │ ├── .travis.yml │ │ │ └── LICENSE │ ├── composer │ │ ├── autoload_psr4.php │ │ ├── autoload_classmap.php │ │ └── autoload_namespaces.php │ └── autoload.php └── composer.json ├── 001-silex-no-lock ├── .gitignore ├── reset.sh └── composer.json ├── 004-aura-router-project ├── .gitignore ├── reset.sh └── composer.json ├── aura-router-with-phpunit ├── .gitignore ├── reset.sh └── composer.json ├── 003-aura-router-not-yet-required ├── .gitignore ├── composer.json └── reset.sh ├── config.json └── README.md /000-silex/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /classmap/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /files/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /psr-0/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /psr-4/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /psr-0/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf vendor 3 | -------------------------------------------------------------------------------- /psr-4/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf vendor 3 | -------------------------------------------------------------------------------- /000-silex/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf vendor 3 | -------------------------------------------------------------------------------- /002-silex-lock-not-synced/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /001-silex-no-lock/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /004-aura-router-project/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /aura-router-with-phpunit/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /001-silex-no-lock/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -rf vendor composer.lock 3 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/.gitignore: -------------------------------------------------------------------------------- 1 | phpunit.xml 2 | -------------------------------------------------------------------------------- /003-aura-router-not-yet-required/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /classmap/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git checkout -- classes.php 3 | rm -rf vendor 4 | -------------------------------------------------------------------------------- /003-aura-router-not-yet-required/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/empty.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/foo1.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /000-silex/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "~1.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /002-silex-lock-not-synced/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git checkout -- composer.json 3 | rm -rf vendor 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/annotated.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001-silex-no-lock/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "~1.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.yml: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /classmap/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "classmap": ["classes.php"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /files/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "files": ["my-app-demo.php"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /004-aura-router-project/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git checkout -- composer.json 3 | rm -rf vendor composer.lock 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "~1.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /aura-router-with-phpunit/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git checkout -- composer.json 3 | rm -rf vendor composer.lock 4 | -------------------------------------------------------------------------------- /002-silex-lock-not-synced/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "1.1.*" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/.gitignore: -------------------------------------------------------------------------------- 1 | /phpunit.xml 2 | /vendor 3 | /build 4 | /composer.lock 5 | 6 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/bar.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle2Bundle/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid2.yml: -------------------------------------------------------------------------------- 1 | route: string 2 | -------------------------------------------------------------------------------- /003-aura-router-not-yet-required/reset.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | git checkout -- composer.json 3 | rm -rf vendor composer.lock 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/directory/.empty: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/BaseBundle/Resources/hide.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ChildBundle/Resources/hide.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/BaseBundle/hide.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/ChildBundle/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/FooBundle/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/.unknownextension: -------------------------------------------------------------------------------- 1 | f -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /psr-0/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-0": { 4 | "My\\App\\": "src" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /psr-4/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-4": { 4 | "My\\App\\": "src" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | phpunit.xml 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/special_route_name.yml: -------------------------------------------------------------------------------- 1 | "#$péß^a|": 2 | path: "true" 3 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/bin/skeleton/slim_composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "~1.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /classmap/example.php: -------------------------------------------------------------------------------- 1 | getName()."\n"; 7 | -------------------------------------------------------------------------------- /files/example.php: -------------------------------------------------------------------------------- 1 | getName()."\n"; 7 | -------------------------------------------------------------------------------- /psr-0/example.php: -------------------------------------------------------------------------------- 1 | getName()."\n"; 7 | -------------------------------------------------------------------------------- /psr-4/example.php: -------------------------------------------------------------------------------- 1 | getName()."\n"; 7 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/withdoctype.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/incomplete.yml: -------------------------------------------------------------------------------- 1 | blog_show: 2 | defaults: { _controller: MyBlogBundle:Blog:show } 3 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidkeys.yml: -------------------------------------------------------------------------------- 1 | someroute: 2 | resource: path/to/some.yml 3 | name_prefix: test_ 4 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Tests/Fixtures/PEARClass.php: -------------------------------------------------------------------------------- 1 | compile(); 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Managing Dependencies with Composer 2 | =================================== 3 | 4 | * [Download](https://github.com/dflydev/composer-tutorial/archive/master.zip) 5 | * [Slides](https://beau.io/talks/2015/11/05/managing-dependencies-with-composer-tnphp) 6 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/bin/skeleton/index.php: -------------------------------------------------------------------------------- 1 | get('/hello', function() { 8 | return 'Hello!'; 9 | }); 10 | 11 | $app->run(); 12 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dflydev/composer-tutorial/master/005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dflydev/composer-tutorial/master/005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/Fixtures/test.gif -------------------------------------------------------------------------------- /classmap/classes.php: -------------------------------------------------------------------------------- 1 | name = $name; 11 | } 12 | public function getName() 13 | { 14 | return $this->name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /files/my-app-demo.php: -------------------------------------------------------------------------------- 1 | name = $name; 11 | } 12 | public function getName() 13 | { 14 | return $this->name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /psr-4/src/Demo.php: -------------------------------------------------------------------------------- 1 | name = $name; 11 | } 12 | public function getName() 13 | { 14 | return $this->name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /psr-0/src/My/App/Demo.php: -------------------------------------------------------------------------------- 1 | name = $name; 11 | } 12 | public function getName() 13 | { 14 | return $this->name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/dumper/url_matcher2.apache: -------------------------------------------------------------------------------- 1 | # skip "real" requests 2 | RewriteCond %{REQUEST_FILENAME} -f 3 | RewriteRule .* - [QSA,L] 4 | 5 | # foo 6 | RewriteCond %{REQUEST_URI} ^/foo$ 7 | RewriteRule .* ap\ p_d\ ev.php [QSA,L,E=_ROUTING_route:foo] 8 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | add('Silex\Tests', __DIR__); 5 | 6 | if (!class_exists('Symfony\Component\Form\Form')) { 7 | echo "You must install the dev dependencies using:\n"; 8 | echo " composer install --dev\n"; 9 | exit(1); 10 | } 11 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.yml: -------------------------------------------------------------------------------- 1 | _blog: 2 | resource: validpattern.yml 3 | prefix: /{foo} 4 | defaults: { 'foo': '123' } 5 | requirements: { 'foo': '\d+' } 6 | options: { 'foo': 'bar' } 7 | host: "" 8 | condition: 'context.getMethod() == "POST"' 9 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/composer/autoload_classmap.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/symfony/http-foundation/Symfony/Component/HttpFoundation/Resources/stubs/SessionHandlerInterface.php', 10 | ); 11 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/doc/index.rst: -------------------------------------------------------------------------------- 1 | Silex 2 | ===== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | intro 8 | usage 9 | middlewares 10 | organizing_controllers 11 | services 12 | providers 13 | testing 14 | cookbook/index 15 | internals 16 | contributing 17 | providers/index 18 | web_servers 19 | changelog 20 | phar 21 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidnode.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | bar 8 | 9 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/doc/providers/index.rst: -------------------------------------------------------------------------------- 1 | Silex 2 | ===== 3 | 4 | .. toctree:: 5 | :maxdepth: 1 6 | 7 | doctrine 8 | monolog 9 | session 10 | swiftmailer 11 | translation 12 | twig 13 | url_generator 14 | validator 15 | form 16 | http_cache 17 | http_fragment 18 | security 19 | remember_me 20 | serializer 21 | service_controller 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_id.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/missing_path.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/Psr/Log/LoggerAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Route; 13 | 14 | use Silex\Route; 15 | 16 | class SecurityRoute extends Route 17 | { 18 | use Route\SecurityTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 2.5.0 5 | ----- 6 | 7 | * added ExceptionHandler::setHandler() 8 | * added UndefinedMethodFatalErrorHandler 9 | * deprecated DummyException 10 | 11 | 2.4.0 12 | ----- 13 | 14 | * added a DebugClassLoader able to wrap any autoloader providing a findFile method 15 | * improved error messages for not found classes and functions 16 | 17 | 2.3.0 18 | ----- 19 | 20 | * added the component 21 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/FooClass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses; 13 | 14 | class FooClass 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/Psr/Log/LoggerAwareTrait.php: -------------------------------------------------------------------------------- 1 | logger = $logger; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses; 13 | 14 | abstract class AbstractClass 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/FormApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class FormApplication extends Application 17 | { 18 | use Application\FormTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/TwigApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class TwigApplication extends Application 17 | { 18 | use Application\TwigTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/MonologApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class MonologApplication extends Application 17 | { 18 | use Application\MonologTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/SecurityApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class SecurityApplication extends Application 17 | { 18 | use Application\SecurityTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class SwiftmailerApplication extends Application 17 | { 18 | use Application\SwiftmailerTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/TranslationApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class TranslationApplication extends Application 17 | { 18 | use Application\TranslationTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/UrlGeneratorApplication.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | 16 | class UrlGeneratorApplication extends Application 17 | { 18 | use Application\UrlGeneratorTrait; 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | require_once __DIR__.'/../lib/Pimple.php'; 13 | require_once __DIR__.'/Pimple/Tests/Service.php'; 14 | require_once __DIR__.'/Pimple/Tests/Invokable.php'; 15 | require_once __DIR__.'/Pimple/Tests/NonInvokable.php'; 16 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | MyBundle:Blog:show 9 | GET 10 | 11 | 12 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/OutOfMemoryException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * Out of memory exception. 16 | * 17 | * @author Nicolas Grekas 18 | */ 19 | class OutOfMemoryException extends FatalErrorException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Exception/ControllerFrozenException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Exception; 13 | 14 | /** 15 | * Exception, is thrown when a frozen controller is modified 16 | * 17 | * @author Igor Wiedler 18 | */ 19 | class ControllerFrozenException extends \RuntimeException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class ExtensionAbsentBundle extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/ExtensionLoadedBundle.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class ExtensionLoadedBundle extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/ExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * ExceptionInterface 16 | * 17 | * @author Alexandre Salomé 18 | * 19 | * @api 20 | */ 21 | interface ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/AnnotatedClasses/BarClass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses; 13 | 14 | class BarClass 15 | { 16 | public function routeAction($arg1, $arg2 = 'defaultValue2', $arg3 = 'defaultValue3') 17 | { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class ExtensionPresentBundle extends Bundle 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/DummyException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * @author Fabien Potencier 16 | * 17 | * @deprecated since version 2.5, to be removed in 3.0. 18 | */ 19 | class DummyException extends \ErrorException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/FinishRequestEvent.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Event; 13 | 14 | /** 15 | * Triggered whenever a request is fully processed. 16 | * 17 | * @author Benjamin Eberlei 18 | */ 19 | class FinishRequestEvent extends KernelEvent 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/FooBarBundle.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures; 13 | 14 | use Symfony\Component\HttpKernel\Bundle\Bundle; 15 | 16 | class FooBarBundle extends Bundle 17 | { 18 | // We need a full namespaced bundle instance to test isClassInActiveBundle 19 | } 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/BarCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\Exception; 13 | 14 | /** 15 | * Thrown when an error occurred during file upload 16 | * 17 | * @author Bernhard Schussek 18 | */ 19 | class UploadException extends FileException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\Exception; 13 | 14 | /** 15 | * Thrown when an error occurred in the component File 16 | * 17 | * @author Bernhard Schussek 18 | */ 19 | class FileException extends \RuntimeException 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/null_values.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | foo 10 | bar 11 | 12 | 13 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Tests/MockExceptionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Tests; 13 | 14 | use Symfony\Component\Debug\ExceptionHandler; 15 | 16 | class MockExceptionHandler extends Exceptionhandler 17 | { 18 | public $e; 19 | 20 | public function handle(\Exception $e) 21 | { 22 | $this->e = $e; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 123 9 | \d+ 10 | 11 | context.getMethod() == "POST" 12 | 13 | 14 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/nonvalidroute.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | MyBundle:Blog:show 9 | GET 10 | 11 | baz 12 | 13 | 14 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | ./tests/Pimple/ 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/RouteNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * Exception thrown when a route does not exist 16 | * 17 | * @author Alexandre Salomé 18 | * 19 | * @api 20 | */ 21 | class RouteNotFoundException extends \InvalidArgumentException implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/InvalidParameterException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * Exception thrown when a parameter is not valid 16 | * 17 | * @author Alexandre Salomé 18 | * 19 | * @api 20 | */ 21 | class InvalidParameterException extends \InvalidArgumentException implements ExceptionInterface 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command; 13 | 14 | use Symfony\Component\Console\Command\Command; 15 | 16 | class FooCommand extends Command 17 | { 18 | protected function configure() 19 | { 20 | $this->setName('foo'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/LateDataCollectorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\DataCollector; 13 | 14 | /** 15 | * LateDataCollectorInterface. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface LateDataCollectorInterface 20 | { 21 | /** 22 | * Collects data as late as possible. 23 | */ 24 | public function lateCollect(); 25 | } 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pimple/pimple", 3 | "type": "library", 4 | "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", 5 | "keywords": ["dependency injection", "container"], 6 | "homepage": "http://pimple.sensiolabs.org", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | } 13 | ], 14 | "require": { 15 | "php": ">=5.3.0" 16 | }, 17 | "autoload": { 18 | "psr-0": { "Pimple": "lib/" } 19 | }, 20 | "extra": { 21 | "branch-alias": { 22 | "dev-master": "1.1.x-dev" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/ResourceNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * The resource was not found. 16 | * 17 | * This exception should trigger an HTTP 404 response in your application code. 18 | * 19 | * @author Kris Wallsmith 20 | * 21 | * @api 22 | */ 23 | class ResourceNotFoundException extends \RuntimeException implements ExceptionInterface 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\Exception; 13 | 14 | class UnexpectedTypeException extends FileException 15 | { 16 | public function __construct($value, $expectedType) 17 | { 18 | parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, is_object($value) ? get_class($value) : gettype($value))); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ErrorHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Debug; 13 | 14 | use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; 15 | 16 | /** 17 | * ErrorHandler. 18 | * 19 | * @author Fabien Potencier 20 | * 21 | * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. 22 | */ 23 | class ErrorHandler extends DebugErrorHandler 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/MissingMandatoryParametersException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * Exception thrown when a route cannot be generated because of missing 16 | * mandatory parameters. 17 | * 18 | * @author Alexandre Salomé 19 | * 20 | * @api 21 | */ 22 | class MissingMandatoryParametersException extends \InvalidArgumentException implements ExceptionInterface 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/CacheClearerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\CacheClearer; 13 | 14 | /** 15 | * CacheClearerInterface. 16 | * 17 | * @author Dustin Dobervich 18 | */ 19 | interface CacheClearerInterface 20 | { 21 | /** 22 | * Clears any caches necessary. 23 | * 24 | * @param string $cacheDir The cache directory. 25 | */ 26 | public function clear($cacheDir); 27 | } 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/WarmableInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\CacheWarmer; 13 | 14 | /** 15 | * Interface for classes that support warming their cache. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface WarmableInterface 20 | { 21 | /** 22 | * Warms up the cache. 23 | * 24 | * @param string $cacheDir The cache directory 25 | */ 26 | public function warmUp($cacheDir); 27 | } 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/Psr/Log/NullLogger.php: -------------------------------------------------------------------------------- 1 | logger) { }` 11 | * blocks. 12 | */ 13 | class NullLogger extends AbstractLogger 14 | { 15 | /** 16 | * Logs with an arbitrary level. 17 | * 18 | * @param mixed $level 19 | * @param string $message 20 | * @param array $context 21 | * @return null 22 | */ 23 | public function log($level, $message, array $context = array()) 24 | { 25 | // noop 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | ./tests/Silex/ 17 | 18 | 19 | 20 | 21 | ./src 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; 13 | 14 | /** 15 | * Adds SessionHandler functionality if available. 16 | * 17 | * @see http://php.net/sessionhandler 18 | */ 19 | 20 | if (version_compare(phpversion(), '5.4.0', '>=')) { 21 | class NativeSessionHandler extends \SessionHandler 22 | { 23 | } 24 | } else { 25 | class NativeSessionHandler 26 | { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Fixtures; 13 | 14 | use Symfony\Component\Routing\Loader\XmlFileLoader; 15 | use Symfony\Component\Config\Util\XmlUtils; 16 | 17 | /** 18 | * XmlFileLoader with schema validation turned off 19 | */ 20 | class CustomXmlFileLoader extends XmlFileLoader 21 | { 22 | protected function loadFile($file) 23 | { 24 | return XmlUtils::loadFile($file, function () { return true; }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/README.md: -------------------------------------------------------------------------------- 1 | EventDispatcher Component 2 | ========================= 3 | 4 | The Symfony2 EventDispatcher component implements the Mediator pattern in a 5 | simple and effective way to make your projects truly extensible. 6 | 7 | ```php 8 | use Symfony\Component\EventDispatcher\EventDispatcher; 9 | use Symfony\Component\EventDispatcher\Event; 10 | 11 | $dispatcher = new EventDispatcher(); 12 | 13 | $dispatcher->addListener('event_name', function (Event $event) { 14 | // ... 15 | }); 16 | 17 | $dispatcher->dispatch('event_name'); 18 | ``` 19 | 20 | Resources 21 | --------- 22 | 23 | You can run the unit tests with the following command: 24 | 25 | $ cd path/to/Symfony/Component/EventDispatcher/ 26 | $ composer.phar install 27 | $ phpunit 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle\DependencyInjection; 13 | 14 | use Symfony\Component\DependencyInjection\ContainerBuilder; 15 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; 16 | 17 | class ExtensionLoadedExtension extends Extension 18 | { 19 | public function load(array $configs, ContainerBuilder $container) 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForOverrideName.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures; 13 | 14 | use Symfony\Component\HttpKernel\Kernel; 15 | use Symfony\Component\Config\Loader\LoaderInterface; 16 | 17 | class KernelForOverrideName extends Kernel 18 | { 19 | protected $name = 'overridden'; 20 | 21 | public function registerBundles() 22 | { 23 | } 24 | 25 | public function registerContainerConfiguration(LoaderInterface $loader) 26 | { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/namespaceprefix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | MyBundle:Blog:show 9 | \w+ 10 | en|fr|de 11 | RouteCompiler 12 | 13 | 14 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest/Constraint/Custom.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Provider\ValidatorServiceProviderTest\Constraint; 13 | 14 | use Symfony\Component\Validator\Constraint; 15 | 16 | /** 17 | * @author Alex Kalyvitis 18 | */ 19 | class Custom extends Constraint 20 | { 21 | public $message = 'This field must be ...'; 22 | public $table; 23 | public $field; 24 | 25 | public function validatedBy() 26 | { 27 | return 'test.custom.validator'; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FatalErrorException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | use Symfony\Component\Debug\Exception\FatalErrorException as DebugFatalErrorException; 15 | 16 | /** 17 | * Fatal Error Exception. 18 | * 19 | * @author Konstanton Myakshin 20 | * 21 | * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. 22 | */ 23 | class FatalErrorException extends DebugFatalErrorException 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\DependencyInjection; 13 | 14 | use Symfony\Component\DependencyInjection\ContainerBuilder; 15 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; 16 | 17 | class ExtensionPresentExtension extends Extension 18 | { 19 | public function load(array $configs, ContainerBuilder $container) 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Debug; 13 | 14 | use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler; 15 | 16 | /** 17 | * ExceptionHandler converts an exception to a Response object. 18 | * 19 | * @author Fabien Potencier 20 | * 21 | * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. 22 | */ 23 | class ExceptionHandler extends DebugExceptionHandler 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/ControllerProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex; 13 | 14 | /** 15 | * Interface for controller providers. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface ControllerProviderInterface 20 | { 21 | /** 22 | * Returns routes to connect to the given application. 23 | * 24 | * @param Application $app An Application instance 25 | * 26 | * @return ControllerCollection A ControllerCollection instance 27 | */ 28 | public function connect(Application $app); 29 | } 30 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | array($vendorDir . '/symfony/routing'), 10 | 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 11 | 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 12 | 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 13 | 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), 14 | 'Silex' => array($vendorDir . '/silex/silex/src'), 15 | 'Psr\\Log\\' => array($vendorDir . '/psr/log'), 16 | 'Pimple' => array($vendorDir . '/pimple/pimple/lib'), 17 | ); 18 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Route/SecurityTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Route; 13 | 14 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; 15 | 16 | /** 17 | * Security trait. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | trait SecurityTrait 22 | { 23 | public function secure($roles) 24 | { 25 | $this->before(function ($request, $app) use ($roles) { 26 | if (!$app['security']->isGranted($roles)) { 27 | throw new AccessDeniedException(); 28 | } 29 | }); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | ./Tests/ 12 | 13 | 14 | 15 | 16 | 17 | ./ 18 | 19 | ./Tests 20 | ./vendor 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | 2.5.0 5 | ----- 6 | 7 | * added Debug\TraceableEventDispatcher (originally in HttpKernel) 8 | * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface 9 | * added RegisterListenersPass (originally in HttpKernel) 10 | 11 | 2.1.0 12 | ----- 13 | 14 | * added TraceableEventDispatcherInterface 15 | * added ContainerAwareEventDispatcher 16 | * added a reference to the EventDispatcher on the Event 17 | * added a reference to the Event name on the event 18 | * added fluid interface to the dispatch() method which now returns the Event 19 | object 20 | * added GenericEvent event class 21 | * added the possibility for subscribers to subscribe several times for the 22 | same event 23 | * added ImmutableEventDispatcher 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | ./Tests/ 12 | 13 | 14 | 15 | 16 | 17 | ./ 18 | 19 | ./vendor 20 | ./Tests 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | ./Tests/ 12 | 13 | 14 | 15 | 16 | 17 | ./ 18 | 19 | ./Tests 20 | ./vendor 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/bin/skeleton/fat_composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "silex/silex": "~1.1", 4 | "symfony/browser-kit": "~2.3", 5 | "symfony/console": "~2.3", 6 | "symfony/config": "~2.3", 7 | "symfony/css-selector": "~2.3", 8 | "symfony/dom-crawler": "~2.3", 9 | "symfony/filesystem": "~2.3", 10 | "symfony/finder": "~2.3", 11 | "symfony/form": "~2.3", 12 | "symfony/locale": "~2.3", 13 | "symfony/process": "~2.3", 14 | "symfony/security": "~2.3", 15 | "symfony/serializer": "~2.3", 16 | "symfony/translation": "~2.3", 17 | "symfony/validator": "~2.3", 18 | "symfony/monolog-bridge": "~2.3", 19 | "symfony/twig-bridge": "~2.3", 20 | "doctrine/dbal": ">=2.2.0,<2.4.0-dev", 21 | "swiftmailer/swiftmailer": "5.*" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\MimeType; 13 | 14 | /** 15 | * Guesses the file extension corresponding to a given mime type 16 | */ 17 | interface ExtensionGuesserInterface 18 | { 19 | /** 20 | * Makes a best guess for a file extension, given a mime type 21 | * 22 | * @param string $mimeType The mime type 23 | * @return string The guessed extension or NULL, if none could be guessed 24 | */ 25 | public function guess($mimeType); 26 | } 27 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\DependencyInjection; 13 | 14 | use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass; 15 | 16 | /** 17 | * Compiler pass to register tagged services for an event dispatcher. 18 | * 19 | * @deprecated Deprecated in 2.5, to be removed in 3.0. Use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass instead. 20 | */ 21 | class RegisterListenersPass extends BaseRegisterListenersPass 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestEventDispatcher.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures; 13 | 14 | use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface; 15 | use Symfony\Component\EventDispatcher\EventDispatcher; 16 | 17 | class TestEventDispatcher extends EventDispatcher implements TraceableEventDispatcherInterface 18 | { 19 | public function getCalledListeners() 20 | { 21 | return array('foo'); 22 | } 23 | 24 | public function getNotCalledListeners() 25 | { 26 | return array('bar'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/RequestContextAwareInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing; 13 | 14 | /** 15 | * @api 16 | */ 17 | interface RequestContextAwareInterface 18 | { 19 | /** 20 | * Sets the request context. 21 | * 22 | * @param RequestContext $context The context 23 | * 24 | * @api 25 | */ 26 | public function setContext(RequestContext $context); 27 | 28 | /** 29 | * Gets the request context. 30 | * 31 | * @return RequestContext The context 32 | * 33 | * @api 34 | */ 35 | public function getContext(); 36 | } 37 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.yml: -------------------------------------------------------------------------------- 1 | blog_show: 2 | path: /blog/{slug} 3 | defaults: { _controller: "MyBundle:Blog:show" } 4 | host: "{locale}.example.com" 5 | requirements: { 'locale': '\w+' } 6 | methods: ['GET','POST','put','OpTiOnS'] 7 | schemes: ['https'] 8 | condition: 'context.getMethod() == "GET"' 9 | options: 10 | compiler_class: RouteCompiler 11 | 12 | blog_show_legacy: 13 | pattern: /blog/{slug} 14 | defaults: { _controller: "MyBundle:Blog:show" } 15 | host: "{locale}.example.com" 16 | requirements: { '_method': 'GET|POST|put|OpTiOnS', _scheme: https, 'locale': '\w+' } 17 | condition: 'context.getMethod() == "GET"' 18 | options: 19 | compiler_class: RouteCompiler 20 | 21 | blog_show_inherited: 22 | path: /blog/{slug} 23 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | env: 4 | - SYMFONY_DEPS_VERSION=2.3 5 | - SYMFONY_DEPS_VERSION=2.4 6 | - SYMFONY_DEPS_VERSION=2.5 7 | 8 | before_script: 9 | # symfony/* 10 | - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.5' ]; then sed -i 's/>=2.3,<2.6-dev/2.5.*@dev/g' composer.json; composer update --dev --prefer-source; fi" 11 | - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.4' ]; then sed -i 's/>=2.3,<2.6-dev/2.4.*@dev/g' composer.json; composer update --dev --prefer-source; fi" 12 | - sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.3' ]; then sed -i 's/>=2.3,<2.6-dev/2.3.*@dev/g' composer.json; composer update --dev --prefer-source; fi" 13 | - composer install --dev --prefer-source 14 | 15 | script: vendor/bin/phpunit 16 | 17 | php: 18 | - 5.3 19 | - 5.4 20 | - 5.5 21 | - 5.6 22 | - hhvm 23 | 24 | matrix: 25 | allow_failures: 26 | - php: hhvm 27 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\Exception; 13 | 14 | /** 15 | * Thrown when a file was not found 16 | * 17 | * @author Bernhard Schussek 18 | */ 19 | class FileNotFoundException extends FileException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $path The path to the file that was not found 25 | */ 26 | public function __construct($path) 27 | { 28 | parent::__construct(sprintf('The file "%s" does not exist', $path)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\Exception; 13 | 14 | /** 15 | * Thrown when the access on a file was denied. 16 | * 17 | * @author Bernhard Schussek 18 | */ 19 | class AccessDeniedException extends FileException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $path The path to the accessed file 25 | */ 26 | public function __construct($path) 27 | { 28 | parent::__construct(sprintf('The file %s could not be accessed', $path)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | use Symfony\Component\Debug\Exception\FlattenException as DebugFlattenException; 15 | 16 | /** 17 | * FlattenException wraps a PHP Exception to be able to serialize it. 18 | * 19 | * Basically, this class removes all objects from the trace. 20 | * 21 | * @author Fabien Potencier 22 | * 23 | * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. 24 | */ 25 | class FlattenException extends DebugFlattenException 26 | { 27 | } 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpExceptionInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * Interface for HTTP error exceptions. 16 | * 17 | * @author Kris Wallsmith 18 | */ 19 | interface HttpExceptionInterface 20 | { 21 | /** 22 | * Returns the status code. 23 | * 24 | * @return int An HTTP response status code 25 | */ 26 | public function getStatusCode(); 27 | 28 | /** 29 | * Returns response headers. 30 | * 31 | * @return array Response headers 32 | */ 33 | public function getHeaders(); 34 | } 35 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | ./Tests/ 12 | 13 | 14 | 15 | 16 | 17 | ./ 18 | 19 | ./Resources 20 | ./Tests 21 | ./vendor 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | ./Tests/ 12 | 13 | 14 | 15 | 16 | 17 | ./ 18 | 19 | ./Resources 20 | ./Tests 21 | ./vendor 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Provider/ServiceControllerServiceProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Provider; 13 | 14 | use Silex\Application; 15 | use Silex\ServiceProviderInterface; 16 | use Silex\ServiceControllerResolver; 17 | 18 | class ServiceControllerServiceProvider implements ServiceProviderInterface 19 | { 20 | public function register(Application $app) 21 | { 22 | $app['resolver'] = $app->share($app->extend('resolver', function ($resolver, $app) { 23 | return new ServiceControllerResolver($resolver, $app['callback_resolver']); 24 | })); 25 | } 26 | 27 | public function boot(Application $app) 28 | { 29 | // noop 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Matcher/Dumper/DumperCollectionTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Matcher\Dumper; 13 | 14 | use Symfony\Component\Routing\Matcher\Dumper\DumperCollection; 15 | 16 | class DumperCollectionTest extends \PHPUnit_Framework_TestCase 17 | { 18 | public function testGetRoot() 19 | { 20 | $a = new DumperCollection(); 21 | 22 | $b = new DumperCollection(); 23 | $a->add($b); 24 | 25 | $c = new DumperCollection(); 26 | $b->add($c); 27 | 28 | $d = new DumperCollection(); 29 | $c->add($d); 30 | 31 | $this->assertSame($a, $c->getRoot()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Application/FormTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Application; 13 | 14 | use Symfony\Component\Form\FormBuilder; 15 | 16 | /** 17 | * Form trait. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | trait FormTrait 22 | { 23 | /** 24 | * Creates and returns a form builder instance 25 | * 26 | * @param mixed $data The initial data for the form 27 | * @param array $options Options for the form 28 | * 29 | * @return FormBuilder 30 | */ 31 | public function form($data = null, array $options = array()) 32 | { 33 | return $this['form.factory']->createBuilder('form', $data, $options); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/doc/cookbook/translating_validation_messages.rst: -------------------------------------------------------------------------------- 1 | Translating Validation Messages 2 | =============================== 3 | 4 | When working with Symfony2 validator, a common task would be to show localized 5 | validation messages. 6 | 7 | In order to do that, you will need to register translator and point to 8 | translated resources:: 9 | 10 | $app->register(new Silex\Provider\TranslationServiceProvider(), array( 11 | 'locale' => 'sr_Latn', 12 | 'translator.domains' => array(), 13 | )); 14 | 15 | $app->before(function () use ($app) { 16 | $app['translator']->addLoader('xlf', new Symfony\Component\Translation\Loader\XliffFileLoader()); 17 | $app['translator']->addResource('xlf', __DIR__.'/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators/validators.sr_Latn.xlf', 'sr_Latn', 'validators'); 18 | }); 19 | 20 | And that's all you need to load translations from Symfony2 ``xlf`` files. 21 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Application/SwiftmailerTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Application; 13 | 14 | /** 15 | * Swiftmailer trait. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | trait SwiftmailerTrait 20 | { 21 | /** 22 | * Sends an email. 23 | * 24 | * @param \Swift_Message $message A \Swift_Message instance 25 | * @param array $failedRecipients An array of failures by-reference 26 | * 27 | * @return int The number of sent messages 28 | */ 29 | public function mail(\Swift_Message $message, &$failedRecipients = null) 30 | { 31 | return $this['mailer']->send($message, $failedRecipients); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Provider/ValidatorServiceProviderTest/Constraint/CustomValidator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Provider\ValidatorServiceProviderTest\Constraint; 13 | 14 | use Symfony\Component\Validator\Constraint; 15 | use Symfony\Component\Validator\ConstraintValidator; 16 | 17 | /** 18 | * @author Alex Kalyvitis 19 | */ 20 | class CustomValidator extends ConstraintValidator 21 | { 22 | public function isValid($value, Constraint $constraint) 23 | { 24 | // Validate... 25 | return true; 26 | } 27 | 28 | public function validate($value, Constraint $constraint) 29 | { 30 | return $this->isValid($value, $constraint); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/KernelForTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures; 13 | 14 | use Symfony\Component\HttpKernel\Kernel; 15 | use Symfony\Component\Config\Loader\LoaderInterface; 16 | 17 | class KernelForTest extends Kernel 18 | { 19 | public function getBundleMap() 20 | { 21 | return $this->bundleMap; 22 | } 23 | 24 | public function registerBundles() 25 | { 26 | return array(); 27 | } 28 | 29 | public function registerContainerConfiguration(LoaderInterface $loader) 30 | { 31 | } 32 | 33 | public function isBooted() 34 | { 35 | return $this->booted; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Fixtures/TestClient.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Fixtures; 13 | 14 | use Symfony\Component\HttpKernel\Client; 15 | 16 | class TestClient extends Client 17 | { 18 | protected function getScript($request) 19 | { 20 | $script = parent::getScript($request); 21 | 22 | $autoload = file_exists(__DIR__.'/../../vendor/autoload.php') 23 | ? __DIR__.'/../../vendor/autoload.php' 24 | : __DIR__.'/../../../../../../vendor/autoload.php' 25 | ; 26 | 27 | $script = preg_replace('/(\->register\(\);)/', "$0\nrequire_once '$autoload';\n", $script); 28 | 29 | return $script; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.php: -------------------------------------------------------------------------------- 1 | add('blog_show', new Route( 7 | '/blog/{slug}', 8 | array('_controller' => 'MyBlogBundle:Blog:show'), 9 | array('locale' => '\w+'), 10 | array('compiler_class' => 'RouteCompiler'), 11 | '{locale}.example.com', 12 | array('https'), 13 | array('GET','POST','put','OpTiOnS'), 14 | 'context.getMethod() == "GET"' 15 | )); 16 | $collection->add('blog_show_legacy', new Route( 17 | '/blog/{slug}', 18 | array('_controller' => 'MyBlogBundle:Blog:show'), 19 | array('_method' => 'GET|POST|put|OpTiOnS', '_scheme' => 'https', 'locale' => '\w+'), 20 | array('compiler_class' => 'RouteCompiler'), 21 | '{locale}.example.com', 22 | array(), 23 | array(), 24 | 'context.getMethod() == "GET"' 25 | )); 26 | 27 | return $collection; 28 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/RedirectableUrlMatcher.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Fixtures; 13 | 14 | use Symfony\Component\Routing\Matcher\UrlMatcher; 15 | use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface; 16 | 17 | /** 18 | * @author Fabien Potencier 19 | */ 20 | class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface 21 | { 22 | public function redirect($path, $route, $scheme = null) 23 | { 24 | return array( 25 | '_controller' => 'Some controller reference...', 26 | 'path' => $path, 27 | 'scheme' => $scheme, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/RequestMatcherInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * RequestMatcherInterface is an interface for strategies to match a Request. 16 | * 17 | * @author Fabien Potencier 18 | * 19 | * @api 20 | */ 21 | interface RequestMatcherInterface 22 | { 23 | /** 24 | * Decides whether the rule(s) implemented by the strategy matches the supplied request. 25 | * 26 | * @param Request $request The request to check for a match 27 | * 28 | * @return bool true if the request matches, false otherwise 29 | * 30 | * @api 31 | */ 32 | public function matches(Request $request); 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Application/MonologTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Application; 13 | 14 | use Monolog\Logger; 15 | 16 | /** 17 | * Monolog trait. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | trait MonologTrait 22 | { 23 | /** 24 | * Adds a log record. 25 | * 26 | * @param string $message The log message 27 | * @param array $context The log context 28 | * @param integer $level The logging level 29 | * 30 | * @return Boolean Whether the record has been processed 31 | */ 32 | public function log($message, array $context = array(), $level = Logger::INFO) 33 | { 34 | return $this['monolog']->addRecord($level, $message, $context); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedMethodException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * Undefined Method Exception. 16 | * 17 | * @author Grégoire Pineau 18 | */ 19 | class UndefinedMethodException extends FatalErrorException 20 | { 21 | public function __construct($message, \ErrorException $previous) 22 | { 23 | parent::__construct( 24 | $message, 25 | $previous->getCode(), 26 | $previous->getSeverity(), 27 | $previous->getFile(), 28 | $previous->getLine(), 29 | $previous->getPrevious() 30 | ); 31 | $this->setTrace($previous->getTrace()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/ControllerResolverTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests; 13 | 14 | use Silex\ControllerResolver; 15 | use Silex\Application; 16 | use Symfony\Component\HttpFoundation\Request; 17 | 18 | /** 19 | * ControllerResolver test cases. 20 | * 21 | * @author Fabien Potencier 22 | */ 23 | class ControllerResolverTest extends \PHPUnit_Framework_TestCase 24 | { 25 | public function testGetArguments() 26 | { 27 | $app = new Application(); 28 | $resolver = new ControllerResolver($app); 29 | 30 | $controller = function (Application $app) {}; 31 | 32 | $args = $resolver->getArguments(Request::create('/'), $controller); 33 | $this->assertSame($app, $args[0]); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/FormTraitTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | use Silex\Provider\FormServiceProvider; 16 | 17 | /** 18 | * FormTrait test cases. 19 | * 20 | * @author Fabien Potencier 21 | * 22 | * @requires PHP 5.4 23 | */ 24 | class FormTraitTest extends \PHPUnit_Framework_TestCase 25 | { 26 | public function testForm() 27 | { 28 | $this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form()); 29 | } 30 | 31 | public function createApplication() 32 | { 33 | $app = new FormApplication(); 34 | $app->register(new FormServiceProvider()); 35 | 36 | return $app; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/UndefinedFunctionException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * Undefined Function Exception. 16 | * 17 | * @author Konstanton Myakshin 18 | */ 19 | class UndefinedFunctionException extends FatalErrorException 20 | { 21 | public function __construct($message, \ErrorException $previous) 22 | { 23 | parent::__construct( 24 | $message, 25 | $previous->getCode(), 26 | $previous->getSeverity(), 27 | $previous->getFile(), 28 | $previous->getLine(), 29 | $previous->getPrevious() 30 | ); 31 | $this->setTrace($previous->getTrace()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/RouteCompilerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing; 13 | 14 | /** 15 | * RouteCompilerInterface is the interface that all RouteCompiler classes must implement. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface RouteCompilerInterface 20 | { 21 | /** 22 | * Compiles the current route instance. 23 | * 24 | * @param Route $route A Route instance 25 | * 26 | * @return CompiledRoute A CompiledRoute instance 27 | * 28 | * @throws \LogicException If the Route cannot be compiled because the 29 | * path or host pattern is invalid 30 | */ 31 | public static function compile(Route $route); 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/GoneHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * GoneHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class GoneHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(410, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Loader/AbstractAnnotationLoaderTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests\Loader; 13 | 14 | abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase 15 | { 16 | public function getReader() 17 | { 18 | return $this->getMockBuilder('Doctrine\Common\Annotations\Reader') 19 | ->disableOriginalConstructor() 20 | ->getMock() 21 | ; 22 | } 23 | 24 | public function getClassLoader($reader) 25 | { 26 | return $this->getMockBuilder('Symfony\Component\Routing\Loader\AnnotationClassLoader') 27 | ->setConstructorArgs(array($reader)) 28 | ->getMockForAbstractClass() 29 | ; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/ClassNotFoundException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * Class (or Trait or Interface) Not Found Exception. 16 | * 17 | * @author Konstanton Myakshin 18 | */ 19 | class ClassNotFoundException extends FatalErrorException 20 | { 21 | public function __construct($message, \ErrorException $previous) 22 | { 23 | parent::__construct( 24 | $message, 25 | $previous->getCode(), 26 | $previous->getSeverity(), 27 | $previous->getFile(), 28 | $previous->getLine(), 29 | $previous->getPrevious() 30 | ); 31 | $this->setTrace($previous->getTrace()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\CacheWarmer; 13 | 14 | /** 15 | * Interface for classes able to warm up the cache. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface CacheWarmerInterface extends WarmableInterface 20 | { 21 | /** 22 | * Checks whether this warmer is optional or not. 23 | * 24 | * Optional warmers can be ignored on certain conditions. 25 | * 26 | * A warmer should return true if the cache can be 27 | * generated incrementally and on-demand. 28 | * 29 | * @return bool true if the warmer is optional, false otherwise 30 | */ 31 | public function isOptional(); 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ConflictHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * ConflictHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class ConflictHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(409, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\EventDispatcher\Debug; 13 | 14 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; 15 | 16 | /** 17 | * @author Fabien Potencier 18 | */ 19 | interface TraceableEventDispatcherInterface extends EventDispatcherInterface 20 | { 21 | /** 22 | * Gets the called listeners. 23 | * 24 | * @return array An array of called listeners 25 | */ 26 | public function getCalledListeners(); 27 | 28 | /** 29 | * Gets the not called listeners. 30 | * 31 | * @return array An array of not called listeners 32 | */ 33 | public function getNotCalledListeners(); 34 | } 35 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/BadRequestHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * BadRequestHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class BadRequestHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(400, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotFoundHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * NotFoundHttpException. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class NotFoundHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(404, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/NotAcceptableHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * NotAcceptableHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class NotAcceptableHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(406, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/LengthRequiredHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * LengthRequiredHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class LengthRequiredHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(411, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionFailedHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * PreconditionFailedHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class PreconditionFailedHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(412, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\CacheWarmer; 13 | 14 | /** 15 | * Abstract cache warmer that knows how to write a file to the cache. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | abstract class CacheWarmer implements CacheWarmerInterface 20 | { 21 | protected function writeCacheFile($file, $content) 22 | { 23 | $tmpFile = tempnam(dirname($file), basename($file)); 24 | if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) { 25 | @chmod($file, 0666 & ~umask()); 26 | 27 | return; 28 | } 29 | 30 | throw new \RuntimeException(sprintf('Failed to write cache file "%s".', $file)); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnsupportedMediaTypeHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * UnsupportedMediaTypeHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class UnsupportedMediaTypeHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(415, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Provider/UrlGeneratorServiceProvider.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\Provider; 13 | 14 | use Silex\Application; 15 | use Silex\ServiceProviderInterface; 16 | use Symfony\Component\Routing\Generator\UrlGenerator; 17 | 18 | /** 19 | * Symfony Routing component Provider for URL generation. 20 | * 21 | * @author Fabien Potencier 22 | */ 23 | class UrlGeneratorServiceProvider implements ServiceProviderInterface 24 | { 25 | public function register(Application $app) 26 | { 27 | $app['url_generator'] = $app->share(function ($app) { 28 | $app->flush(); 29 | 30 | return new UrlGenerator($app['routes'], $app['request_context']); 31 | }); 32 | } 33 | 34 | public function boot(Application $app) 35 | { 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnprocessableEntityHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * UnprocessableEntityHttpException. 16 | * 17 | * @author Steve Hutchins 18 | */ 19 | class UnprocessableEntityHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $message The internal exception message 25 | * @param \Exception $previous The previous exception 26 | * @param int $code The internal exception code 27 | */ 28 | public function __construct($message = null, \Exception $previous = null, $code = 0) 29 | { 30 | parent::__construct(422, $message, $previous, array(), $code); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/RouterInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing; 13 | 14 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; 15 | use Symfony\Component\Routing\Matcher\UrlMatcherInterface; 16 | 17 | /** 18 | * RouterInterface is the interface that all Router classes must implement. 19 | * 20 | * This interface is the concatenation of UrlMatcherInterface and UrlGeneratorInterface. 21 | * 22 | * @author Fabien Potencier 23 | */ 24 | interface RouterInterface extends UrlMatcherInterface, UrlGeneratorInterface 25 | { 26 | /** 27 | * Gets the RouteCollection instance associated with this Router. 28 | * 29 | * @return RouteCollection A RouteCollection instance 30 | */ 31 | public function getRouteCollection(); 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/Exception/ContextErrorException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\Exception; 13 | 14 | /** 15 | * Error Exception with Variable Context. 16 | * 17 | * @author Christian Sciberras 18 | */ 19 | class ContextErrorException extends \ErrorException 20 | { 21 | private $context = array(); 22 | 23 | public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) 24 | { 25 | parent::__construct($message, $code, $severity, $filename, $lineno); 26 | $this->context = $context; 27 | } 28 | 29 | /** 30 | * @return array Array of variables that existed when the exception occurred 31 | */ 32 | public function getContext() 33 | { 34 | return $this->context; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Log/DebugLoggerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Log; 13 | 14 | /** 15 | * DebugLoggerInterface. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface DebugLoggerInterface 20 | { 21 | /** 22 | * Returns an array of logs. 23 | * 24 | * A log is an array with the following mandatory keys: 25 | * timestamp, message, priority, and priorityName. 26 | * It can also have an optional context key containing an array. 27 | * 28 | * @return array An array of logs 29 | */ 30 | public function getLogs(); 31 | 32 | /** 33 | * Returns the number of errors. 34 | * 35 | * @return int The number of errors 36 | */ 37 | public function countErrors(); 38 | } 39 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Matcher/RedirectableUrlMatcherInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Matcher; 13 | 14 | /** 15 | * RedirectableUrlMatcherInterface knows how to redirect the user. 16 | * 17 | * @author Fabien Potencier 18 | * 19 | * @api 20 | */ 21 | interface RedirectableUrlMatcherInterface 22 | { 23 | /** 24 | * Redirects the user to another URL. 25 | * 26 | * @param string $path The path info to redirect to. 27 | * @param string $route The route name that matched 28 | * @param string|null $scheme The URL scheme (null to keep the current one) 29 | * 30 | * @return array An array of parameters 31 | * 32 | * @api 33 | */ 34 | public function redirect($path, $route, $scheme = null); 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/File/FakeFile.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Tests\File; 13 | 14 | use Symfony\Component\HttpFoundation\File\File as OrigFile; 15 | 16 | class FakeFile extends OrigFile 17 | { 18 | private $realpath; 19 | 20 | public function __construct($realpath, $path) 21 | { 22 | $this->realpath = $realpath; 23 | parent::__construct($path, false); 24 | } 25 | 26 | public function isReadable() 27 | { 28 | return true; 29 | } 30 | 31 | public function getRealpath() 32 | { 33 | return $this->realpath; 34 | } 35 | 36 | public function getSize() 37 | { 38 | return 42; 39 | } 40 | 41 | public function getMTime() 42 | { 43 | return time(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/AccessDeniedHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * AccessDeniedHttpException. 16 | * 17 | * @author Fabien Potencier 18 | * @author Christophe Coevoet 19 | */ 20 | class AccessDeniedHttpException extends HttpException 21 | { 22 | /** 23 | * Constructor. 24 | * 25 | * @param string $message The internal exception message 26 | * @param \Exception $previous The previous exception 27 | * @param int $code The internal exception code 28 | */ 29 | public function __construct($message = null, \Exception $previous = null, $code = 0) 30 | { 31 | parent::__construct(403, $message, $previous, array(), $code); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/NativeProxyTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Proxy; 13 | 14 | use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; 15 | 16 | /** 17 | * Test class for NativeProxy. 18 | * 19 | * @author Drak 20 | */ 21 | class NativeProxyTest extends \PHPUnit_Framework_TestCase 22 | { 23 | public function testIsWrapper() 24 | { 25 | $proxy = new NativeProxy(); 26 | $this->assertFalse($proxy->isWrapper()); 27 | } 28 | 29 | public function testGetSaveHandlerName() 30 | { 31 | $name = ini_get('session.save_handler'); 32 | $proxy = new NativeProxy(); 33 | $this->assertEquals($name, $proxy->getSaveHandlerName()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/PreconditionRequiredHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * PreconditionRequiredHttpException. 16 | * 17 | * @author Ben Ramsey 18 | * @see http://tools.ietf.org/html/rfc6585 19 | */ 20 | class PreconditionRequiredHttpException extends HttpException 21 | { 22 | /** 23 | * Constructor. 24 | * 25 | * @param string $message The internal exception message 26 | * @param \Exception $previous The previous exception 27 | * @param int $code The internal exception code 28 | */ 29 | public function __construct($message = null, \Exception $previous = null, $code = 0) 30 | { 31 | parent::__construct(428, $message, $previous, array(), $code); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/http-foundation", 3 | "type": "library", 4 | "description": "Symfony HttpFoundation Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "symfony/expression-language": "~2.4" 23 | }, 24 | "autoload": { 25 | "psr-0": { "Symfony\\Component\\HttpFoundation\\": "" }, 26 | "classmap": [ "Symfony/Component/HttpFoundation/Resources/stubs" ] 27 | }, 28 | "target-dir": "Symfony/Component/HttpFoundation", 29 | "minimum-stability": "dev", 30 | "extra": { 31 | "branch-alias": { 32 | "dev-master": "2.5-dev" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/HttpCache.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex; 13 | 14 | use Symfony\Component\HttpKernel\HttpCache\HttpCache as BaseHttpCache; 15 | use Symfony\Component\HttpFoundation\Request; 16 | 17 | /** 18 | * HTTP Cache extension to allow using the run() shortcut. 19 | * 20 | * @author Fabien Potencier 21 | */ 22 | class HttpCache extends BaseHttpCache 23 | { 24 | /** 25 | * Handles the Request and delivers the Response. 26 | * 27 | * @param Request $request The Request object 28 | */ 29 | public function run(Request $request = null) 30 | { 31 | if (null === $request) { 32 | $request = Request::createFromGlobals(); 33 | } 34 | 35 | $response = $this->handle($request); 36 | $response->send(); 37 | $this->terminate($request, $response); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009-2013 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Provider/SpoolStub.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Provider; 13 | 14 | class SpoolStub implements \Swift_Spool 15 | { 16 | private $messages = array(); 17 | public $hasFlushed = false; 18 | 19 | public function getMessages() 20 | { 21 | return $this->messages; 22 | } 23 | 24 | public function start() 25 | { 26 | } 27 | 28 | public function stop() 29 | { 30 | } 31 | 32 | public function isStarted() 33 | { 34 | return count($this->messages) > 0; 35 | } 36 | 37 | public function queueMessage(\Swift_Mime_Message $message) 38 | { 39 | $this->messages[] = $message; 40 | } 41 | 42 | public function flushQueue(\Swift_Transport $transport, &$failedRecipients = null) 43 | { 44 | $this->hasFlushed = true; 45 | $this->messages = array(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/debug", 3 | "type": "library", 4 | "description": "Symfony Debug Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "symfony/http-kernel": "~2.1", 23 | "symfony/http-foundation": "~2.1" 24 | }, 25 | "suggest": { 26 | "symfony/http-foundation": "", 27 | "symfony/http-kernel": "" 28 | }, 29 | "autoload": { 30 | "psr-0": { "Symfony\\Component\\Debug\\": "" } 31 | }, 32 | "target-dir": "Symfony/Component/Debug", 33 | "minimum-stability": "dev", 34 | "extra": { 35 | "branch-alias": { 36 | "dev-master": "2.5-dev" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/README.md: -------------------------------------------------------------------------------- 1 | Routing Component 2 | ================= 3 | 4 | Routing associates a request with the code that will convert it to a response. 5 | 6 | The example below demonstrates how you can set up a fully working routing 7 | system: 8 | 9 | ```php 10 | use Symfony\Component\HttpFoundation\Request; 11 | use Symfony\Component\Routing\Matcher\UrlMatcher; 12 | use Symfony\Component\Routing\RequestContext; 13 | use Symfony\Component\Routing\RouteCollection; 14 | use Symfony\Component\Routing\Route; 15 | 16 | $routes = new RouteCollection(); 17 | $routes->add('hello', new Route('/hello', array('controller' => 'foo'))); 18 | 19 | $context = new RequestContext(); 20 | 21 | // this is optional and can be done without a Request instance 22 | $context->fromRequest(Request::createFromGlobals()); 23 | 24 | $matcher = new UrlMatcher($routes, $context); 25 | 26 | $parameters = $matcher->match('/hello'); 27 | ``` 28 | 29 | Resources 30 | --------- 31 | 32 | You can run the unit tests with the following command: 33 | 34 | $ cd path/to/Symfony/Component/Routing/ 35 | $ composer.phar install 36 | $ phpunit 37 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 PHP Framework Interoperability Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/FatalErrorHandler/FatalErrorHandlerInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Debug\FatalErrorHandler; 13 | 14 | use Symfony\Component\Debug\Exception\FatalErrorException; 15 | 16 | /** 17 | * Attempts to convert fatal errors to exceptions. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | interface FatalErrorHandlerInterface 22 | { 23 | /** 24 | * Attempts to convert an error into an exception. 25 | * 26 | * @param array $error An array as returned by error_get_last() 27 | * @param FatalErrorException $exception A FatalErrorException instance 28 | * 29 | * @return FatalErrorException|null A FatalErrorException instance if the class is able to convert the error, null otherwise 30 | */ 31 | public function handleError(array $error, FatalErrorException $exception); 32 | } 33 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session; 13 | 14 | /** 15 | * Session Bag store. 16 | * 17 | * @author Drak 18 | */ 19 | interface SessionBagInterface 20 | { 21 | /** 22 | * Gets this bag's name 23 | * 24 | * @return string 25 | */ 26 | public function getName(); 27 | 28 | /** 29 | * Initializes the Bag 30 | * 31 | * @param array $array 32 | */ 33 | public function initialize(array &$array); 34 | 35 | /** 36 | * Gets the storage key for this bag. 37 | * 38 | * @return string 39 | */ 40 | public function getStorageKey(); 41 | 42 | /** 43 | * Clears out data from bag. 44 | * 45 | * @return mixed Whatever data was contained. 46 | */ 47 | public function clear(); 48 | } 49 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/HttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * HttpException. 16 | * 17 | * @author Kris Wallsmith 18 | */ 19 | class HttpException extends \RuntimeException implements HttpExceptionInterface 20 | { 21 | private $statusCode; 22 | private $headers; 23 | 24 | public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = array(), $code = 0) 25 | { 26 | $this->statusCode = $statusCode; 27 | $this->headers = $headers; 28 | 29 | parent::__construct($message, $code, $previous); 30 | } 31 | 32 | public function getStatusCode() 33 | { 34 | return $this->statusCode; 35 | } 36 | 37 | public function getHeaders() 38 | { 39 | return $this->headers; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/ServiceProviderInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex; 13 | 14 | /** 15 | * Interface that all Silex service providers must implement. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | interface ServiceProviderInterface 20 | { 21 | /** 22 | * Registers services on the given app. 23 | * 24 | * This method should only be used to configure services and parameters. 25 | * It should not get services. 26 | * 27 | * @param Application $app An Application instance 28 | */ 29 | public function register(Application $app); 30 | 31 | /** 32 | * Bootstraps the application. 33 | * 34 | * This method is called after all services are registered 35 | * and should be used for "dynamic" configuration (whenever 36 | * a service must be requested). 37 | */ 38 | public function boot(Application $app); 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/ApacheRequest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * Request represents an HTTP request from an Apache server. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | class ApacheRequest extends Request 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | protected function prepareRequestUri() 25 | { 26 | return $this->server->get('REQUEST_URI'); 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | protected function prepareBaseUrl() 33 | { 34 | $baseUrl = $this->server->get('SCRIPT_NAME'); 35 | 36 | if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) { 37 | // assume mod_rewrite 38 | return rtrim(dirname($baseUrl), '/\\'); 39 | } 40 | 41 | return $baseUrl; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2014 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Matcher\Dumper; 13 | 14 | use Symfony\Component\Routing\RouteCollection; 15 | 16 | /** 17 | * MatcherDumper is the abstract class for all built-in matcher dumpers. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | abstract class MatcherDumper implements MatcherDumperInterface 22 | { 23 | /** 24 | * @var RouteCollection 25 | */ 26 | private $routes; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @param RouteCollection $routes The RouteCollection to dump 32 | */ 33 | public function __construct(RouteCollection $routes) 34 | { 35 | $this->routes = $routes; 36 | } 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function getRoutes() 42 | { 43 | return $this->routes; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; 13 | 14 | /** 15 | * NativeProxy. 16 | * 17 | * This proxy is built-in session handlers in PHP 5.3.x 18 | * 19 | * @author Drak 20 | */ 21 | class NativeProxy extends AbstractProxy 22 | { 23 | /** 24 | * Constructor. 25 | */ 26 | public function __construct() 27 | { 28 | // this makes an educated guess as to what the handler is since it should already be set. 29 | $this->saveHandlerName = ini_get('session.save_handler'); 30 | } 31 | 32 | /** 33 | * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. 34 | * 35 | * @return bool False. 36 | */ 37 | public function isWrapper() 38 | { 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Generator\Dumper; 13 | 14 | use Symfony\Component\Routing\RouteCollection; 15 | 16 | /** 17 | * GeneratorDumper is the base class for all built-in generator dumpers. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | abstract class GeneratorDumper implements GeneratorDumperInterface 22 | { 23 | /** 24 | * @var RouteCollection 25 | */ 26 | private $routes; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @param RouteCollection $routes The RouteCollection to dump 32 | */ 33 | public function __construct(RouteCollection $routes) 34 | { 35 | $this->routes = $routes; 36 | } 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function getRoutes() 42 | { 43 | return $this->routes; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/UnauthorizedHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * UnauthorizedHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class UnauthorizedHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param string $challenge WWW-Authenticate challenge string 25 | * @param string $message The internal exception message 26 | * @param \Exception $previous The previous exception 27 | * @param int $code The internal exception code 28 | */ 29 | public function __construct($challenge, $message = null, \Exception $previous = null, $code = 0) 30 | { 31 | $headers = array('WWW-Authenticate' => $challenge); 32 | 33 | parent::__construct(401, $message, $previous, $headers, $code); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\MimeType; 13 | 14 | use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; 15 | use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; 16 | 17 | /** 18 | * Guesses the mime type of a file 19 | * 20 | * @author Bernhard Schussek 21 | */ 22 | interface MimeTypeGuesserInterface 23 | { 24 | /** 25 | * Guesses the mime type of the file with the given path. 26 | * 27 | * @param string $path The path to the file 28 | * 29 | * @return string The mime type or NULL, if none could be guessed 30 | * 31 | * @throws FileNotFoundException If the file does not exist 32 | * @throws AccessDeniedException If the file could not be read 33 | */ 34 | public function guess($path); 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/MethodNotAllowedHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * MethodNotAllowedHttpException. 16 | * 17 | * @author Kris Wallsmith 18 | */ 19 | class MethodNotAllowedHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $allow An array of allowed methods 25 | * @param string $message The internal exception message 26 | * @param \Exception $previous The previous exception 27 | * @param int $code The internal exception code 28 | */ 29 | public function __construct(array $allow, $message = null, \Exception $previous = null, $code = 0) 30 | { 31 | $headers = array('Allow' => strtoupper(implode(', ', $allow))); 32 | 33 | parent::__construct(405, $message, $previous, $headers, $code); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/MatcherDumperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Matcher\Dumper; 13 | 14 | use Symfony\Component\Routing\RouteCollection; 15 | 16 | /** 17 | * MatcherDumperInterface is the interface that all matcher dumper classes must implement. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | interface MatcherDumperInterface 22 | { 23 | /** 24 | * Dumps a set of routes to a string representation of executable code 25 | * that can then be used to match a request against these routes. 26 | * 27 | * @param array $options An array of options 28 | * 29 | * @return string Executable code 30 | */ 31 | public function dump(array $options = array()); 32 | 33 | /** 34 | * Gets the routes to dump. 35 | * 36 | * @return RouteCollection A RouteCollection instance 37 | */ 38 | public function getRoutes(); 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/Translator.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex; 13 | 14 | use Symfony\Component\Translation\Translator as BaseTranslator; 15 | use Symfony\Component\Translation\MessageSelector; 16 | 17 | /** 18 | * Translator that gets the current locale from the Silex application. 19 | * 20 | * @author Fabien Potencier 21 | */ 22 | class Translator extends BaseTranslator 23 | { 24 | protected $app; 25 | 26 | public function __construct(Application $app, MessageSelector $selector) 27 | { 28 | $this->app = $app; 29 | 30 | parent::__construct(null, $selector); 31 | } 32 | 33 | public function getLocale() 34 | { 35 | return $this->app['locale']; 36 | } 37 | 38 | public function setLocale($locale) 39 | { 40 | if (null === $locale) { 41 | return; 42 | } 43 | 44 | $this->app['locale'] = $locale; 45 | 46 | parent::setLocale($locale); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Provider/SerializerServiceProviderTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Provider; 13 | 14 | use Silex\Application; 15 | use Silex\Provider\SerializerServiceProvider; 16 | 17 | /** 18 | * SerializerServiceProvider test cases. 19 | * 20 | * @author Fabien Potencier 21 | */ 22 | class SerializerServiceProviderTest extends \PHPUnit_Framework_TestCase 23 | { 24 | public function testRegister() 25 | { 26 | $app = new Application(); 27 | 28 | $app->register(new SerializerServiceProvider()); 29 | 30 | $this->assertInstanceOf("Symfony\Component\Serializer\Serializer", $app['serializer']); 31 | $this->assertTrue($app['serializer']->supportsEncoding('xml')); 32 | $this->assertTrue($app['serializer']->supportsEncoding('json')); 33 | $this->assertTrue($app['serializer']->supportsDecoding('xml')); 34 | $this->assertTrue($app['serializer']->supportsDecoding('json')); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/doc/cookbook/index.rst: -------------------------------------------------------------------------------- 1 | Cookbook 2 | ======== 3 | 4 | The cookbook section contains recipes for solving specific problems. 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | :hidden: 9 | 10 | json_request_body 11 | translating_validation_messages 12 | session_storage 13 | form_no_csrf 14 | validator_yaml 15 | sub_requests 16 | error_handler 17 | multiple_loggers 18 | assets 19 | 20 | Recipes 21 | ------- 22 | 23 | * :doc:`Accepting a JSON Request Body ` A common need when 24 | building a restful API is the ability to accept a JSON encoded entity from 25 | the request body. 26 | 27 | * :doc:`Translating Validation Messages`. 28 | 29 | * :doc:`Using PdoSessionStorage to store Sessions in the Database 30 | `. 31 | 32 | * :doc:`Disabling the CSRF Protection on a Form using the FormExtension 33 | `. 34 | 35 | * :doc:`Using YAML to configure Validation `. 36 | 37 | * :doc:`Making sub-Requests `. 38 | 39 | * :doc:`Converting Errors to Exceptions `. 40 | 41 | * :doc:`Using multiple Monolog Loggers `. 42 | 43 | * :doc:`Managing Assets in Templates `. 44 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/debug/Symfony/Component/Debug/README.md: -------------------------------------------------------------------------------- 1 | Debug Component 2 | =============== 3 | 4 | Debug provides tools to make debugging easier. 5 | 6 | Enabling all debug tools is as easy as calling the `enable()` method on the 7 | main `Debug` class: 8 | 9 | ```php 10 | use Symfony\Component\Debug\Debug; 11 | 12 | Debug::enable(); 13 | ``` 14 | 15 | You can also use the tools individually: 16 | 17 | ```php 18 | use Symfony\Component\Debug\ErrorHandler; 19 | use Symfony\Component\Debug\ExceptionHandler; 20 | 21 | error_reporting(-1); 22 | 23 | ErrorHandler::register($errorReportingLevel); 24 | if ('cli' !== php_sapi_name()) { 25 | ExceptionHandler::register(); 26 | } elseif (!ini_get('log_errors') || ini_get('error_log')) { 27 | ini_set('display_errors', 1); 28 | } 29 | ``` 30 | 31 | Note that the `Debug::enable()` call also registers the debug class loader 32 | from the Symfony ClassLoader component when available. 33 | 34 | This component can optionally take advantage of the features of the HttpKernel 35 | and HttpFoundation components. 36 | 37 | Resources 38 | --------- 39 | 40 | You can run the unit tests with the following command: 41 | 42 | $ cd path/to/Symfony/Component/Debug/ 43 | $ composer.phar install --dev 44 | $ phpunit 45 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Generator/Dumper/GeneratorDumperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Generator\Dumper; 13 | 14 | use Symfony\Component\Routing\RouteCollection; 15 | 16 | /** 17 | * GeneratorDumperInterface is the interface that all generator dumper classes must implement. 18 | * 19 | * @author Fabien Potencier 20 | * 21 | * @api 22 | */ 23 | interface GeneratorDumperInterface 24 | { 25 | /** 26 | * Dumps a set of routes to a string representation of executable code 27 | * that can then be used to generate a URL of such a route. 28 | * 29 | * @param array $options An array of options 30 | * 31 | * @return string Executable code 32 | */ 33 | public function dump(array $options = array()); 34 | 35 | /** 36 | * Gets the routes to dump. 37 | * 38 | * @return RouteCollection A RouteCollection instance 39 | */ 40 | public function getRoutes(); 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\DependencyInjection; 13 | 14 | use Symfony\Component\DependencyInjection\Extension\Extension as BaseExtension; 15 | 16 | /** 17 | * Allow adding classes to the class cache. 18 | * 19 | * @author Fabien Potencier 20 | */ 21 | abstract class Extension extends BaseExtension 22 | { 23 | private $classes = array(); 24 | 25 | /** 26 | * Gets the classes to cache. 27 | * 28 | * @return array An array of classes 29 | */ 30 | public function getClassesToCompile() 31 | { 32 | return $this->classes; 33 | } 34 | 35 | /** 36 | * Adds classes to the class cache. 37 | * 38 | * @param array $classes An array of classes 39 | */ 40 | public function addClassesToCompile(array $classes) 41 | { 42 | $this->classes = array_merge($this->classes, $classes); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/CompiledRouteTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Tests; 13 | 14 | use Symfony\Component\Routing\CompiledRoute; 15 | 16 | class CompiledRouteTest extends \PHPUnit_Framework_TestCase 17 | { 18 | public function testAccessors() 19 | { 20 | $compiled = new CompiledRoute('prefix', 'regex', array('tokens'), array(), array(), array(), array(), array('variables')); 21 | $this->assertEquals('prefix', $compiled->getStaticPrefix(), '__construct() takes a static prefix as its second argument'); 22 | $this->assertEquals('regex', $compiled->getRegex(), '__construct() takes a regexp as its third argument'); 23 | $this->assertEquals(array('tokens'), $compiled->getTokens(), '__construct() takes an array of tokens as its fourth argument'); 24 | $this->assertEquals(array('variables'), $compiled->getVariables(), '__construct() takes an array of variables as its ninth argument'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/TerminableInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel; 13 | 14 | use Symfony\Component\HttpFoundation\Request; 15 | use Symfony\Component\HttpFoundation\Response; 16 | 17 | /** 18 | * Terminable extends the Kernel request/response cycle with dispatching a post 19 | * response event after sending the response and before shutting down the kernel. 20 | * 21 | * @author Jordi Boggiano 22 | * @author Pierre Minnieur 23 | * 24 | * @api 25 | */ 26 | interface TerminableInterface 27 | { 28 | /** 29 | * Terminates a request/response cycle. 30 | * 31 | * Should be called after sending the response and before shutting down the kernel. 32 | * 33 | * @param Request $request A Request instance 34 | * @param Response $response A Response instance 35 | * 36 | * @api 37 | */ 38 | public function terminate(Request $request, Response $response); 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/event-dispatcher", 3 | "type": "library", 4 | "description": "Symfony EventDispatcher Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.3" 20 | }, 21 | "require-dev": { 22 | "symfony/dependency-injection": "~2.0,<2.6.0", 23 | "symfony/config": "~2.0", 24 | "symfony/stopwatch": "~2.2", 25 | "psr/log": "~1.0" 26 | }, 27 | "suggest": { 28 | "symfony/dependency-injection": "", 29 | "symfony/http-kernel": "" 30 | }, 31 | "autoload": { 32 | "psr-0": { "Symfony\\Component\\EventDispatcher\\": "" } 33 | }, 34 | "target-dir": "Symfony/Component/EventDispatcher", 35 | "minimum-stability": "dev", 36 | "extra": { 37 | "branch-alias": { 38 | "dev-master": "2.5-dev" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/psr/log/README.md: -------------------------------------------------------------------------------- 1 | PSR Log 2 | ======= 3 | 4 | This repository holds all interfaces/classes/traits related to 5 | [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). 6 | 7 | Note that this is not a logger of its own. It is merely an interface that 8 | describes a logger. See the specification for more details. 9 | 10 | Usage 11 | ----- 12 | 13 | If you need a logger, you can use the interface like this: 14 | 15 | ```php 16 | logger = $logger; 27 | } 28 | 29 | public function doSomething() 30 | { 31 | if ($this->logger) { 32 | $this->logger->info('Doing work'); 33 | } 34 | 35 | // do something useful 36 | } 37 | } 38 | ``` 39 | 40 | You can then pick one of the implementations of the interface to get a logger. 41 | 42 | If you want to implement the interface, you can require this package and 43 | implement `Psr\Log\LoggerInterface` in your code. Please read the 44 | [specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) 45 | for details. 46 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/DataCollectorInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\DataCollector; 13 | 14 | use Symfony\Component\HttpFoundation\Request; 15 | use Symfony\Component\HttpFoundation\Response; 16 | 17 | /** 18 | * DataCollectorInterface. 19 | * 20 | * @author Fabien Potencier 21 | * 22 | * @api 23 | */ 24 | interface DataCollectorInterface 25 | { 26 | /** 27 | * Collects data for the given Request and Response. 28 | * 29 | * @param Request $request A Request instance 30 | * @param Response $response A Response instance 31 | * @param \Exception $exception An Exception instance 32 | * 33 | * @api 34 | */ 35 | public function collect(Request $request, Response $response, \Exception $exception = null); 36 | 37 | /** 38 | * Returns the name of the collector. 39 | * 40 | * @return string The collector name 41 | * 42 | * @api 43 | */ 44 | public function getName(); 45 | } 46 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/doc/cookbook/validator_yaml.rst: -------------------------------------------------------------------------------- 1 | Using YAML to configure Validation 2 | ================================== 3 | 4 | Simplicity is at the heart of Silex so there is no out of the box solution to 5 | use YAML files for validation. But this doesn't mean that this is not 6 | possible. Let's see how to do it. 7 | 8 | First, you need to install the YAML Component. Declare it as a dependency in 9 | your ``composer.json`` file: 10 | 11 | .. code-block:: json 12 | 13 | "require": { 14 | "symfony/yaml": "~2.3" 15 | } 16 | 17 | Next, you need to tell the Validation Service that you are not using 18 | ``StaticMethodLoader`` to load your class metadata but a YAML file:: 19 | 20 | $app->register(new ValidatorServiceProvider()); 21 | 22 | $app['validator.mapping.class_metadata_factory'] = new Symfony\Component\Validator\Mapping\ClassMetadataFactory( 23 | new Symfony\Component\Validator\Mapping\Loader\YamlFileLoader(__DIR__.'/validation.yml') 24 | ); 25 | 26 | Now, we can replace the usage of the static method and move all the validation 27 | rules to ``validation.yml``: 28 | 29 | .. code-block:: yaml 30 | 31 | # validation.yml 32 | Post: 33 | properties: 34 | title: 35 | - NotNull: ~ 36 | - NotBlank: ~ 37 | body: 38 | - Min: 100 39 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/TestHttpKernel.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests; 13 | 14 | use Symfony\Component\HttpKernel\HttpKernel; 15 | use Symfony\Component\HttpFoundation\Request; 16 | use Symfony\Component\HttpFoundation\Response; 17 | use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; 18 | use Symfony\Component\EventDispatcher\EventDispatcher; 19 | 20 | class TestHttpKernel extends HttpKernel implements ControllerResolverInterface 21 | { 22 | public function __construct() 23 | { 24 | parent::__construct(new EventDispatcher(), $this); 25 | } 26 | 27 | public function getController(Request $request) 28 | { 29 | return array($this, 'callController'); 30 | } 31 | 32 | public function getArguments(Request $request, $controller) 33 | { 34 | return array($request); 35 | } 36 | 37 | public function callController(Request $request) 38 | { 39 | return new Response('Request: '.$request->getRequestUri()); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This code is partially based on the Rack-Cache library by Ryan Tomayko, 9 | * which is released under the MIT license. 10 | * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) 11 | * 12 | * For the full copyright and license information, please view the LICENSE 13 | * file that was distributed with this source code. 14 | */ 15 | 16 | namespace Symfony\Component\HttpKernel\HttpCache; 17 | 18 | use Symfony\Component\HttpFoundation\Response; 19 | 20 | /** 21 | * EsiResponseCacheStrategyInterface implementations know how to compute the 22 | * Response cache HTTP header based on the different ESI response cache headers. 23 | * 24 | * @author Fabien Potencier 25 | */ 26 | interface EsiResponseCacheStrategyInterface 27 | { 28 | /** 29 | * Adds a Response. 30 | * 31 | * @param Response $response 32 | */ 33 | public function add(Response $response); 34 | 35 | /** 36 | * Updates the Response HTTP headers based on the embedded Responses. 37 | * 38 | * @param Response $response 39 | */ 40 | public function update(Response $response); 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/ServiceUnavailableHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * ServiceUnavailableHttpException. 16 | * 17 | * @author Ben Ramsey 18 | */ 19 | class ServiceUnavailableHttpException extends HttpException 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried 25 | * @param string $message The internal exception message 26 | * @param \Exception $previous The previous exception 27 | * @param int $code The internal exception code 28 | */ 29 | public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) 30 | { 31 | $headers = array(); 32 | if ($retryAfter) { 33 | $headers = array('Retry-After' => $retryAfter); 34 | } 35 | 36 | parent::__construct(503, $message, $previous, $headers, $code); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Tests/Fixtures/validpattern.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | MyBundle:Blog:show 9 | \w+ 10 | 11 | context.getMethod() == "GET" 12 | 13 | 14 | 15 | MyBundle:Blog:show 16 | 17 | GET|POST|put|OpTiOnS 18 | hTTps 19 | \w+ 20 | 21 | context.getMethod() == "GET" 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Exception/MethodNotAllowedException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Exception; 13 | 14 | /** 15 | * The resource was found but the request method is not allowed. 16 | * 17 | * This exception should trigger an HTTP 405 response in your application code. 18 | * 19 | * @author Kris Wallsmith 20 | * 21 | * @api 22 | */ 23 | class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface 24 | { 25 | /** 26 | * @var array 27 | */ 28 | protected $allowedMethods = array(); 29 | 30 | public function __construct(array $allowedMethods, $message = null, $code = 0, \Exception $previous = null) 31 | { 32 | $this->allowedMethods = array_map('strtoupper', $allowedMethods); 33 | 34 | parent::__construct($message, $code, $previous); 35 | } 36 | 37 | /** 38 | * Gets the allowed HTTP methods. 39 | * 40 | * @return array 41 | */ 42 | public function getAllowedMethods() 43 | { 44 | return $this->allowedMethods; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/EventListener/LocaleListener.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex\EventListener; 13 | 14 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; 15 | use Symfony\Component\HttpKernel\EventListener\LocaleListener as BaseLocaleListener; 16 | use Symfony\Component\HttpFoundation\RequestStack; 17 | use Symfony\Component\Routing\RequestContextAwareInterface; 18 | use Silex\Application; 19 | 20 | /** 21 | * Initializes the locale based on the current request. 22 | * 23 | * @author Fabien Potencier 24 | */ 25 | class LocaleListener extends BaseLocaleListener 26 | { 27 | protected $app; 28 | 29 | public function __construct(Application $app, RequestContextAwareInterface $router = null, RequestStack $requestStack = null) 30 | { 31 | parent::__construct($app['locale'], $router, $requestStack); 32 | 33 | $this->app = $app; 34 | } 35 | 36 | public function onKernelRequest(GetResponseEvent $event) 37 | { 38 | parent::onKernelRequest($event); 39 | 40 | $this->app['locale'] = $event->getRequest()->getLocale(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\DependencyInjection; 13 | 14 | use Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass as BaseMergeExtensionConfigurationPass; 15 | use Symfony\Component\DependencyInjection\ContainerBuilder; 16 | 17 | /** 18 | * Ensures certain extensions are always loaded. 19 | * 20 | * @author Kris Wallsmith 21 | */ 22 | class MergeExtensionConfigurationPass extends BaseMergeExtensionConfigurationPass 23 | { 24 | private $extensions; 25 | 26 | public function __construct(array $extensions) 27 | { 28 | $this->extensions = $extensions; 29 | } 30 | 31 | public function process(ContainerBuilder $container) 32 | { 33 | foreach ($this->extensions as $extension) { 34 | if (!count($container->getExtensionConfig($extension))) { 35 | $container->loadFromExtension($extension, array()); 36 | } 37 | } 38 | 39 | parent::process($container); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/UriSignerTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests; 13 | 14 | use Symfony\Component\HttpKernel\UriSigner; 15 | 16 | class UriSignerTest extends \PHPUnit_Framework_TestCase 17 | { 18 | public function testSign() 19 | { 20 | $signer = new UriSigner('foobar'); 21 | 22 | $this->assertContains('?_hash=', $signer->sign('http://example.com/foo')); 23 | $this->assertContains('&_hash=', $signer->sign('http://example.com/foo?foo=bar')); 24 | } 25 | 26 | public function testCheck() 27 | { 28 | $signer = new UriSigner('foobar'); 29 | 30 | $this->assertFalse($signer->check('http://example.com/foo?_hash=foo')); 31 | $this->assertFalse($signer->check('http://example.com/foo?foo=bar&_hash=foo')); 32 | $this->assertFalse($signer->check('http://example.com/foo?foo=bar&_hash=foo&bar=foo')); 33 | 34 | $this->assertTrue($signer->check($signer->sign('http://example.com/foo'))); 35 | $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar'))); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/SwiftmailerTraitTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | use Silex\Provider\SwiftmailerServiceProvider; 16 | 17 | /** 18 | * SwiftmailerTrait test cases. 19 | * 20 | * @author Fabien Potencier 21 | * 22 | * @requires PHP 5.4 23 | */ 24 | class SwiftmailerTraitTest extends \PHPUnit_Framework_TestCase 25 | { 26 | public function testMail() 27 | { 28 | $app = $this->createApplication(); 29 | 30 | $message = $this->getMockBuilder('Swift_Message')->disableOriginalConstructor()->getMock(); 31 | $app['mailer'] = $mailer = $this->getMockBuilder('Swift_Mailer')->disableOriginalConstructor()->getMock(); 32 | $mailer->expects($this->once()) 33 | ->method('send') 34 | ->with($message) 35 | ; 36 | 37 | $app->mail($message); 38 | } 39 | 40 | public function createApplication() 41 | { 42 | $app = new SwiftmailerApplication(); 43 | $app->register(new SwiftmailerServiceProvider()); 44 | 45 | return $app; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/TooManyRequestsHttpException.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Exception; 13 | 14 | /** 15 | * TooManyRequestsHttpException. 16 | * 17 | * @author Ben Ramsey 18 | * @see http://tools.ietf.org/html/rfc6585 19 | */ 20 | class TooManyRequestsHttpException extends HttpException 21 | { 22 | /** 23 | * Constructor. 24 | * 25 | * @param int|string $retryAfter The number of seconds or HTTP-date after which the request may be retried 26 | * @param string $message The internal exception message 27 | * @param \Exception $previous The previous exception 28 | * @param int $code The internal exception code 29 | */ 30 | public function __construct($retryAfter = null, $message = null, \Exception $previous = null, $code = 0) 31 | { 32 | $headers = array(); 33 | if ($retryAfter) { 34 | $headers = array('Retry-After' => $retryAfter); 35 | } 36 | 37 | parent::__construct(429, $message, $previous, $headers, $code); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\Bundle; 13 | 14 | use Symfony\Component\DependencyInjection\ContainerBuilder; 15 | use Symfony\Component\DependencyInjection\Definition; 16 | use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionAbsentBundle\ExtensionAbsentBundle; 17 | use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand; 18 | use Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\ExtensionPresentBundle; 19 | 20 | class BundleTest extends \PHPUnit_Framework_TestCase 21 | { 22 | public function testRegisterCommands() 23 | { 24 | $cmd = new FooCommand(); 25 | $app = $this->getMock('Symfony\Component\Console\Application'); 26 | $app->expects($this->once())->method('add')->with($this->equalTo($cmd)); 27 | 28 | $bundle = new ExtensionPresentBundle(); 29 | $bundle->registerCommands($app); 30 | 31 | $bundle2 = new ExtensionAbsentBundle(); 32 | 33 | $this->assertNull($bundle2->registerCommands($app)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Loader/ClosureLoader.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Loader; 13 | 14 | use Symfony\Component\Config\Loader\Loader; 15 | use Symfony\Component\Routing\RouteCollection; 16 | 17 | /** 18 | * ClosureLoader loads routes from a PHP closure. 19 | * 20 | * The Closure must return a RouteCollection instance. 21 | * 22 | * @author Fabien Potencier 23 | * 24 | * @api 25 | */ 26 | class ClosureLoader extends Loader 27 | { 28 | /** 29 | * Loads a Closure. 30 | * 31 | * @param \Closure $closure A Closure 32 | * @param string|null $type The resource type 33 | * 34 | * @return RouteCollection A RouteCollection instance 35 | * 36 | * @api 37 | */ 38 | public function load($closure, $type = null) 39 | { 40 | return call_user_func($closure); 41 | } 42 | 43 | /** 44 | * {@inheritdoc} 45 | * 46 | * @api 47 | */ 48 | public function supports($resource, $type = null) 49 | { 50 | return $resource instanceof \Closure && (!$type || 'closure' === $type); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/ServiceControllerResolverRouterTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests; 13 | 14 | use Silex\Application; 15 | use Silex\Provider\ServiceControllerServiceProvider; 16 | use Symfony\Component\HttpFoundation\Request; 17 | 18 | /** 19 | * Router test cases, using the ServiceControllerResolver 20 | */ 21 | class ServiceControllerResolverRouterTest extends RouterTest 22 | { 23 | public function testServiceNameControllerSyntax() 24 | { 25 | $app = new Application(); 26 | 27 | $app['service_name'] = function () { 28 | return new MyController(); 29 | }; 30 | 31 | $app->get('/bar', 'service_name:getBar'); 32 | 33 | $this->checkRouteResponse($app, '/bar', 'bar'); 34 | } 35 | 36 | protected function checkRouteResponse(Application $app, $path, $expectedContent, $method = 'get', $message = null) 37 | { 38 | $app->register(new ServiceControllerServiceProvider()); 39 | 40 | $request = Request::create($path, $method); 41 | $response = $app->handle($request); 42 | $this->assertEquals($expectedContent, $response->getContent(), $message); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/StreamTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests; 13 | 14 | use Silex\Application; 15 | use Symfony\Component\HttpFoundation\Request; 16 | 17 | /** 18 | * Stream test cases. 19 | * 20 | * @author Igor Wiedler 21 | */ 22 | class StreamTest extends \PHPUnit_Framework_TestCase 23 | { 24 | public function testStreamReturnsStreamingResponse() 25 | { 26 | $app = new Application(); 27 | 28 | $response = $app->stream(); 29 | $this->assertInstanceOf('Symfony\Component\HttpFoundation\StreamedResponse', $response); 30 | $this->assertSame(false, $response->getContent()); 31 | } 32 | 33 | public function testStreamActuallyStreams() 34 | { 35 | $i = 0; 36 | 37 | $stream = function () use (&$i) { 38 | $i++; 39 | }; 40 | 41 | $app = new Application(); 42 | $response = $app->stream($stream); 43 | 44 | $this->assertEquals(0, $i); 45 | 46 | $request = Request::create('/stream'); 47 | $response->prepare($request); 48 | $response->sendContent(); 49 | 50 | $this->assertEquals(1, $i); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/tests/Pimple/Tests/NonInvokable.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Matcher; 13 | 14 | use Symfony\Component\HttpFoundation\Request; 15 | use Symfony\Component\Routing\Exception\ResourceNotFoundException; 16 | use Symfony\Component\Routing\Exception\MethodNotAllowedException; 17 | 18 | /** 19 | * RequestMatcherInterface is the interface that all request matcher classes must implement. 20 | * 21 | * @author Fabien Potencier 22 | */ 23 | interface RequestMatcherInterface 24 | { 25 | /** 26 | * Tries to match a request with a set of routes. 27 | * 28 | * If the matcher can not find information, it must throw one of the exceptions documented 29 | * below. 30 | * 31 | * @param Request $request The request to match 32 | * 33 | * @return array An array of parameters 34 | * 35 | * @throws ResourceNotFoundException If no matching resource could be found 36 | * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed 37 | */ 38 | public function matchRequest(Request $request); 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/tests/Silex/Tests/Application/MonologTraitTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * This source file is subject to the MIT license that is bundled 9 | * with this source code in the file LICENSE. 10 | */ 11 | 12 | namespace Silex\Tests\Application; 13 | 14 | use Silex\Application; 15 | use Silex\Provider\MonologServiceProvider; 16 | use Monolog\Handler\TestHandler; 17 | use Monolog\Logger; 18 | 19 | /** 20 | * MonologTrait test cases. 21 | * 22 | * @author Fabien Potencier 23 | * 24 | * @requires PHP 5.4 25 | */ 26 | class MonologTraitTest extends \PHPUnit_Framework_TestCase 27 | { 28 | public function testLog() 29 | { 30 | $app = $this->createApplication(); 31 | 32 | $app->log('Foo'); 33 | $app->log('Bar', array(), Logger::DEBUG); 34 | $this->assertTrue($app['monolog.handler']->hasInfo('Foo')); 35 | $this->assertTrue($app['monolog.handler']->hasDebug('Bar')); 36 | } 37 | 38 | public function createApplication() 39 | { 40 | $app = new MonologApplication(); 41 | $app->register(new MonologServiceProvider(), array( 42 | 'monolog.handler' => $app->share(function () use ($app) { 43 | return new TestHandler($app['monolog.level']); 44 | }), 45 | )); 46 | 47 | return $app; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/routing/Symfony/Component/Routing/Matcher/Dumper/DumperRoute.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Routing\Matcher\Dumper; 13 | 14 | use Symfony\Component\Routing\Route; 15 | 16 | /** 17 | * Container for a Route. 18 | * 19 | * @author Arnaud Le Blanc 20 | */ 21 | class DumperRoute 22 | { 23 | /** 24 | * @var string 25 | */ 26 | private $name; 27 | 28 | /** 29 | * @var Route 30 | */ 31 | private $route; 32 | 33 | /** 34 | * Constructor. 35 | * 36 | * @param string $name The route name 37 | * @param Route $route The route 38 | */ 39 | public function __construct($name, Route $route) 40 | { 41 | $this->name = $name; 42 | $this->route = $route; 43 | } 44 | 45 | /** 46 | * Returns the route name. 47 | * 48 | * @return string The route name 49 | */ 50 | public function getName() 51 | { 52 | return $this->name; 53 | } 54 | 55 | /** 56 | * Returns the route. 57 | * 58 | * @return Route The route 59 | */ 60 | public function getRoute() 61 | { 62 | return $this->route; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/silex/silex/src/Silex/WebTestCase.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Silex; 13 | 14 | use Symfony\Component\HttpKernel\Client; 15 | use Symfony\Component\HttpKernel\HttpKernel; 16 | 17 | /** 18 | * WebTestCase is the base class for functional tests. 19 | * 20 | * @author Igor Wiedler 21 | */ 22 | abstract class WebTestCase extends \PHPUnit_Framework_TestCase 23 | { 24 | protected $app; 25 | 26 | /** 27 | * PHPUnit setUp for setting up the application. 28 | * 29 | * Note: Child classes that define a setUp method must call 30 | * parent::setUp(). 31 | */ 32 | public function setUp() 33 | { 34 | $this->app = $this->createApplication(); 35 | } 36 | 37 | /** 38 | * Creates the application. 39 | * 40 | * @return HttpKernel 41 | */ 42 | abstract public function createApplication(); 43 | 44 | /** 45 | * Creates a Client. 46 | * 47 | * @param array $server An array of server parameters 48 | * 49 | * @return Client A Client instance 50 | */ 51 | public function createClient(array $server = array()) 52 | { 53 | return new Client($this->app, $server); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/CacheClearer/ChainCacheClearer.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\CacheClearer; 13 | 14 | /** 15 | * ChainCacheClearer. 16 | * 17 | * @author Dustin Dobervich 18 | */ 19 | class ChainCacheClearer implements CacheClearerInterface 20 | { 21 | /** 22 | * @var array $clearers 23 | */ 24 | protected $clearers; 25 | 26 | /** 27 | * Constructs a new instance of ChainCacheClearer. 28 | * 29 | * @param array $clearers The initial clearers. 30 | */ 31 | public function __construct(array $clearers = array()) 32 | { 33 | $this->clearers = $clearers; 34 | } 35 | 36 | /** 37 | * {@inheritdoc} 38 | */ 39 | public function clear($cacheDir) 40 | { 41 | foreach ($this->clearers as $clearer) { 42 | $clearer->clear($cacheDir); 43 | } 44 | } 45 | 46 | /** 47 | * Adds a cache clearer to the aggregate. 48 | * 49 | * @param CacheClearerInterface $clearer 50 | */ 51 | public function add(CacheClearerInterface $clearer) 52 | { 53 | $this->clearers[] = $clearer; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; 13 | 14 | use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; 15 | 16 | /** 17 | * Test class for NativeSessionHandler. 18 | * 19 | * @author Drak 20 | * 21 | * @runTestsInSeparateProcesses 22 | */ 23 | class NativeSessionHandlerTest extends \PHPUnit_Framework_TestCase 24 | { 25 | public function testConstruct() 26 | { 27 | $handler = new NativeSessionHandler(); 28 | 29 | // note for PHPUnit optimisers - the use of assertTrue/False 30 | // here is deliberate since the tests do not require the classes to exist - drak 31 | if (version_compare(phpversion(), '5.4.0', '<')) { 32 | $this->assertFalse($handler instanceof \SessionHandler); 33 | $this->assertTrue($handler instanceof NativeSessionHandler); 34 | } else { 35 | $this->assertTrue($handler instanceof \SessionHandler); 36 | $this->assertTrue($handler instanceof NativeSessionHandler); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpKernel\Tests\DataCollector; 13 | 14 | use Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector; 15 | use Symfony\Component\HttpKernel\Exception\FlattenException; 16 | use Symfony\Component\HttpFoundation\Request; 17 | use Symfony\Component\HttpFoundation\Response; 18 | 19 | class ExceptionDataCollectorTest extends \PHPUnit_Framework_TestCase 20 | { 21 | public function testCollect() 22 | { 23 | $e = new \Exception('foo',500); 24 | $c = new ExceptionDataCollector(); 25 | $flattened = FlattenException::create($e); 26 | $trace = $flattened->getTrace(); 27 | 28 | $this->assertFalse($c->hasException()); 29 | 30 | $c->collect(new Request(), new Response(),$e); 31 | 32 | $this->assertTrue($c->hasException()); 33 | $this->assertEquals($flattened,$c->getException()); 34 | $this->assertSame('foo',$c->getMessage()); 35 | $this->assertSame(500,$c->getCode()); 36 | $this->assertSame('exception',$c->getName()); 37 | $this->assertSame($trace,$c->getTrace()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /005-silex-vendor-tour/vendor/pimple/pimple/tests/Pimple/Tests/Service.php: -------------------------------------------------------------------------------- 1 | 34 | */ 35 | class Service 36 | { 37 | } 38 | --------------------------------------------------------------------------------