No. Instead, you use the request object:
$this->request->referer();
The controller does nothing internally.
Caution: the referent may be empty and therefore you may want to provide a backup here in this case.
Also note the optional $ local parameter:
@param boolean $local If true, restrict referring URLs to local server
source
share