src/Everest/Http/RoutingContext.php
public function addMiddleware(callable $middleware, string $type = self::BEFORE)
  {
;    $type = self::validateMiddlewareType($type);
    $this->middlewares[$type][] = $middleware;
  }
public function addMiddleware(callable $middleware, string $type = self::BEFORE)
  {
;    $type = self::validateMiddlewareType($type);
    $this->middlewares[$type][] = $middleware;
  }
public function addMiddleware ( callable $ middleware , string $ type = self :: BEFORE ) { ; $ type = self :: validateMiddlewareType ( $ type ) ; $ this -> middlewares [ $ type ] [ ] = $ middleware ; }
Adds a new middleware to this context

@param callable $middleware
The middleware

@return void
Adds a new middleware to this context