public function segment($index) {
		if (isset($this->segments[$index])) {
			return $this->segments[$index];
		}

		return null;
	}
public function segment($index) {
		if (isset($this->segments[$index])) {
			return $this->segments[$index];
		}

		return null;
	}
public function segment ( $ index ) { if ( isset ( $ this -> segments [ $ index ] ) ) { return $ this -> segments [ $ index ] ; } return null ; }
Returns the specified segment of this path, or null if the path does not have such a segment.

@param int $index
@return string
Returns the specified segment of this path or null if the path does not have such a segment .