public function defineMap($name, callable $map, $priority = 0)
    {
        $this->areMapsSorted = false;
        $this->maps[$name] = new PrioritizedMap($map, $priority, count($this->maps));

        if (!isset($this->rules[$name]))
            $this->rules[$name] = [];

        return $this;
    }
public function defineMap($name, callable $map, $priority = 0)
    {
        $this->areMapsSorted = false;
        $this->maps[$name] = new PrioritizedMap($map, $priority, count($this->maps));

        if (!isset($this->rules[$name]))
            $this->rules[$name] = [];

        return $this;
    }
public function defineMap ( $ name , callable $ map , $ priority = 0 ) { $ this -> areMapsSorted = false ; $ this -> maps [ $ name ] = new PrioritizedMap ( $ map , $ priority , count ( $ this -> maps ) ) ; if ( ! isset ( $ this -> rules [ $ name ] ) ) $ this -> rules [ $ name ] = [ ] ; return $ this ; }
Register a map

@param string $name
@param callable $map
@param int $priority
@throws InvalidMatcherException
@return $this
Register a map