Add machine readable events

This commit is contained in:
Daniel Wehner 2014-10-23 14:21:59 +02:00 committed by Fabien Potencier
parent 5decdd7734
commit ace9a22101
4 changed files with 43 additions and 0 deletions

View File

@ -26,6 +26,8 @@ final class ConsoleEvents
* The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent * The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
*/ */
const COMMAND = 'console.command'; const COMMAND = 'console.command';
@ -37,6 +39,8 @@ final class ConsoleEvents
* The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent * The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
*/ */
const TERMINATE = 'console.terminate'; const TERMINATE = 'console.terminate';
@ -49,6 +53,8 @@ final class ConsoleEvents
* a Symfony\Component\Console\Event\ConsoleExceptionEvent * a Symfony\Component\Console\Event\ConsoleExceptionEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
*/ */
const EXCEPTION = 'console.exception'; const EXCEPTION = 'console.exception';

View File

@ -15,31 +15,52 @@ namespace Symfony\Component\Form;
*/ */
final class FormEvents final class FormEvents
{ {
/**
* @Event
*/
const PRE_SUBMIT = 'form.pre_bind'; const PRE_SUBMIT = 'form.pre_bind';
/**
* @Event
*/
const SUBMIT = 'form.bind'; const SUBMIT = 'form.bind';
/**
* @Event
*/
const POST_SUBMIT = 'form.post_bind'; const POST_SUBMIT = 'form.post_bind';
/**
* @Event
*/
const PRE_SET_DATA = 'form.pre_set_data'; const PRE_SET_DATA = 'form.pre_set_data';
/**
* @Event
*/
const POST_SET_DATA = 'form.post_set_data'; const POST_SET_DATA = 'form.post_set_data';
/** /**
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
* {@link PRE_SUBMIT} instead. * {@link PRE_SUBMIT} instead.
*
* @Event
*/ */
const PRE_BIND = 'form.pre_bind'; const PRE_BIND = 'form.pre_bind';
/** /**
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
* {@link SUBMIT} instead. * {@link SUBMIT} instead.
*
* @Event
*/ */
const BIND = 'form.bind'; const BIND = 'form.bind';
/** /**
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
* {@link POST_SUBMIT} instead. * {@link POST_SUBMIT} instead.
*
* @Event
*/ */
const POST_BIND = 'form.post_bind'; const POST_BIND = 'form.post_bind';

View File

@ -29,6 +29,8 @@ final class KernelEvents
* receives a Symfony\Component\HttpKernel\Event\GetResponseEvent * receives a Symfony\Component\HttpKernel\Event\GetResponseEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
* *
* @api * @api
@ -43,6 +45,8 @@ final class KernelEvents
* a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent * a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
* *
* @api * @api
@ -58,6 +62,8 @@ final class KernelEvents
* Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent * Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
* instance. * instance.
* *
* @Event
*
* @var string * @var string
* *
* @api * @api
@ -72,6 +78,8 @@ final class KernelEvents
* request. The event listener method receives a * request. The event listener method receives a
* Symfony\Component\HttpKernel\Event\FilterControllerEvent instance. * Symfony\Component\HttpKernel\Event\FilterControllerEvent instance.
* *
* @Event
*
* @var string * @var string
* *
* @api * @api
@ -86,6 +94,8 @@ final class KernelEvents
* replied. The event listener method receives a * replied. The event listener method receives a
* Symfony\Component\HttpKernel\Event\FilterResponseEvent instance. * Symfony\Component\HttpKernel\Event\FilterResponseEvent instance.
* *
* @Event
*
* @var string * @var string
* *
* @api * @api
@ -99,6 +109,8 @@ final class KernelEvents
* The event listener method receives a * The event listener method receives a
* Symfony\Component\HttpKernel\Event\PostResponseEvent instance. * Symfony\Component\HttpKernel\Event\PostResponseEvent instance.
* *
* @Event
*
* @var string * @var string
*/ */
const TERMINATE = 'kernel.terminate'; const TERMINATE = 'kernel.terminate';

View File

@ -20,6 +20,8 @@ final class SecurityEvents
* The event listener method receives a * The event listener method receives a
* Symfony\Component\Security\Http\Event\InteractiveLoginEvent instance. * Symfony\Component\Security\Http\Event\InteractiveLoginEvent instance.
* *
* @Event
*
* @var string * @var string
*/ */
const INTERACTIVE_LOGIN = 'security.interactive_login'; const INTERACTIVE_LOGIN = 'security.interactive_login';
@ -31,6 +33,8 @@ final class SecurityEvents
* The event listener method receives a * The event listener method receives a
* Symfony\Component\Security\Http\Event\SwitchUserEvent instance. * Symfony\Component\Security\Http\Event\SwitchUserEvent instance.
* *
* @Event
*
* @var string * @var string
*/ */
const SWITCH_USER = 'security.switch_user'; const SWITCH_USER = 'security.switch_user';