V
V
Vitaly Sorokin2017-08-29 13:29:21
symfony
Vitaly Sorokin, 2017-08-29 13:29:21

Where to write code that should always be executed?

Hello, tell me how to do this thing in Symfony 2.6: It is
necessary, after executing any request (including through the console), a certain service was called and worked out.
For example: a person comes to the main page, she went to him for rendering, and on the server, before the completion of the work, the necessary service was called.
The same thing with the command: they called the console command, and after its completion, the same service was called.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Skobkin, 2017-08-29
@skobkin

https://symfony.com/doc/current/components/http_ke...
UPD: and https://symfony.com/doc/current/components/console... (thanks to Maxim for the addition)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question