@@ 111-120 (lines=10) @@ | ||
108 | * @param string $separator |
|
109 | * @return string |
|
110 | */ |
|
111 | public function getHref($index=null,$separator="/"){ |
|
112 | if(!isset($index)){ |
|
113 | $index=sizeof($this->content); |
|
114 | } |
|
115 | if($this->absolutePaths===true){ |
|
116 | return $this->_hrefFunction($this->content[$index]); |
|
117 | }else{ |
|
118 | return $this->root.implode($separator, array_slice(array_map(function($e){return $this->_hrefFunction($e);}, $this->content),$this->startIndex,$index+1)); |
|
119 | } |
|
120 | } |
|
121 | ||
122 | /* |
|
123 | * (non-PHPdoc) |
@@ 106-117 (lines=12) @@ | ||
103 | * @param string $separator |
|
104 | * @return string |
|
105 | */ |
|
106 | public function getHref($index=null, $separator="/") { |
|
107 | if (!isset($index)) { |
|
108 | $index=sizeof($this->content); |
|
109 | } |
|
110 | if ($this->absolutePaths === true) { |
|
111 | return $this->_hrefFunction($this->content[$index]); |
|
112 | } else { |
|
113 | return $this->root . implode($separator, array_slice(array_map(function ($e) { |
|
114 | return $this->_hrefFunction($e); |
|
115 | }, $this->content), $this->startIndex, $index + 1)); |
|
116 | } |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * sets the function who generates the href elements. |