public function getChild($name)
    {
        // Special nodes
        if ('inbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Inbox($this->caldavBackend, $this->principalInfo['uri']);
        }
        if ('outbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Outbox($this->principalInfo['uri']);
        }
        if ('notifications' === $name && $this->caldavBackend instanceof Backend\NotificationSupport) {
            return new Notifications\Collection($this->caldavBackend, $this->principalInfo['uri']);
        }

        // Calendars
        foreach ($this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']) as $calendar) {
            if ($calendar['uri'] === $name) {
                if ($this->caldavBackend instanceof Backend\SharingSupport) {
                    return new SharedCalendar($this->caldavBackend, $calendar);
                } else {
                    return new Calendar($this->caldavBackend, $calendar);
                }
            }
        }

        if ($this->caldavBackend instanceof Backend\SubscriptionSupport) {
            foreach ($this->caldavBackend->getSubscriptionsForUser($this->principalInfo['uri']) as $subscription) {
                if ($subscription['uri'] === $name) {
                    return new Subscriptions\Subscription($this->caldavBackend, $subscription);
                }
            }
        }

        throw new NotFound('Node with name \''.$name.'\' could not be found');
    }
public function getChild($name)
    {
        // Special nodes
        if ('inbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Inbox($this->caldavBackend, $this->principalInfo['uri']);
        }
        if ('outbox' === $name && $this->caldavBackend instanceof Backend\SchedulingSupport) {
            return new Schedule\Outbox($this->principalInfo['uri']);
        }
        if ('notifications' === $name && $this->caldavBackend instanceof Backend\NotificationSupport) {
            return new Notifications\Collection($this->caldavBackend, $this->principalInfo['uri']);
        }

        // Calendars
        foreach ($this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']) as $calendar) {
            if ($calendar['uri'] === $name) {
                if ($this->caldavBackend instanceof Backend\SharingSupport) {
                    return new SharedCalendar($this->caldavBackend, $calendar);
                } else {
                    return new Calendar($this->caldavBackend, $calendar);
                }
            }
        }

        if ($this->caldavBackend instanceof Backend\SubscriptionSupport) {
            foreach ($this->caldavBackend->getSubscriptionsForUser($this->principalInfo['uri']) as $subscription) {
                if ($subscription['uri'] === $name) {
                    return new Subscriptions\Subscription($this->caldavBackend, $subscription);
                }
            }
        }

        throw new NotFound('Node with name \''.$name.'\' could not be found');
    }
public function getChild ( $ name ) { // Special nodes if ( 'inbox' === $ name && $ this -> caldavBackend instanceof Backend \ SchedulingSupport ) { return new Schedule \ Inbox ( $ this -> caldavBackend , $ this -> principalInfo [ 'uri' ] ) ; } if ( 'outbox' === $ name && $ this -> caldavBackend instanceof Backend \ SchedulingSupport ) { return new Schedule \ Outbox ( $ this -> principalInfo [ 'uri' ] ) ; } if ( 'notifications' === $ name && $ this -> caldavBackend instanceof Backend \ NotificationSupport ) { return new Notifications \ Collection ( $ this -> caldavBackend , $ this -> principalInfo [ 'uri' ] ) ; } // Calendars foreach ( $ this -> caldavBackend -> getCalendarsForUser ( $ this -> principalInfo [ 'uri' ] ) as $ calendar ) { if ( $ calendar [ 'uri' ] === $ name ) { if ( $ this -> caldavBackend instanceof Backend \ SharingSupport ) { return new SharedCalendar ( $ this -> caldavBackend , $ calendar ) ; } else { return new Calendar ( $ this -> caldavBackend , $ calendar ) ; } } } if ( $ this -> caldavBackend instanceof Backend \ SubscriptionSupport ) { foreach ( $ this -> caldavBackend -> getSubscriptionsForUser ( $ this -> principalInfo [ 'uri' ] ) as $ subscription ) { if ( $ subscription [ 'uri' ] === $ name ) { return new Subscriptions \ Subscription ( $ this -> caldavBackend , $ subscription ) ; } } } throw new NotFound ( 'Node with name \'' . $ name . '\' could not be found' ) ; }
Returns a single calendar, by name.

@param string $name

@return Calendar
Returns a single calendar by name .