move event listener method type hint docs to @Event annotations default value. makes it easily parsable by PhpStorm plugin

This commit is contained in:
Daniel Espendiller 2016-05-01 13:45:36 +02:00 committed by Fabien Potencier
parent cab3f45a77
commit f2c04464d8
5 changed files with 25 additions and 63 deletions

View File

@ -23,10 +23,7 @@ final class ConsoleEvents
* executed by the console. It also allows you to modify the command, input and output * executed by the console. It also allows you to modify the command, input and output
* before they are handled to the command. * before they are handled to the command.
* *
* The event listener method receives a Symfony\Component\Console\Event\ConsoleCommandEvent * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent")
* instance.
*
* @Event
* *
* @var string * @var string
*/ */
@ -36,10 +33,7 @@ final class ConsoleEvents
* The TERMINATE event allows you to attach listeners after a command is * The TERMINATE event allows you to attach listeners after a command is
* executed by the console. * executed by the console.
* *
* The event listener method receives a Symfony\Component\Console\Event\ConsoleTerminateEvent * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent")
* instance.
*
* @Event
* *
* @var string * @var string
*/ */
@ -49,11 +43,9 @@ final class ConsoleEvents
* The EXCEPTION event occurs when an uncaught exception appears. * The EXCEPTION event occurs when an uncaught exception appears.
* *
* This event allows you to deal with the exception or * This event allows you to deal with the exception or
* to modify the thrown exception. The event listener method receives * to modify the thrown exception.
* a Symfony\Component\Console\Event\ConsoleExceptionEvent
* instance.
* *
* @Event * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent")
* *
* @var string * @var string
*/ */

View File

@ -28,9 +28,8 @@ final class FormEvents
* It can be used to: * It can be used to:
* - Change data from the request, before submitting the data to the form. * - Change data from the request, before submitting the data to the form.
* - Add or remove form fields, before submitting the data to the form. * - Add or remove form fields, before submitting the data to the form.
* The event listener method receives a Symfony\Component\Form\FormEvent instance.
* *
* @Event * @Event("Symfony\Component\Form\FormEvent")
*/ */
const PRE_SUBMIT = 'form.pre_bind'; const PRE_SUBMIT = 'form.pre_bind';
@ -39,9 +38,8 @@ final class FormEvents
* transforms back the normalized data to the model and view data. * transforms back the normalized data to the model and view data.
* *
* It can be used to change data from the normalized representation of the data. * It can be used to change data from the normalized representation of the data.
* The event listener method receives a Symfony\Component\Form\FormEvent instance.
* *
* @Event * @Event("Symfony\Component\Form\FormEvent")
*/ */
const SUBMIT = 'form.bind'; const SUBMIT = 'form.bind';
@ -50,9 +48,8 @@ final class FormEvents
* once the model and view data have been denormalized. * once the model and view data have been denormalized.
* *
* It can be used to fetch data after denormalization. * It can be used to fetch data after denormalization.
* The event listener method receives a Symfony\Component\Form\FormEvent instance.
* *
* @Event * @Event("Symfony\Component\Form\FormEvent")
*/ */
const POST_SUBMIT = 'form.post_bind'; const POST_SUBMIT = 'form.post_bind';
@ -62,9 +59,8 @@ final class FormEvents
* It can be used to: * It can be used to:
* - Modify the data given during pre-population; * - Modify the data given during pre-population;
* - Modify a form depending on the pre-populated data (adding or removing fields dynamically). * - Modify a form depending on the pre-populated data (adding or removing fields dynamically).
* The event listener method receives a Symfony\Component\Form\FormEvent instance.
* *
* @Event * @Event("Symfony\Component\Form\FormEvent")
*/ */
const PRE_SET_DATA = 'form.pre_set_data'; const PRE_SET_DATA = 'form.pre_set_data';
@ -72,9 +68,8 @@ final class FormEvents
* The FormEvents::POST_SET_DATA event is dispatched at the end of the Form::setData() method. * The FormEvents::POST_SET_DATA event is dispatched at the end of the Form::setData() method.
* *
* This event is mostly here for reading data after having pre-populated the form. * This event is mostly here for reading data after having pre-populated the form.
* The event listener method receives a Symfony\Component\Form\FormEvent instance.
* *
* @Event * @Event("Symfony\Component\Form\FormEvent")
*/ */
const POST_SET_DATA = 'form.post_set_data'; const POST_SET_DATA = 'form.post_set_data';

View File

