E
E
Egor Petrov2015-08-17 12:36:13
symfony
Egor Petrov, 2015-08-17 12:36:13

Is it possible to return data from a Symfony2 command?

If a command is executed from another command like this: symfony.com/doc/current/components/console/introdu...
Is it possible to pass any data to the launch command? And how can you get a non-zero execution result, at what error will there be something else?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Cherny, 2015-08-27
@paalomnik

try the cookbook symfony.com/doc/current/cookbook/console/command_i...

K
Konstantin, 2015-09-26
@unity_ultra_hardcore

I suspect that it is better to reconsider the architecture: if you enclose the logic of the command not in itself, but in the service (leaving only the receipt of the service from the container and calling its method in the command), then such crutches will not be required.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question