| @@ 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) | |
| @@ 116-125 (lines=10) @@ | ||
| 113 | * @param string $separator | |
| 114 | * @return string | |
| 115 | */ | |
| 116 | 	public function getHref($index=null, $separator="/") { | |
| 117 | 		if (!isset($index)) { | |
| 118 | $index=sizeof($this->content); | |
| 119 | } | |
| 120 | 		if ($this->absolutePaths === true) { | |
| 121 | return $this->_hrefFunction($this->content[$index]); | |
| 122 | 		} else { | |
| 123 | 			return $this->root . implode($separator, array_slice(array_map(function ($e) { | |
| 124 | return $this->_hrefFunction($e); | |
| 125 | }, $this->content), $this->startIndex, $index + 1)); | |
| 126 | } | |
| 127 | } | |
| 128 | ||