public function httpPut(RequestInterface $request, ResponseInterface $hR, $tempLocation)
    {
        $hR->setHeader('X-Sabre-Temp', 'true');

        $newFile = !file_exists($tempLocation);

        if (!$newFile && ($this->server->httpRequest->getHeader('If-None-Match'))) {
            throw new Exception\PreconditionFailed('The resource already exists, and an If-None-Match header was supplied');
        }

        file_put_contents($tempLocation, $this->server->httpRequest->getBody());
        $hR->setStatus($newFile ? 201 : 200);

        return false;
    }
public function httpPut(RequestInterface $request, ResponseInterface $hR, $tempLocation)
    {
        $hR->setHeader('X-Sabre-Temp', 'true');

        $newFile = !file_exists($tempLocation);

        if (!$newFile && ($this->server->httpRequest->getHeader('If-None-Match'))) {
            throw new Exception\PreconditionFailed('The resource already exists, and an If-None-Match header was supplied');
        }

        file_put_contents($tempLocation, $this->server->httpRequest->getBody());
        $hR->setStatus($newFile ? 201 : 200);

        return false;
    }
public function httpPut ( RequestInterface $ request , ResponseInterface $ hR , $ tempLocation ) { $ hR -> setHeader ( 'X-Sabre-Temp' , 'true' ) ; $ newFile = ! file_exists ( $ tempLocation ) ; if ( ! $ newFile && ( $ this -> server -> httpRequest -> getHeader ( 'If-None-Match' ) ) ) { throw new Exception \ PreconditionFailed ( 'The resource already exists, and an If-None-Match header was supplied' ) ; } file_put_contents ( $ tempLocation , $ this -> server -> httpRequest -> getBody ( ) ) ; $ hR -> setStatus ( $ newFile ? 201 : 200 ) ; return false ; }
This method handles the PUT method.

@param RequestInterface  $request
@param ResponseInterface $hR
@param string            $tempLocation

@return bool
This method handles the PUT method .