public function setPrecedence(string $name, int $precedence)
    {
        if (!isset($this->search_path[$name]))
            throw new \InvalidArgumentException("Unknown module: " . $name);

        if ($this->search_path[$name]['precedence'] !== $precedence)
        {
            $this->search_path[$name]['precedence'] = $precedence;
            $this->sorted = false;
        }
        return $this;
    }
public function setPrecedence(string $name, int $precedence)
    {
        if (!isset($this->search_path[$name]))
            throw new \InvalidArgumentException("Unknown module: " . $name);

        if ($this->search_path[$name]['precedence'] !== $precedence)
        {
            $this->search_path[$name]['precedence'] = $precedence;
            $this->sorted = false;
        }
        return $this;
    }
public function setPrecedence ( string $ name , int $ precedence ) { if ( ! isset ( $ this -> search_path [ $ name ] ) ) throw new \ InvalidArgumentException ( "Unknown module: " . $ name ) ; if ( $ this -> search_path [ $ name ] [ 'precedence' ] !== $ precedence ) { $ this -> search_path [ $ name ] [ 'precedence' ] = $ precedence ; $ this -> sorted = false ; } return $ this ; }
Set the precedence value of a module
@param string $name The name of the module
@param int $precedence The precedence value to set
@return SubResolver Provides fluent interface
Set the precedence value of a module