src/Client/OAuthClient.php
public function registerMiddleware(IMiddleware $middleware): IOAuthClient
    {
        $middleware->setClient($this);
        foreach ($middleware::statusCode() as $statusCode) {
            $this->postRequestMiddlewares[$statusCode][] = $middleware;
        }

        return $this;
    }
public function registerMiddleware(IMiddleware $middleware): IOAuthClient
    {
        $middleware->setClient($this);
        foreach ($middleware::statusCode() as $statusCode) {
            $this->postRequestMiddlewares[$statusCode][] = $middleware;
        }

        return $this;
    }
public function registerMiddleware ( IMiddleware $ middleware ) : IOAuthClient { $ middleware -> setClient ( $ this ) ; foreach ( $ middleware :: statusCode ( ) as $ statusCode ) { $ this -> postRequestMiddlewares [ $ statusCode ] [ ] = $ middleware ; } return $ this ; }
Register the given middleware.

@param \ZEROSPAM\Framework\SDK\Client\Middleware\IMiddleware $middleware

@return IOAuthClient
Register the given middleware .