public function enableSegMatch(
        string $namespace,
        array $params = [],
        string $prepend = "",
        string $defaultMethod = "index"
    ): Dispatcher {
        $this->segBasedMatch = [
            "enabled"       =>  true,
            "uriPrepend"    =>  $prepend,
            "controller"    =>  [
                "namespace"     =>  $namespace,
                "defaultMethod" =>  $defaultMethod,
                "params"        =>  $params
            ]
        ];
        return $this;
    }
public function enableSegMatch(
        string $namespace,
        array $params = [],
        string $prepend = "",
        string $defaultMethod = "index"
    ): Dispatcher {
        $this->segBasedMatch = [
            "enabled"       =>  true,
            "uriPrepend"    =>  $prepend,
            "controller"    =>  [
                "namespace"     =>  $namespace,
                "defaultMethod" =>  $defaultMethod,
                "params"        =>  $params
            ]
        ];
        return $this;
    }
public function enableSegMatch ( string $ namespace , array $ params = [ ] , string $ prepend = "" , string $ defaultMethod = "index" ) : Dispatcher { $ this -> segBasedMatch = [ "enabled" => true , "uriPrepend" => $ prepend , "controller" => [ "namespace" => $ namespace , "defaultMethod" => $ defaultMethod , "params" => $ params ] ] ; return $ this ; }
Enable segment Based URI Matching

Enables the segment based URI matching, sets the Controller namespace, and
the default method to call if the second segment is not found in the URI.
Default method has the default value of string("index").

@param string $namespace Controller namespace
@param array $params Controller constructor parameters
@param string $prepend URI prepend for segment based URI matching
@param string $defaultMethod Default controller method for single segment URIs
@return \SlaxWeb\Router\Dispatcher
Enable segment Based URI Matching