public function httpPost(RequestInterface $request, ResponseInterface $response)
    {
        // Checking if this is a text/calendar content type
        $contentType = $request->getHeader('Content-Type');
        if (!$contentType || 0 !== strpos($contentType, 'text/calendar')) {
            return;
        }

        $path = $request->getPath();

        // Checking if we're talking to an outbox
        try {
            $node = $this->server->tree->getNodeForPath($path);
        } catch (NotFound $e) {
            return;
        }
        if (!$node instanceof IOutbox) {
            return;
        }

        $this->server->transactionType = 'post-caldav-outbox';
        $this->outboxRequest($node, $request, $response);

        // Returning false breaks the event chain and tells the server we've
        // handled the request.
        return false;
    }
public function httpPost(RequestInterface $request, ResponseInterface $response)
    {
        // Checking if this is a text/calendar content type
        $contentType = $request->getHeader('Content-Type');
        if (!$contentType || 0 !== strpos($contentType, 'text/calendar')) {
            return;
        }

        $path = $request->getPath();

        // Checking if we're talking to an outbox
        try {
            $node = $this->server->tree->getNodeForPath($path);
        } catch (NotFound $e) {
            return;
        }
        if (!$node instanceof IOutbox) {
            return;
        }

        $this->server->transactionType = 'post-caldav-outbox';
        $this->outboxRequest($node, $request, $response);

        // Returning false breaks the event chain and tells the server we've
        // handled the request.
        return false;
    }
public function httpPost ( RequestInterface $ request , ResponseInterface $ response ) { // Checking if this is a text/calendar content type $ contentType = $ request -> getHeader ( 'Content-Type' ) ; if ( ! $ contentType || 0 !== strpos ( $ contentType , 'text/calendar' ) ) { return ; } $ path = $ request -> getPath ( ) ; // Checking if we're talking to an outbox try { $ node = $ this -> server -> tree -> getNodeForPath ( $ path ) ; } catch ( NotFound $ e ) { return ; } if ( ! $ node instanceof IOutbox ) { return ; } $ this -> server -> transactionType = 'post-caldav-outbox' ; $ this -> outboxRequest ( $ node , $ request , $ response ) ; // Returning false breaks the event chain and tells the server we've // handled the request. return false ; }
This method handles POST request for the outbox.

@param RequestInterface  $request
@param ResponseInterface $response

@return bool
This method handles POST request for the outbox .