Object from URL String

Hi,

I’ve got a URL string which I retrieved using Yii::app()->user->returnUrl, but I need this to be in the form of something like a CHttpRequest where I can call something like getQueryString() (basically i only want the route, not the full URL), any help greatly appreciated!

Thanks.

$this->route

set the returnUrl to receive the route only, as you stated that you only want the route

Sorry I made a slight error in my initial post, the URL im retrieving is Yii::app()->request->getUrlReferrer() which returns a full url string. I am basically looking to grab the route of the previous URL.

php’s parse_url will do

Ok, thank you for your help. I’m suprised Yii doesn’t have something to do this natively.

Edit I’ll build a helper for this.

Did you build it? I’m interested…

Like this one?

Edit: Ah great. Another necromanced thread :rolleyes: