2 /* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_View_Helper_UriPath extends Zend_View_Helper_Abstract
7 public function uriPath($encoded = false) {
8 $uri = Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
9 if (($pos = strpos($uri, '?')) !== false) {
10 $uri = substr($uri, 0, $pos);
13 $uri = implode('/', array_map('urlencode', explode('/', $uri)));