public function calendarObjectChange(RequestInterface $request, ResponseInterface $response, VCalendar $vCal, $calendarPath, &$modified, $isNew)
    {
        if (!$this->scheduleReply($this->server->httpRequest)) {
            return;
        }

        $calendarNode = $this->server->tree->getNodeForPath($calendarPath);

        $addresses = $this->getAddressesForPrincipal(
            $calendarNode->getOwner()
        );

        if (!$isNew) {
            $node = $this->server->tree->getNodeForPath($request->getPath());
            $oldObj = Reader::read($node->get());
        } else {
            $oldObj = null;
        }

        $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);

        if ($oldObj) {
            // Destroy circular references so PHP will GC the object.
            $oldObj->destroy();
        }
    }
public function calendarObjectChange(RequestInterface $request, ResponseInterface $response, VCalendar $vCal, $calendarPath, &$modified, $isNew)
    {
        if (!$this->scheduleReply($this->server->httpRequest)) {
            return;
        }

        $calendarNode = $this->server->tree->getNodeForPath($calendarPath);

        $addresses = $this->getAddressesForPrincipal(
            $calendarNode->getOwner()
        );

        if (!$isNew) {
            $node = $this->server->tree->getNodeForPath($request->getPath());
            $oldObj = Reader::read($node->get());
        } else {
            $oldObj = null;
        }

        $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified);

        if ($oldObj) {
            // Destroy circular references so PHP will GC the object.
            $oldObj->destroy();
        }
    }
public function calendarObjectChange ( RequestInterface $ request , ResponseInterface $ response , VCalendar $ vCal , $ calendarPath , & $ modified , $ isNew ) { if ( ! $ this -> scheduleReply ( $ this -> server -> httpRequest ) ) { return ; } $ calendarNode = $ this -> server -> tree -> getNodeForPath ( $ calendarPath ) ; $ addresses = $ this -> getAddressesForPrincipal ( $ calendarNode -> getOwner ( ) ) ; if ( ! $ isNew ) { $ node = $ this -> server -> tree -> getNodeForPath ( $ request -> getPath ( ) ) ; $ oldObj = Reader :: read ( $ node -> get ( ) ) ; } else { $ oldObj = null ; } $ this -> processICalendarChange ( $ oldObj , $ vCal , $ addresses , [ ] , $ modified ) ; if ( $ oldObj ) { // Destroy circular references so PHP will GC the object. $ oldObj -> destroy ( ) ; } }
This method is triggered whenever there was a calendar object gets
created or updated.

@param RequestInterface  $request      HTTP request
@param ResponseInterface $response     HTTP Response
@param VCalendar         $vCal         Parsed iCalendar object
@param mixed             $calendarPath Path to calendar collection
@param mixed             $modified     the iCalendar object has been touched
@param mixed             $isNew        Whether this was a new item or we're updating one
This method is triggered whenever there was a calendar object gets created or updated .