function setSegment($pathOffset)
    {
        if (is_int($pathOffset))
            $pathOffset = array($pathOffset, null);


        if (!is_array($pathOffset) && count($pathOffset) !==2)
            throw new \InvalidArgumentException(sprintf(
                'Segment is an array [$offset, $length]; given: (%s).'
                , \Poirot\Std\flatten($pathOffset)
            ));

        $this->pathOffset = $pathOffset;
        return $this;
    }
function setSegment($pathOffset)
    {
        if (is_int($pathOffset))
            $pathOffset = array($pathOffset, null);


        if (!is_array($pathOffset) && count($pathOffset) !==2)
            throw new \InvalidArgumentException(sprintf(
                'Segment is an array [$offset, $length]; given: (%s).'
                , \Poirot\Std\flatten($pathOffset)
            ));

        $this->pathOffset = $pathOffset;
        return $this;
    }
function setSegment ( $ pathOffset ) { if ( is_int ( $ pathOffset ) ) $ pathOffset = array ( $ pathOffset , null ) ; if ( ! is_array ( $ pathOffset ) && count ( $ pathOffset ) !== 2 ) throw new \ InvalidArgumentException ( sprintf ( 'Segment is an array [$offset, $length]; given: (%s).' , \ Poirot \ Std \ flatten ( $ pathOffset ) ) ) ; $ this -> pathOffset = $ pathOffset ; return $ this ; }
Set Path Offset To Match With Request Path Segment

/var/www/html
[0]     => "/var/www/html"
[1]     => "var/www/html"
[0, 2]  => "/var"
[0, -1] => "/var/www"

@param int|array|null $pathOffset [offset, length]

@return $this
Set Path Offset To Match With Request Path Segment