mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Use getter methods instead of public variables directly
This commit is contained in:
parent
5027b59150
commit
2ae250c698
2 changed files with 6 additions and 6 deletions
|
@ -127,7 +127,7 @@ class Google extends EA_Controller {
|
||||||
{
|
{
|
||||||
$google_event = $CI->google_sync->add_appointment($appointment, $provider, $service, $customer, $settings);
|
$google_event = $CI->google_sync->add_appointment($appointment, $provider, $service, $customer, $settings);
|
||||||
|
|
||||||
$appointment['id_google_calendar'] = $google_event->id;
|
$appointment['id_google_calendar'] = $google_event->getId();
|
||||||
|
|
||||||
$CI->appointments_model->save($appointment); // Save the Google Calendar ID.
|
$CI->appointments_model->save($appointment); // Save the Google Calendar ID.
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ class Google extends EA_Controller {
|
||||||
{
|
{
|
||||||
$google_event = $CI->google_sync->get_event($provider, $appointment['id_google_calendar']);
|
$google_event = $CI->google_sync->get_event($provider, $appointment['id_google_calendar']);
|
||||||
|
|
||||||
if ($google_event->status == 'cancelled')
|
if ($google_event->getStatus() == 'cancelled')
|
||||||
{
|
{
|
||||||
throw new Exception('Event is cancelled, remove the record from Easy!Appointments.');
|
throw new Exception('Event is cancelled, remove the record from Easy!Appointments.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -370,7 +370,7 @@ class Google_sync {
|
||||||
|
|
||||||
$calendars = [];
|
$calendars = [];
|
||||||
|
|
||||||
foreach ($calendar_list->items as $google_calendar)
|
foreach ($calendar_list->getItems() as $google_calendar)
|
||||||
{
|
{
|
||||||
if ($google_calendar->getAccessRole() === 'reader')
|
if ($google_calendar->getAccessRole() === 'reader')
|
||||||
{
|
{
|
||||||
|
@ -378,8 +378,8 @@ class Google_sync {
|
||||||
}
|
}
|
||||||
|
|
||||||
$calendars[] = [
|
$calendars[] = [
|
||||||
'id' => $google_calendar->id,
|
'id' => $google_calendar->getId(),
|
||||||
'summary' => $google_calendar->summary
|
'summary' => $google_calendar->getSummary()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue