/**
  * This event is triggered when properties are requested for a certain
  * node.
  *
  * This allows us to inject any properties early.
  *
  * @param string $path
  * @param Sabre_DAV_INode $node
  * @param array $requestedProperties
  * @param array $returnedProperties
  * @return void
  */
 public function beforeGetProperties($path, Sabre_DAV_INode $node, &$requestedProperties, &$returnedProperties)
 {
     if ($node instanceof Sabre_CalDAV_IShareableCalendar) {
         if (($index = array_search('{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}invite', $requestedProperties)) !== false) {
             unset($requestedProperties[$index]);
             $returnedProperties[200]['{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}invite'] = new Sabre_CalDAV_Property_Invite($node->getShares());
         }
     }
     if ($node instanceof Sabre_CalDAV_ISharedCalendar) {
         if (($index = array_search('{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}shared-url', $requestedProperties)) !== false) {
             unset($requestedProperties[$index]);
             $returnedProperties[200]['{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}shared-url'] = new Sabre_DAV_Property_Href($node->getSharedUrl());
         }
     }
 }