original_string: public function appendOnPath($middleware, string $path, $priority = 0): Server
      {
          return $this->appendOnCondition(
              $middleware,
              $this->buildPathCondition($path),
              $priority
          );
      }
code: public function appendOnPath($middleware, string $path, $priority = 0): Server
      {
          return $this->appendOnCondition(
              $middleware,
              $this->buildPathCondition($path),
              $priority
          );
      }
code_tokens: public function appendOnPath ( $ middleware , string $ path , $ priority = 0 ) : Server { return $ this -> appendOnCondition ( $ middleware , $ this -> buildPathCondition ( $ path ) , $ priority ) ; }
docstring: Adds a middleware to the stack only if the request path matches.
  
  The path must match exactly. If the "*" character is present, a comparison will be
  made via regex. For example: the path '/api' matches only with request path '/api'.
  But the path '/api/*' matches with all request paths that start with '/api/'.
  
  The only position supported for the "*" character is at the end of the path. Other
  positions may work today, but may no longer work in the future.
  
  The path '*' (or '/*') matches with all request path. For performance reasons, in
  this case you can consider using the `append()` method instead.
  
  @param MiddlewareInterface|callable|array $middleware
  @param string                             $path
  @param int                                $priority
  @return Server
docstring_tokens: Adds a middleware to the stack only if the request path matches .