public function beforeMethod(RequestInterface $request, ResponseInterface $response)
    {
        if (!$tempLocation = $this->isTempFile($request->getPath())) {
            return;
        }

        switch ($request->getMethod()) {
            case 'GET':
                return $this->httpGet($request, $response, $tempLocation);
            case 'PUT':
                return $this->httpPut($request, $response, $tempLocation);
            case 'PROPFIND':
                return $this->httpPropfind($request, $response, $tempLocation);
            case 'DELETE':
                return $this->httpDelete($request, $response, $tempLocation);
        }

        return;
    }
public function beforeMethod(RequestInterface $request, ResponseInterface $response)
    {
        if (!$tempLocation = $this->isTempFile($request->getPath())) {
            return;
        }

        switch ($request->getMethod()) {
            case 'GET':
                return $this->httpGet($request, $response, $tempLocation);
            case 'PUT':
                return $this->httpPut($request, $response, $tempLocation);
            case 'PROPFIND':
                return $this->httpPropfind($request, $response, $tempLocation);
            case 'DELETE':
                return $this->httpDelete($request, $response, $tempLocation);
        }

        return;
    }
public function beforeMethod ( RequestInterface $ request , ResponseInterface $ response ) { if ( ! $ tempLocation = $ this -> isTempFile ( $ request -> getPath ( ) ) ) { return ; } switch ( $ request -> getMethod ( ) ) { case 'GET' : return $ this -> httpGet ( $ request , $ response , $ tempLocation ) ; case 'PUT' : return $ this -> httpPut ( $ request , $ response , $ tempLocation ) ; case 'PROPFIND' : return $ this -> httpPropfind ( $ request , $ response , $ tempLocation ) ; case 'DELETE' : return $ this -> httpDelete ( $ request , $ response , $ tempLocation ) ; } return ; }
This method is called before any HTTP method handler.

This method intercepts any GET, DELETE, PUT and PROPFIND calls to
filenames that are known to match the 'temporary file' regex.

@param RequestInterface  $request
@param ResponseInterface $response

@return bool
This method is called before any HTTP method handler .