$request = sfContext::getInstance()->getRequest(); $uri = $request->getUri(); echo $uri; // Output: http://example.com/my-account/profile
$request = sfContext::getInstance()->getRequest(); if(!$logged_in) { $login_uri = '/login?redirect=' . $request->getUri(); $this->redirect($login_uri); }This example belongs to the symfony framework, which is a full-stack web application framework written in PHP. The sfWebRequest class is part of the symfony package library.