framework/web/Request.php
public function getSegment($index, $default = null)
    {
        return $index > 0 && count($this->urlParts) - 1 <= $index ? $this->urlParts[$index]
                : $default;
    }
public function getSegment($index, $default = null)
    {
        return $index > 0 && count($this->urlParts) - 1 <= $index ? $this->urlParts[$index]
                : $default;
    }
public function getSegment ( $ index , $ default = null ) { return $ index > 0 && count ( $ this -> urlParts ) - 1 <= $ index ? $ this -> urlParts [ $ index ] : $ default ; }
Get URL segment

@param int $index
@param string $default
@return string
Get URL segment