src/mako/http/routing/Dispatcher.php
public function registerMiddleware(string $name, string $middleware, ?int $priority = null): Dispatcher
	{
		$this->middleware[$name] = $middleware;

		if($priority !== null)
		{
			$this->middlewarePriority[$name] = $priority;
		}

		return $this;
	}
public function registerMiddleware(string $name, string $middleware, ?int $priority = null): Dispatcher
	{
		$this->middleware[$name] = $middleware;

		if($priority !== null)
		{
			$this->middlewarePriority[$name] = $priority;
		}

		return $this;
	}
public function registerMiddleware ( string $ name , string $ middleware , ? int $ priority = null ) : Dispatcher { $ this -> middleware [ $ name ] = $ middleware ; if ( $ priority !== null ) { $ this -> middlewarePriority [ $ name ] = $ priority ; } return $ this ; }
Registers middleware.

@param  string                        $name       Middleware name
@param  string                        $middleware Middleware class name
@param  int|null                      $priority   Middleware priority
@return \mako\http\routing\Dispatcher
Registers middleware .