I am executing a task (command component) in Symfony2 and I would like to use
$this->getRequest()->getHost()
just like I do in a controller. What is the way to get that value (/Command/MyCommand.php)?
I know I can do $_SERVER['SERVER_NAME']
. But, I would like to use Symfony for this.