public function httpDelete(RequestInterface $request, ResponseInterface $response)
    {
        $path = $request->getPath();

        if (!$this->server->emit('beforeUnbind', [$path])) {
            return false;
        }
        $this->server->tree->delete($path);
        $this->server->emit('afterUnbind', [$path]);

        $response->setStatus(204);
        $response->setHeader('Content-Length', '0');

        // Sending back false will interrupt the event chain and tell the server
        // we've handled this method.
        return false;
    }
public function httpDelete(RequestInterface $request, ResponseInterface $response)
    {
        $path = $request->getPath();

        if (!$this->server->emit('beforeUnbind', [$path])) {
            return false;
        }
        $this->server->tree->delete($path);
        $this->server->emit('afterUnbind', [$path]);

        $response->setStatus(204);
        $response->setHeader('Content-Length', '0');

        // Sending back false will interrupt the event chain and tell the server
        // we've handled this method.
        return false;
    }
public function httpDelete ( RequestInterface $ request , ResponseInterface $ response ) { $ path = $ request -> getPath ( ) ; if ( ! $ this -> server -> emit ( 'beforeUnbind' , [ $ path ] ) ) { return false ; } $ this -> server -> tree -> delete ( $ path ) ; $ this -> server -> emit ( 'afterUnbind' , [ $ path ] ) ; $ response -> setStatus ( 204 ) ; $ response -> setHeader ( 'Content-Length' , '0' ) ; // Sending back false will interrupt the event chain and tell the server // we've handled this method. return false ; }
HTTP Delete.

The HTTP delete method, deletes a given uri

@param RequestInterface  $request
@param ResponseInterface $response
HTTP Delete .