equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Navigation |
16 * @package Zend_Navigation |
17 * @subpackage Page |
17 * @subpackage Page |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Uri.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Uri.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Navigation_Page_Abstract |
24 * @see Zend_Navigation_Page_Abstract |
25 */ |
25 */ |
29 * Represents a page that is defined by specifying a URI |
29 * Represents a page that is defined by specifying a URI |
30 * |
30 * |
31 * @category Zend |
31 * @category Zend |
32 * @package Zend_Navigation |
32 * @package Zend_Navigation |
33 * @subpackage Page |
33 * @subpackage Page |
34 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
34 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
35 * @license http://framework.zend.com/license/new-bsd New BSD License |
36 */ |
36 */ |
37 class Zend_Navigation_Page_Uri extends Zend_Navigation_Page |
37 class Zend_Navigation_Page_Uri extends Zend_Navigation_Page |
38 { |
38 { |
39 /** |
39 /** |
77 * |
77 * |
78 * @return string |
78 * @return string |
79 */ |
79 */ |
80 public function getHref() |
80 public function getHref() |
81 { |
81 { |
82 return $this->getUri(); |
82 $uri = $this->getUri(); |
|
83 |
|
84 $fragment = $this->getFragment(); |
|
85 if (null !== $fragment) { |
|
86 if ('#' == substr($uri, -1)) { |
|
87 return $uri . $fragment; |
|
88 } else { |
|
89 return $uri . '#' . $fragment; |
|
90 } |
|
91 } |
|
92 |
|
93 return $uri; |
83 } |
94 } |
84 |
95 |
85 // Public methods: |
96 // Public methods: |
86 |
97 |
87 /** |
98 /** |