createUrl in command

I need the $this->createUrl() functionality in the command. The command is creating sitemap and I use url manager everywhere, so I need to specify params and have the Url created for me. How this can be done?

If there is now way for this, I’d like to create a feature request.

You need to configure ‘urlManager’ and ‘request’ application components in the console application configuration since they are not registered by default.

OK, I’ll add them. I understand why I need the url manager component, but hy do I need a request one?

Then, how do I call them?

I’m also in need for this, did you figured it out KJedi?

Can anyone point me in the right direction? request and urlManager are configured in the config. If I use this rule:


'test' => 'my/test'

and then do:


echo Yii::app()->urlManager->createUrl('my/test');

it will just output:

I guess I have to add something additional to the request to get it work, anyone?