@ -23,11 +23,9 @@ final class KernelEvents
* dispatching. * dispatching.
* *
* This event allows you to create a response for a request before any * This event allows you to create a response for a request before any
* other code in the framework is executed. The event listener method * other code in the framework is executed.
* receives a Symfony\Component\HttpKernel\Event\GetResponseEvent
* instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\GetResponseEvent")
* *
* @var string * @var string
*/ */
@ -37,11 +35,9 @@ final class KernelEvents
* The EXCEPTION event occurs when an uncaught exception appears. * The EXCEPTION event occurs when an uncaught exception appears.
* *
* This event allows you to create a response for a thrown exception or * This event allows you to create a response for a thrown exception or
* to modify the thrown exception. The event listener method receives * to modify the thrown exception.
* a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
* instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
* *
* @var string * @var string
*/ */
@ -52,11 +48,9 @@ final class KernelEvents
* is not a Response instance. * is not a Response instance.
* *
* This event allows you to create a response for the return value of the * This event allows you to create a response for the return value of the
* controller. The event listener method receives a * controller.
* Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
* instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
* *
* @var string * @var string
*/ */
@ -67,10 +61,9 @@ final class KernelEvents
* handling a request. * handling a request.
* *
* This event allows you to change the controller that will handle the * This event allows you to change the controller that will handle the
* request. The event listener method receives a * request.
* Symfony\Component\HttpKernel\Event\FilterControllerEvent instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent")
* *
* @var string * @var string
*/ */
@ -94,10 +87,9 @@ final class KernelEvents
* replying to a request. * replying to a request.
* *
* This event allows you to modify or replace the response that will be * This event allows you to modify or replace the response that will be
* replied. The event listener method receives a * replied.
* Symfony\Component\HttpKernel\Event\FilterResponseEvent instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent")
* *
* @var string * @var string
*/ */
@ -107,10 +99,8 @@ final class KernelEvents
* The TERMINATE event occurs once a response was sent. * The TERMINATE event occurs once a response was sent.
* *
* This event allows you to run expensive post-response jobs. * This event allows you to run expensive post-response jobs.
* The event listener method receives a
* Symfony\Component\HttpKernel\Event\PostResponseEvent instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent")
* *
* @var string * @var string
*/ */
@ -121,10 +111,8 @@ final class KernelEvents
* *
* This event allows you to reset the global and environmental state of * This event allows you to reset the global and environmental state of
* the application, when it was changed during the request. * the application, when it was changed during the request.
* The event listener method receives a
* Symfony\Component\HttpKernel\Event\FinishRequestEvent instance.
* *
* @Event * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
* *
* @var string * @var string
*/ */

View File

@ -17,10 +17,7 @@ final class AuthenticationEvents
* The AUTHENTICATION_SUCCESS event occurs after a user is authenticated * The AUTHENTICATION_SUCCESS event occurs after a user is authenticated
* by one provider. * by one provider.
* *
* The event listener method receives a * @Event("Symfony\Component\Security\Core\Event\AuthenticationEvent")
* Symfony\Component\Security\Core\Event\AuthenticationEvent instance.
*
* @Event
* *
* @var string * @var string
*/ */
@ -30,11 +27,7 @@ final class AuthenticationEvents
* The AUTHENTICATION_FAILURE event occurs after a user cannot be * The AUTHENTICATION_FAILURE event occurs after a user cannot be
* authenticated by any of the providers. * authenticated by any of the providers.
* *
* The event listener method receives a * @Event("Symfony\Component\Security\Core\Event\AuthenticationFailureEvent")
* Symfony\Component\Security\Core\Event\AuthenticationFailureEvent
* instance.
*
* @Event
* *
* @var string * @var string
*/ */

View File

@ -17,10 +17,7 @@ final class SecurityEvents
* The INTERACTIVE_LOGIN event occurs after a user is logged in * The INTERACTIVE_LOGIN event occurs after a user is logged in
* interactively for authentication based on http, cookies or X509. * interactively for authentication based on http, cookies or X509.
* *
* The event listener method receives a * @Event("Symfony\Component\Security\Http\Event\InteractiveLoginEvent")
* Symfony\Component\Security\Http\Event\InteractiveLoginEvent instance.
*
* @Event
* *
* @var string * @var string
*/ */
@ -30,10 +27,7 @@ final class SecurityEvents
* The SWITCH_USER event occurs before switch to another user and * The SWITCH_USER event occurs before switch to another user and
* before exit from an already switched user. * before exit from an already switched user.
* *
* The event listener method receives a * @Event("Symfony\Component\Security\Http\Event\SwitchUserEvent")
* Symfony\Component\Security\Http\Event\SwitchUserEvent instance.
*
* @Event
* *
* @var string * @var string
*/ */