public function addToSearchPath(string $name, string $path, int $precedence)
    {
        if (!is_dir($path))
            throw new \InvalidArgumentException("Path does not exist: " . $path);

        $this->search_path[$name] = array('path' => $path, 'precedence' => $precedence);
        $this->sorted = false;
        
        return $this;
    }
public function addToSearchPath(string $name, string $path, int $precedence)
    {
        if (!is_dir($path))
            throw new \InvalidArgumentException("Path does not exist: " . $path);

        $this->search_path[$name] = array('path' => $path, 'precedence' => $precedence);
        $this->sorted = false;
        
        return $this;
    }
public function addToSearchPath ( string $ name , string $ path , int $ precedence ) { if ( ! is_dir ( $ path ) ) throw new \ InvalidArgumentException ( "Path does not exist: " . $ path ) ; $ this -> search_path [ $ name ] = array ( 'path' => $ path , 'precedence' => $ precedence ) ; $ this -> sorted = false ; return $ this ; }
Add a module to the search path of the SubResolver.

@param string $name The name of the module. Just for logging purposes.
@param string $path The path of the module.
@param int $precedence The order in which the modules are searched.
Lower means searched earlier.
@return SubResolver Provides fluent interface
Add a module to the search path of the SubResolver .