src/Middleware/Middleware.php
public function add(...$middleware) : self
    {
        foreach ($middleware as $m) {
            if ($m instanceof TusMiddleware) {
                $this->globalMiddleware[get_class($m)] = $m;
            } elseif (is_string($m)) {
                $this->globalMiddleware[$m] = new $m;
            }
        }

        return $this;
    }
public function add(...$middleware) : self
    {
        foreach ($middleware as $m) {
            if ($m instanceof TusMiddleware) {
                $this->globalMiddleware[get_class($m)] = $m;
            } elseif (is_string($m)) {
                $this->globalMiddleware[$m] = new $m;
            }
        }

        return $this;
    }
public function add ( ... $ middleware ) : self { foreach ( $ middleware as $ m ) { if ( $ m instanceof TusMiddleware ) { $ this -> globalMiddleware [ get_class ( $ m ) ] = $ m ; } elseif ( is_string ( $ m ) ) { $ this -> globalMiddleware [ $ m ] = new $ m ; } } return $ this ; }
Set middleware.

@param array $middleware

@return Middleware
Set middleware .