如何获得活动的创建者?

I want get the creator of a Google Calendar Event, so I browsed the documentation page, specifically this section and I saw that there is an object called creator, but how can I extract this from an event taken by the calendar?

My code looks like this:

foreach ($events->getItems() as $event)
{
    $appointment = [
        'start_datetime' => date('Y-m-d H:i:s', strtotime($event->start->getDateTime())),
        'end_datetime' => date('Y-m-d H:i:s', strtotime($event->end->getDateTime())),
        'notes' => $event->getDescription(),
        'title' => $event->getSummary(),
        'id_user' => $operator_id,
        'id_google_calendar' => $event->getId(),
        'attendee' => []
        'creator' => ??????
    ];
}

Either of these two options should work remember the creator will need to be uppercase first letter.

$event->Creator()  

$event->getCreator()  

If I recall

$event->Creator['email'] should also work.

This library is generated programmatic via the Discovery services API. The documentation has not been generated there for a lot of it will not show up in the documentation its an experience thing. When you have worked with the library for a while you get to know how its designed.

This works:

foreach ($events->getItems() as $event)
{
    var_dump($event->getCreator());
}

(Tried in my code). See official documentation for this at https://developers.google.com/resources/api-libraries/documentation/calendar/v3/php/latest/class-Google_Service_Calendar_Event.html