ZF-7381: referingUrl for Zend_View_Helper

Issue Type: New Feature Created: 2009-07-24T05:27:23.000+0000 Last Updated: 2011-01-20T12:58:20.000+0000 Status: Resolved Fix version(s): Reporter: Markus (rockaut) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_View

Related issues: Attachments:


I'm using this to easily get the refering url

class My_View_Helper_ReferingUrl extends Zend_View_Helper_HtmlElement { /** * Returns the refering url or using url Helper as backup * * @param array $backup * @return string */ public function referingUrl(array $backup) { $url = Zend_Controller_Front::getInstance()->getRequest()->getHeader("REFERER"); if(!$url) { $url = $this->view->url($backup); }

    return $url;



Posted by Richard Tuin (richardtuin) on 2010-11-20T08:48:19.000+0000

Existing view helpers contained in the Zend Framework are all shortcuts or references to other Zend Framework components. From this perspective a shortcut to a request header (referer) is not suitable for implementation in the framework.

Posted by Richard Tuin (richardtuin) on 2011-01-20T12:58:19.000+0000

Resolving this issue as 'Needs proposal'. If you think this view helper could be of use for the framework, feel free to start a discussion on it on the contributer mailing list.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.