From 54443abfffd6a06dcf8edec496ca768dac897da9 Mon Sep 17 00:00:00 2001 From: Daniel Wehner Date: Thu, 23 Oct 2014 14:21:59 +0200 Subject: [PATCH] Add machine readable events --- .../Component/Console/ConsoleEvents.php | 6 ++++++ src/Symfony/Component/Form/FormEvents.php | 21 +++++++++++++++++++ .../Component/HttpKernel/KernelEvents.php | 14 +++++++++++++ .../Security/Http/SecurityEvents.php | 4 ++++ 4 files changed, 45 insertions(+) diff --git a/src/Symfony/Component/Console/ConsoleEvents.php b/src/Symfony/Component/Console/ConsoleEvents.php index 12ede2d5bdd35..1ed41b7daa9c0 100644 --- a/src/Symfony/Component/Console/ConsoleEvents.php +++ b/src/Symfony/Component/Console/ConsoleEvents.php @@ -26,6 +26,8 @@ final class ConsoleEvents * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent * instance. * + * @Event + * * @var string */ const COMMAND = 'console.command'; @@ -37,6 +39,8 @@ final class ConsoleEvents * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent * instance. * + * @Event + * * @var string */ const TERMINATE = 'console.terminate'; @@ -49,6 +53,8 @@ final class ConsoleEvents * a Symfony\Component\Console\Event\ConsoleExceptionEvent * instance. * + * @Event + * * @var string */ const EXCEPTION = 'console.exception'; diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index 6c4efc5be1129..2bdd585251b1a 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -15,31 +15,52 @@ */ final class FormEvents { + /** + * @Event + */ const PRE_SUBMIT = 'form.pre_bind'; + /** + * @Event + */ const SUBMIT = 'form.bind'; + /** + * @Event + */ const POST_SUBMIT = 'form.post_bind'; + /** + * @Event + */ const PRE_SET_DATA = 'form.pre_set_data'; + /** + * @Event + */ const POST_SET_DATA = 'form.post_set_data'; /** * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * {@link PRE_SUBMIT} instead. + * + * @Event */ const PRE_BIND = 'form.pre_bind'; /** * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * {@link SUBMIT} instead. + * + * @Event */ const BIND = 'form.bind'; /** * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * {@link POST_SUBMIT} instead. + * + * @Event */ const POST_BIND = 'form.post_bind'; diff --git a/src/Symfony/Component/HttpKernel/KernelEvents.php b/src/Symfony/Component/HttpKernel/KernelEvents.php index ebeca3bf835aa..aaf2ec4ec3ddc 100644 --- a/src/Symfony/Component/HttpKernel/KernelEvents.php +++ b/src/Symfony/Component/HttpKernel/KernelEvents.php @@ -29,6 +29,8 @@ final class KernelEvents * receives a Symfony\Component\HttpKernel\Event\GetResponseEvent * instance. * + * @Event + * * @var string * * @api @@ -43,6 +45,8 @@ final class KernelEvents * a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent * instance. * + * @Event + * * @var string * * @api @@ -58,6 +62,8 @@ final class KernelEvents * Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent * instance. * + * @Event + * * @var string * * @api @@ -72,6 +78,8 @@ final class KernelEvents * request. The event listener method receives a * Symfony\Component\HttpKernel\Event\FilterControllerEvent instance. * + * @Event + * * @var string * * @api @@ -86,6 +94,8 @@ final class KernelEvents * replied. The event listener method receives a * Symfony\Component\HttpKernel\Event\FilterResponseEvent instance. * + * @Event + * * @var string * * @api @@ -99,6 +109,8 @@ final class KernelEvents * The event listener method receives a * Symfony\Component\HttpKernel\Event\PostResponseEvent instance. * + * @Event + * * @var string */ const TERMINATE = 'kernel.terminate'; @@ -109,6 +121,8 @@ final class KernelEvents * This event allows you to reset the global and environmental state of * the application, when it was changed during the request. * + * @Event + * * @var string */ const FINISH_REQUEST = 'kernel.finish_request'; diff --git a/src/Symfony/Component/Security/Http/SecurityEvents.php b/src/Symfony/Component/Security/Http/SecurityEvents.php index 45fae293b3bd3..46c8257f18e74 100644 --- a/src/Symfony/Component/Security/Http/SecurityEvents.php +++ b/src/Symfony/Component/Security/Http/SecurityEvents.php @@ -20,6 +20,8 @@ final class SecurityEvents * The event listener method receives a * Symfony\Component\Security\Http\Event\InteractiveLoginEvent instance. * + * @Event + * * @var string */ const INTERACTIVE_LOGIN = 'security.interactive_login'; @@ -31,6 +33,8 @@ final class SecurityEvents * The event listener method receives a * Symfony\Component\Security\Http\Event\SwitchUserEvent instance. * + * @Event + * * @var string */ const SWITCH_USER = 'security.switch_user';