original_string: public function middleware($middleware = null)
      {
          if (is_null($middleware)) {
              return $this->middleware;
          }
  
          if (is_string($middleware)) {
              $middleware = func_get_args();
          }
  
          $this->middleware = array_unique(array_merge($this->middleware, $middleware));
  
          return $this;
      }
code: public function middleware($middleware = null)
      {
          if (is_null($middleware)) {
              return $this->middleware;
          }
  
          if (is_string($middleware)) {
              $middleware = func_get_args();
          }
  
          $this->middleware = array_unique(array_merge($this->middleware, $middleware));
  
          return $this;
      }
code_tokens: public function middleware ( $ middleware = null ) { if ( is_null ( $ middleware ) ) { return $ this -> middleware ; } if ( is_string ( $ middleware ) ) { $ middleware = func_get_args ( ) ; } $ this -> middleware = array_unique ( array_merge ( $ this -> middleware , $ middleware ) ) ; return $ this ; }
docstring: Get or set middleware.
  
  @param array|string|null $middleware
  
  @return array|\SwooleTW\Http\Websocket\Websocket
docstring_tokens: Get or set middleware .