Simple Calendar – Google Calendar Plugin - Version 3.1.36

Version Description

  • Fix: Namspace conflicts with other plugins and composer libraries. Huge shoutout to @mickwall001 on github for this.
Download this release

Release Info

Developer sureswiftcapital
Plugin Icon 128x128 Simple Calendar – Google Calendar Plugin
Version 3.1.36
Comparing to
See all releases

Code changes from version 3.1.35 to 3.1.36

Files changed (205) hide show
  1. assets/css/admin-add-calendar.min.css +1 -1
  2. assets/css/admin.min.css +1 -1
  3. assets/css/default-calendar-grid.min.css +1 -1
  4. assets/css/default-calendar-list.min.css +1 -1
  5. assets/js/admin-add-calendar.min.js +1 -1
  6. assets/js/admin.min.js +1 -1
  7. assets/js/default-calendar.min.js +1 -1
  8. composer.include.dump-autoload +1 -0
  9. composer.third-party.dump-autoload +1 -0
  10. google-calendar-events.php +4 -3
  11. includes/abstracts/calendar.php +1 -1
  12. includes/abstracts/feed.php +262 -262
  13. includes/calendars/default-calendar.php +1 -1
  14. includes/calendars/views/default-calendar-grid.php +2 -2
  15. includes/calendars/views/default-calendar-list.php +2 -2
  16. includes/events/event-builder.php +18 -4
  17. includes/events/event.php +613 -613
  18. includes/events/events.php +608 -605
  19. includes/feeds/admin/google-admin.php +357 -355
  20. includes/feeds/google.php +17 -10
  21. includes/functions/shared.php +12 -1
  22. includes/vendor/autoload.php +7 -0
  23. includes/vendor/composer/ClassLoader.php +479 -0
  24. {vendor → includes/vendor}/composer/LICENSE +0 -0
  25. includes/vendor/composer/autoload_classmap.php +78 -0
  26. includes/vendor/composer/autoload_namespaces.php +9 -0
  27. includes/vendor/composer/autoload_psr4.php +9 -0
  28. includes/vendor/composer/autoload_real.php +46 -0
  29. includes/vendor/composer/autoload_static.php +88 -0
  30. package-lock.json +539 -595
  31. readme.txt +4 -1
  32. scoper.inc.php +139 -0
  33. third-party/firebase/php-jwt/src/BeforeValidException.php +7 -0
  34. third-party/firebase/php-jwt/src/ExpiredException.php +7 -0
  35. third-party/firebase/php-jwt/src/JWK.php +137 -0
  36. third-party/firebase/php-jwt/src/JWT.php +442 -0
  37. third-party/firebase/php-jwt/src/SignatureInvalidException.php +7 -0
  38. third-party/google/apiclient-services/src/Google/Service/Calendar.php +76 -0
  39. third-party/google/apiclient-services/src/Google/Service/Calendar/Acl.php +75 -0
  40. third-party/google/apiclient-services/src/Google/Service/Calendar/AclRule.php +74 -0
  41. third-party/google/apiclient-services/src/Google/Service/Calendar/AclRuleScope.php +40 -0
  42. third-party/google/apiclient-services/src/Google/Service/Calendar/Calendar.php +101 -0
  43. third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarList.php +75 -0
  44. third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntry.php +215 -0
  45. third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntryNotificationSettings.php +39 -0
  46. third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarNotification.php +40 -0
  47. third-party/google/apiclient-services/src/Google/Service/Calendar/Channel.php +112 -0
  48. third-party/google/apiclient-services/src/Google/Service/Calendar/ColorDefinition.php +40 -0
  49. third-party/google/apiclient-services/src/Google/Service/Calendar/Colors.php +72 -0
  50. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceData.php +114 -0
  51. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceParameters.php +38 -0
  52. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceParametersAddOnParameters.php +31 -0
  53. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceProperties.php +32 -0
  54. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceRequestStatus.php +31 -0
  55. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceSolution.php +56 -0
  56. third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceSolutionKey.php +31 -0
  57. third-party/google/apiclient-services/src/Google/Service/Calendar/CreateConferenceRequest.php +63 -0
  58. third-party/google/apiclient-services/src/Google/Service/Calendar/EntryPoint.php +113 -0
  59. third-party/google/apiclient-services/src/Google/Service/Calendar/Error.php +40 -0
  60. third-party/google/apiclient-services/src/Google/Service/Calendar/Event.php +458 -0
  61. third-party/google/apiclient-services/src/Google/Service/Calendar/EventAttachment.php +67 -0
  62. third-party/google/apiclient-services/src/Google/Service/Calendar/EventAttendee.php +112 -0
  63. third-party/google/apiclient-services/src/Google/Service/Calendar/EventCreator.php +58 -0
  64. third-party/google/apiclient-services/src/Google/Service/Calendar/EventDateTime.php +49 -0
  65. third-party/google/apiclient-services/src/Google/Service/Calendar/EventExtendedProperties.php +40 -0
  66. third-party/google/apiclient-services/src/Google/Service/Calendar/EventGadget.php +94 -0
  67. third-party/google/apiclient-services/src/Google/Service/Calendar/EventOrganizer.php +58 -0
  68. third-party/google/apiclient-services/src/Google/Service/Calendar/EventReminder.php +40 -0
  69. third-party/google/apiclient-services/src/Google/Service/Calendar/EventReminders.php +48 -0
  70. third-party/google/apiclient-services/src/Google/Service/Calendar/EventSource.php +40 -0
  71. third-party/google/apiclient-services/src/Google/Service/Calendar/Events.php +136 -0
  72. third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyCalendar.php +55 -0
  73. third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyGroup.php +48 -0
  74. third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequest.php +84 -0
  75. third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequestItem.php +31 -0
  76. third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyResponse.php +81 -0
  77. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Acl.php +190 -0
  78. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/CalendarList.php +196 -0
  79. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Calendars.php +121 -0
  80. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Channels.php +42 -0
  81. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Colors.php +42 -0
  82. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Events.php +485 -0
  83. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Freebusy.php +43 -0
  84. third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Settings.php +94 -0
  85. third-party/google/apiclient-services/src/Google/Service/Calendar/Setting.php +58 -0
  86. third-party/google/apiclient-services/src/Google/Service/Calendar/Settings.php +75 -0
  87. third-party/google/apiclient-services/src/Google/Service/Calendar/TimePeriod.php +40 -0
  88. third-party/google/apiclient-services/src/Google/Service/Drive.php +87 -0
  89. third-party/google/apiclient-services/src/Google/Service/Drive/About.php +168 -0
  90. third-party/google/apiclient-services/src/Google/Service/Drive/AboutDriveThemes.php +49 -0
  91. third-party/google/apiclient-services/src/Google/Service/Drive/AboutStorageQuota.php +58 -0
  92. third-party/google/apiclient-services/src/Google/Service/Drive/AboutTeamDriveThemes.php +49 -0
  93. third-party/google/apiclient-services/src/Google/Service/Drive/Change.php +142 -0
  94. third-party/google/apiclient-services/src/Google/Service/Drive/ChangeList.php +66 -0
  95. third-party/google/apiclient-services/src/Google/Service/Drive/Channel.php +112 -0
  96. third-party/google/apiclient-services/src/Google/Service/Drive/Comment.php +152 -0
  97. third-party/google/apiclient-services/src/Google/Service/Drive/CommentList.php +57 -0
  98. third-party/google/apiclient-services/src/Google/Service/Drive/CommentQuotedFileContent.php +40 -0
  99. third-party/google/apiclient-services/src/Google/Service/Drive/ContentRestriction.php +74 -0
  100. third-party/google/apiclient-services/src/Google/Service/Drive/Drive.php +142 -0
  101. third-party/google/apiclient-services/src/Google/Service/Drive/DriveBackgroundImageFile.php +58 -0
  102. third-party/google/apiclient-services/src/Google/Service/Drive/DriveCapabilities.php +184 -0
  103. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFile.php +613 -0
  104. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileCapabilities.php +328 -0
  105. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileContentHints.php +47 -0
  106. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileContentHintsThumbnail.php +40 -0
  107. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileImageMediaMetadata.php +218 -0
  108. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileImageMediaMetadataLocation.php +49 -0
  109. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileShortcutDetails.php +40 -0
  110. third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileVideoMediaMetadata.php +49 -0
  111. third-party/google/apiclient-services/src/Google/Service/Drive/DriveList.php +57 -0
  112. third-party/google/apiclient-services/src/Google/Service/Drive/DriveRestrictions.php +58 -0
  113. third-party/google/apiclient-services/src/Google/Service/Drive/FileList.php +66 -0
  114. third-party/google/apiclient-services/src/Google/Service/Drive/GeneratedIds.php +50 -0
  115. third-party/google/apiclient-services/src/Google/Service/Drive/Permission.php +163 -0
  116. third-party/google/apiclient-services/src/Google/Service/Drive/PermissionList.php +57 -0
  117. third-party/google/apiclient-services/src/Google/Service/Drive/PermissionPermissionDetails.php +58 -0
  118. third-party/google/apiclient-services/src/Google/Service/Drive/PermissionTeamDrivePermissionDetails.php +58 -0
  119. third-party/google/apiclient-services/src/Google/Service/Drive/Reply.php +110 -0
  120. third-party/google/apiclient-services/src/Google/Service/Drive/ReplyList.php +57 -0
  121. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/About.php +43 -0
  122. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Changes.php +137 -0
  123. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Channels.php +42 -0
  124. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Comments.php +111 -0
  125. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Drives.php +141 -0
  126. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php +298 -0
  127. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Permissions.php +168 -0
  128. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Replies.php +114 -0
  129. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Revisions.php +97 -0
  130. third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Teamdrives.php +114 -0
  131. third-party/google/apiclient-services/src/Google/Service/Drive/Revision.php +155 -0
  132. third-party/google/apiclient-services/src/Google/Service/Drive/RevisionList.php +57 -0
  133. third-party/google/apiclient-services/src/Google/Service/Drive/StartPageToken.php +40 -0
  134. third-party/google/apiclient-services/src/Google/Service/Drive/TeamDrive.php +133 -0
  135. third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveBackgroundImageFile.php +58 -0
  136. third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveCapabilities.php +193 -0
  137. third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveList.php +57 -0
  138. third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveRestrictions.php +58 -0
  139. third-party/google/apiclient-services/src/Google/Service/Drive/User.php +76 -0
  140. third-party/google/apiclient/src/AccessToken/Revoke.php +65 -0
  141. third-party/google/apiclient/src/AccessToken/Verify.php +246 -0
  142. third-party/google/apiclient/src/AuthHandler/AuthHandlerFactory.php +50 -0
  143. third-party/google/apiclient/src/AuthHandler/Guzzle5AuthHandler.php +67 -0
  144. third-party/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php +76 -0
  145. third-party/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php +25 -0
  146. third-party/google/apiclient/src/Client.php +1009 -0
  147. third-party/google/apiclient/src/Collection.php +84 -0
  148. third-party/google/apiclient/src/Exception.php +23 -0
  149. third-party/google/apiclient/src/Http/Batch.php +191 -0
  150. third-party/google/apiclient/src/Http/MediaFileUpload.php +280 -0
  151. third-party/google/apiclient/src/Http/REST.php +150 -0
  152. third-party/google/apiclient/src/Model.php +296 -0
  153. third-party/google/apiclient/src/Service.php +62 -0
  154. third-party/google/apiclient/src/Service/Exception.php +63 -0
  155. third-party/google/apiclient/src/Service/Resource.php +216 -0
  156. third-party/google/apiclient/src/Task/Composer.php +72 -0
  157. third-party/google/apiclient/src/Task/Exception.php +23 -0
  158. third-party/google/apiclient/src/Task/Retryable.php +26 -0
  159. third-party/google/apiclient/src/Task/Runner.php +234 -0
  160. third-party/google/apiclient/src/Utils/UriTemplate.php +266 -0
  161. third-party/google/apiclient/src/aliases.php +82 -0
  162. {vendor → third-party}/google/auth/COPYING +0 -0
  163. third-party/google/auth/autoload.php +35 -0
  164. third-party/google/auth/src/AccessToken.php +388 -0
  165. third-party/google/auth/src/ApplicationDefaultCredentials.php +253 -0
  166. third-party/google/auth/src/Cache/InvalidArgumentException.php +23 -0
  167. third-party/google/auth/src/Cache/Item.php +155 -0
  168. third-party/google/auth/src/Cache/MemoryCacheItemPool.php +130 -0
  169. third-party/google/auth/src/Cache/SysVCacheItemPool.php +198 -0
  170. third-party/google/auth/src/CacheTrait.php +72 -0
  171. third-party/google/auth/src/Credentials/AppIdentityCredentials.php +200 -0
  172. third-party/google/auth/src/Credentials/GCECredentials.php +428 -0
  173. third-party/google/auth/src/Credentials/IAMCredentials.php +77 -0
  174. third-party/google/auth/src/Credentials/InsecureCredentials.php +64 -0
  175. third-party/google/auth/src/Credentials/ServiceAccountCredentials.php +226 -0
  176. third-party/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php +160 -0
  177. third-party/google/auth/src/Credentials/UserRefreshCredentials.php +117 -0
  178. third-party/google/auth/src/CredentialsLoader.php +207 -0
  179. third-party/google/auth/src/FetchAuthTokenCache.php +201 -0
  180. third-party/google/auth/src/FetchAuthTokenInterface.php +52 -0
  181. third-party/google/auth/src/GCECache.php +78 -0
  182. third-party/google/auth/src/GetQuotaProjectInterface.php +32 -0
  183. third-party/google/auth/src/HttpHandler/Guzzle5HttpHandler.php +90 -0
  184. third-party/google/auth/src/HttpHandler/Guzzle6HttpHandler.php +59 -0
  185. third-party/google/auth/src/HttpHandler/Guzzle7HttpHandler.php +22 -0
  186. third-party/google/auth/src/HttpHandler/HttpClientCache.php +51 -0
  187. third-party/google/auth/src/HttpHandler/HttpHandlerFactory.php +51 -0
  188. third-party/google/auth/src/Iam.php +78 -0
  189. third-party/google/auth/src/Middleware/AuthTokenMiddleware.php +125 -0
  190. third-party/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php +148 -0
  191. third-party/google/auth/src/Middleware/SimpleMiddleware.php +86 -0
  192. third-party/google/auth/src/OAuth2.php +1194 -0
  193. third-party/google/auth/src/ProjectIdProviderInterface.php +32 -0
  194. third-party/google/auth/src/ServiceAccountSignerTrait.php +53 -0
  195. third-party/google/auth/src/SignBlobInterface.php +43 -0
  196. third-party/google/auth/src/Subscriber/AuthTokenSubscriber.php +120 -0
  197. third-party/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php +154 -0
  198. third-party/google/auth/src/Subscriber/SimpleSubscriber.php +88 -0
  199. third-party/google/auth/src/UpdateMetadataInterface.php +36 -0
  200. third-party/guzzlehttp/guzzle/src/BodySummarizer.php +23 -0
  201. third-party/guzzlehttp/guzzle/src/BodySummarizerInterface.php +12 -0
  202. third-party/guzzlehttp/guzzle/src/Client.php +396 -0
  203. third-party/guzzlehttp/guzzle/src/ClientInterface.php +78 -0
  204. third-party/guzzlehttp/guzzle/src/ClientTrait.php +227 -0
  205. third-party/guzzlehttp/guzzle/src/Cookie/CookieJar.php +105 -0
assets/css/admin-add-calendar.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/css/admin.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/css/default-calendar-grid.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/css/default-calendar-list.min.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/js/admin-add-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
assets/js/default-calendar.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Simple Calendar - 3.1.35
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
1
+ /*! Simple Calendar - 3.1.36
2
  * https://simplecalendar.io
3
  * Copyright (c) Moonstone Media 2021
4
  * Licensed GPLv2+ */
composer.include.dump-autoload ADDED
@@ -0,0 +1 @@
 
1
+ { "autoload": { "classmap": [""] } }
composer.third-party.dump-autoload ADDED
@@ -0,0 +1 @@
 
1
+ { "autoload": { "classmap": [""],"files":["guzzlehttp/psr7/src/functions_include.php"] } }
google-calendar-events.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
  * Author: Simple Calendar
7
  * Author URI: https://simplecalendar.io
8
- * Version: 3.1.35
9
  * Text Domain: google-calendar-events
10
  * Domain Path: /i18n
11
  *
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
22
  $this_plugin_dir = plugin_dir_url( __FILE__ );
23
  $this_plugin_constants = array(
24
- 'SIMPLE_CALENDAR_VERSION' => '3.1.35',
25
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
26
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
27
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
@@ -55,7 +55,8 @@ if ( $this_plugin_checks->pass() === false ) {
55
  return;
56
  }
57
 
58
- include_once 'vendor/autoload.php';
 
59
 
60
  // Load plugin.
61
  include_once 'includes/main.php';
5
  * Description: Add Google Calendar events to your WordPress site in minutes. Beautiful calendar displays. Fully responsive.
6
  * Author: Simple Calendar
7
  * Author URI: https://simplecalendar.io
8
+ * Version: 3.1.36
9
  * Text Domain: google-calendar-events
10
  * Domain Path: /i18n
11
  *
21
  $this_plugin_path = trailingslashit( dirname( __FILE__ ) );
22
  $this_plugin_dir = plugin_dir_url( __FILE__ );
23
  $this_plugin_constants = array(
24
+ 'SIMPLE_CALENDAR_VERSION' => '3.1.36',
25
  'SIMPLE_CALENDAR_MAIN_FILE' => __FILE__,
26
  'SIMPLE_CALENDAR_URL' => $this_plugin_dir,
27
  'SIMPLE_CALENDAR_ASSETS' => $this_plugin_dir . 'assets/',
55
  return;
56
  }
57
 
58
+ include_once 'third-party/vendor/autoload.php';
59
+
60
 
61
  // Load plugin.
62
  include_once 'includes/main.php';
includes/abstracts/calendar.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  namespace SimpleCalendar\Abstracts;
8
 
9
- use Carbon\Carbon;
10
  use SimpleCalendar\Events\Event;
11
  use SimpleCalendar\Events\Event_Builder;
12
  use SimpleCalendar\Events\Events;
6
  */
7
  namespace SimpleCalendar\Abstracts;
8
 
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
  use SimpleCalendar\Events\Event;
11
  use SimpleCalendar\Events\Event_Builder;
12
  use SimpleCalendar\Events\Events;
includes/abstracts/feed.php CHANGED
@@ -1,262 +1,262 @@
1
- <?php
2
- /**
3
- * Feed
4
- *
5
- * @package SimpleCalendar/Feeds
6
- */
7
- namespace SimpleCalendar\Abstracts;
8
-
9
- use Carbon\Carbon;
10
-
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- /**
16
- * The Feed.
17
- *
18
- * Source of events supplied to calendars.
19
- *
20
- * @since 3.0.0
21
- */
22
- abstract class Feed {
23
-
24
- /**
25
- * Feed type.
26
- *
27
- * @access public
28
- * @var string
29
- */
30
- public $type = '';
31
-
32
- /**
33
- * Feed name.
34
- *
35
- * @access public
36
- * @var string
37
- */
38
- public $name = '';
39
-
40
- /**
41
- * Calendar post id.
42
- *
43
- * @access public
44
- * @var int
45
- */
46
- public $post_id = 0;
47
-
48
- /**
49
- * Calendar opening.
50
- *
51
- * @access protected
52
- * @var int
53
- */
54
- protected $calendar_start = 0;
55
-
56
- /**
57
- * Start of week.
58
- *
59
- * @access protected
60
- * @var int
61
- */
62
- protected $week_starts = 0;
63
-
64
- /**
65
- * Events.
66
- *
67
- * @access public
68
- * @var array
69
- */
70
- public $events = array();
71
-
72
- /**
73
- * Events template.
74
- *
75
- * @access protected
76
- * @var string
77
- */
78
- protected $events_template = '';
79
-
80
- /**
81
- * Timezone setting.
82
- *
83
- * @access protected
84
- * @var string
85
- */
86
- protected $timezone_setting = '';
87
-
88
- /**
89
- * Timezone.
90
- *
91
- * @access public
92
- * @var string
93
- */
94
- public $timezone = '';
95
-
96
- /**
97
- * Earliest possible event.
98
- *
99
- * @access public
100
- * @var int
101
- */
102
- public $time_min = 0;
103
-
104
- /**
105
- * Latest possible event.
106
- *
107
- * @access public
108
- * @var int
109
- */
110
- public $time_max = 0;
111
-
112
- /**
113
- * Feed cache interval.
114
- *
115
- * @access protected
116
- * @var int
117
- */
118
- protected $cache = 7200;
119
-
120
- /**
121
- * Feed settings.
122
- *
123
- * @access protected
124
- * @var array
125
- */
126
- protected $settings = array();
127
-
128
- /**
129
- * Constructor.
130
- *
131
- * @since 3.0.0
132
- *
133
- * @param string|Calendar $calendar
134
- */
135
- public function __construct( $calendar = '' ) {
136
-
137
- if ( $calendar instanceof Calendar ) {
138
-
139
- if ( isset( $calendar->id ) ) {
140
- $this->post_id = $calendar->id;
141
- }
142
- if ( isset( $calendar->start ) ) {
143
- $this->calendar_start = $calendar->start;
144
- }
145
- $this->week_starts = isset( $calendar->week_starts ) ? $calendar->week_starts : get_option( 'start_of_week' );
146
- $this->events_template = ! empty( $calendar->events_template ) ? $calendar->events_template : simcal_default_event_template();
147
-
148
- if ( $this->post_id > 0 ) {
149
- $this->set_cache();
150
- $this->timezone_setting = get_post_meta( $this->post_id, '_feed_timezone_setting', true );
151
- $this->timezone = $calendar->timezone;
152
- $this->set_earliest_event();
153
- $this->set_latest_event();
154
- }
155
- }
156
- }
157
-
158
- /**
159
- * Input fields for settings page.
160
- *
161
- * @since 3.0.0
162
- *
163
- * @return false|array
164
- */
165
- public function settings_fields() {
166
- return $this->settings;
167
- }
168
-
169
- /**
170
- * Set earliest event.
171
- *
172
- * @since 3.0.0
173
- *
174
- * @param int $timestamp
175
- */
176
- public function set_earliest_event( $timestamp = 0 ) {
177
-
178
- $earliest = intval( $timestamp );
179
-
180
- if ( $earliest === 0 ) {
181
-
182
- $start = Carbon::createFromTimestamp( $this->calendar_start, $this->timezone );
183
-
184
- $earliest_date = esc_attr( get_post_meta( $this->post_id, '_feed_earliest_event_date', true ) );
185
- $earliest_range = max( absint( get_post_meta( $this->post_id, '_feed_earliest_event_date_range', true ) ), 1 );
186
-
187
- if ( 'days_before' == $earliest_date ) {
188
- $earliest = $start->subDays( $earliest_range )->getTimestamp();
189
- } elseif ( 'weeks_before' == $earliest_date ) {
190
- $earliest = $start->subWeeks( $earliest_range )->addDay()->getTimestamp();
191
- } elseif ( 'months_before' == $earliest_date ) {
192
- $earliest = $start->subMonths( $earliest_range )->addDay()->getTimestamp();
193
- } elseif ( 'years_before' == $earliest_date ) {
194
- $earliest = $start->subYears( $earliest_range )->addDay()->getTimestamp();
195
- } else {
196
- $earliest = $start->getTimestamp();
197
- }
198
- }
199
-
200
- $this->time_min = $earliest;
201
- }
202
-
203
- /**
204
- * Set latest event.
205
- *
206
- * @since 3.0.0
207
- *
208
- * @param int $timestamp
209
- */
210
- public function set_latest_event( $timestamp = 0 ) {
211
-
212
- $latest = intval( $timestamp );
213
-
214
- if ( $latest === 0 ) {
215
-
216
- $start = Carbon::createFromTimestamp( $this->calendar_start, $this->timezone )->endOfDay();
217
-
218
- $latest_date = esc_attr( get_post_meta( $this->post_id, '_feed_latest_event_date', true ) );
219
- $latest_range = max( absint( get_post_meta( $this->post_id, '_feed_latest_event_date_range', true ) ), 1 );
220
-
221
- if ( 'days_after' == $latest_date ) {
222
- $latest = $start->addDays( $latest_range )->getTimestamp();
223
- } elseif ( 'weeks_after' == $latest_date ) {
224
- $latest = $start->addWeeks( $latest_range )->subDay()->getTimestamp();
225
- } elseif ( 'months_after' == $latest_date ) {
226
- $latest = $start->addMonths( $latest_range )->subDay()->getTimestamp();
227
- } elseif ( 'years_after' == $latest_date ) {
228
- $latest = $start->addYears( $latest_range )->subDay()->getTimestamp();
229
- } else {
230
- $latest = $start->getTimestamp();
231
- }
232
-
233
- }
234
-
235
- $this->time_max = $latest;
236
- }
237
-
238
- /**
239
- * Set cache.
240
- *
241
- * @since 3.0.0
242
- *
243
- * @param int $time
244
- */
245
- public function set_cache( $time = 0 ) {
246
- if ( $time === 0 || ! is_numeric( $time ) ) {
247
- $cache = get_post_meta( $this->post_id, '_feed_cache', true );
248
- $time = is_numeric( $cache ) && $cache >= 0 ? absint( $cache ) : $this->cache;
249
- }
250
- $this->cache = absint( $time );
251
- }
252
-
253
- /**
254
- * Get events feed.
255
- *
256
- * @since 3.0.0
257
- *
258
- * @return array
259
- */
260
- abstract public function get_events();
261
-
262
- }
1
+ <?php
2
+ /**
3
+ * Feed
4
+ *
5
+ * @package SimpleCalendar/Feeds
6
+ */
7
+ namespace SimpleCalendar\Abstracts;
8
+
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ /**
16
+ * The Feed.
17
+ *
18
+ * Source of events supplied to calendars.
19
+ *
20
+ * @since 3.0.0
21
+ */
22
+ abstract class Feed {
23
+
24
+ /**
25
+ * Feed type.
26
+ *
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $type = '';
31
+
32
+ /**
33
+ * Feed name.
34
+ *
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = '';
39
+
40
+ /**
41
+ * Calendar post id.
42
+ *
43
+ * @access public
44
+ * @var int
45
+ */
46
+ public $post_id = 0;
47
+
48
+ /**
49
+ * Calendar opening.
50
+ *
51
+ * @access protected
52
+ * @var int
53
+ */
54
+ protected $calendar_start = 0;
55
+
56
+ /**
57
+ * Start of week.
58
+ *
59
+ * @access protected
60
+ * @var int
61
+ */
62
+ protected $week_starts = 0;
63
+
64
+ /**
65
+ * Events.
66
+ *
67
+ * @access public
68
+ * @var array
69
+ */
70
+ public $events = array();
71
+
72
+ /**
73
+ * Events template.
74
+ *
75
+ * @access protected
76
+ * @var string
77
+ */
78
+ protected $events_template = '';
79
+
80
+ /**
81
+ * Timezone setting.
82
+ *
83
+ * @access protected
84
+ * @var string
85
+ */
86
+ protected $timezone_setting = '';
87
+
88
+ /**
89
+ * Timezone.
90
+ *
91
+ * @access public
92
+ * @var string
93
+ */
94
+ public $timezone = '';
95
+
96
+ /**
97
+ * Earliest possible event.
98
+ *
99
+ * @access public
100
+ * @var int
101
+ */
102
+ public $time_min = 0;
103
+
104
+ /**
105
+ * Latest possible event.
106
+ *
107
+ * @access public
108
+ * @var int
109
+ */
110
+ public $time_max = 0;
111
+
112
+ /**
113
+ * Feed cache interval.
114
+ *
115
+ * @access protected
116
+ * @var int
117
+ */
118
+ protected $cache = 7200;
119
+
120
+ /**
121
+ * Feed settings.
122
+ *
123
+ * @access protected
124
+ * @var array
125
+ */
126
+ protected $settings = array();
127
+
128
+ /**
129
+ * Constructor.
130
+ *
131
+ * @since 3.0.0
132
+ *
133
+ * @param string|Calendar $calendar
134
+ */
135
+ public function __construct( $calendar = '' ) {
136
+
137
+ if ( $calendar instanceof Calendar ) {
138
+
139
+ if ( isset( $calendar->id ) ) {
140
+ $this->post_id = $calendar->id;
141
+ }
142
+ if ( isset( $calendar->start ) ) {
143
+ $this->calendar_start = $calendar->start;
144
+ }
145
+ $this->week_starts = isset( $calendar->week_starts ) ? $calendar->week_starts : get_option( 'start_of_week' );
146
+ $this->events_template = ! empty( $calendar->events_template ) ? $calendar->events_template : simcal_default_event_template();
147
+
148
+ if ( $this->post_id > 0 ) {
149
+ $this->set_cache();
150
+ $this->timezone_setting = get_post_meta( $this->post_id, '_feed_timezone_setting', true );
151
+ $this->timezone = $calendar->timezone;
152
+ $this->set_earliest_event();
153
+ $this->set_latest_event();
154
+ }
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Input fields for settings page.
160
+ *
161
+ * @since 3.0.0
162
+ *
163
+ * @return false|array
164
+ */
165
+ public function settings_fields() {
166
+ return $this->settings;
167
+ }
168
+
169
+ /**
170
+ * Set earliest event.
171
+ *
172
+ * @since 3.0.0
173
+ *
174
+ * @param int $timestamp
175
+ */
176
+ public function set_earliest_event( $timestamp = 0 ) {
177
+
178
+ $earliest = intval( $timestamp );
179
+
180
+ if ( $earliest === 0 ) {
181
+
182
+ $start = Carbon::createFromTimestamp( $this->calendar_start, $this->timezone );
183
+
184
+ $earliest_date = esc_attr( get_post_meta( $this->post_id, '_feed_earliest_event_date', true ) );
185
+ $earliest_range = max( absint( get_post_meta( $this->post_id, '_feed_earliest_event_date_range', true ) ), 1 );
186
+
187
+ if ( 'days_before' == $earliest_date ) {
188
+ $earliest = $start->subDays( $earliest_range )->getTimestamp();
189
+ } elseif ( 'weeks_before' == $earliest_date ) {
190
+ $earliest = $start->subWeeks( $earliest_range )->addDay()->getTimestamp();
191
+ } elseif ( 'months_before' == $earliest_date ) {
192
+ $earliest = $start->subMonths( $earliest_range )->addDay()->getTimestamp();
193
+ } elseif ( 'years_before' == $earliest_date ) {
194
+ $earliest = $start->subYears( $earliest_range )->addDay()->getTimestamp();
195
+ } else {
196
+ $earliest = $start->getTimestamp();
197
+ }
198
+ }
199
+
200
+ $this->time_min = $earliest;
201
+ }
202
+
203
+ /**
204
+ * Set latest event.
205
+ *
206
+ * @since 3.0.0
207
+ *
208
+ * @param int $timestamp
209
+ */
210
+ public function set_latest_event( $timestamp = 0 ) {
211
+
212
+ $latest = intval( $timestamp );
213
+
214
+ if ( $latest === 0 ) {
215
+
216
+ $start = Carbon::createFromTimestamp( $this->calendar_start, $this->timezone )->endOfDay();
217
+
218
+ $latest_date = esc_attr( get_post_meta( $this->post_id, '_feed_latest_event_date', true ) );
219
+ $latest_range = max( absint( get_post_meta( $this->post_id, '_feed_latest_event_date_range', true ) ), 1 );
220
+
221
+ if ( 'days_after' == $latest_date ) {
222
+ $latest = $start->addDays( $latest_range )->getTimestamp();
223
+ } elseif ( 'weeks_after' == $latest_date ) {
224
+ $latest = $start->addWeeks( $latest_range )->subDay()->getTimestamp();
225
+ } elseif ( 'months_after' == $latest_date ) {
226
+ $latest = $start->addMonths( $latest_range )->subDay()->getTimestamp();
227
+ } elseif ( 'years_after' == $latest_date ) {
228
+ $latest = $start->addYears( $latest_range )->subDay()->getTimestamp();
229
+ } else {
230
+ $latest = $start->getTimestamp();
231
+ }
232
+
233
+ }
234
+
235
+ $this->time_max = $latest;
236
+ }
237
+
238
+ /**
239
+ * Set cache.
240
+ *
241
+ * @since 3.0.0
242
+ *
243
+ * @param int $time
244
+ */
245
+ public function set_cache( $time = 0 ) {
246
+ if ( $time === 0 || ! is_numeric( $time ) ) {
247
+ $cache = get_post_meta( $this->post_id, '_feed_cache', true );
248
+ $time = is_numeric( $cache ) && $cache >= 0 ? absint( $cache ) : $this->cache;
249
+ }
250
+ $this->cache = absint( $time );
251
+ }
252
+
253
+ /**
254
+ * Get events feed.
255
+ *
256
+ * @since 3.0.0
257
+ *
258
+ * @return array
259
+ */
260
+ abstract public function get_events();
261
+
262
+ }
includes/calendars/default-calendar.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  namespace SimpleCalendar\Calendars;
8
 
9
- use Carbon\Carbon;
10
  use SimpleCalendar\Abstracts\Calendar;
11
  use SimpleCalendar\Abstracts\Calendar_View;
12
  use SimpleCalendar\Calendars\Admin\Default_Calendar_Admin;
6
  */
7
  namespace SimpleCalendar\Calendars;
8
 
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
  use SimpleCalendar\Abstracts\Calendar;
11
  use SimpleCalendar\Abstracts\Calendar_View;
12
  use SimpleCalendar\Calendars\Admin\Default_Calendar_Admin;
includes/calendars/views/default-calendar-grid.php CHANGED
@@ -6,8 +6,8 @@
6
  */
7
  namespace SimpleCalendar\Calendars\Views;
8
 
9
- use Carbon\Carbon;
10
- use Mexitek\PHPColors\Color;
11
  use SimpleCalendar\Abstracts\Calendar;
12
  use SimpleCalendar\Abstracts\Calendar_View;
13
  use SimpleCalendar\Events\Event;
6
  */
7
  namespace SimpleCalendar\Calendars\Views;
8
 
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
+ use SimpleCalendar\plugin_deps\Mexitek\PHPColors\Color;
11
  use SimpleCalendar\Abstracts\Calendar;
12
  use SimpleCalendar\Abstracts\Calendar_View;
13
  use SimpleCalendar\Events\Event;
includes/calendars/views/default-calendar-list.php CHANGED
@@ -6,8 +6,8 @@
6
  */
7
  namespace SimpleCalendar\Calendars\Views;
8
 
9
- use Carbon\Carbon;
10
- use Mexitek\PHPColors\Color;
11
  use SimpleCalendar\Abstracts\Calendar;
12
  use SimpleCalendar\Abstracts\Calendar_View;
13
  use SimpleCalendar\Calendars\Default_Calendar;
6
  */
7
  namespace SimpleCalendar\Calendars\Views;
8
 
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
+ use SimpleCalendar\plugin_deps\Mexitek\PHPColors\Color;
11
  use SimpleCalendar\Abstracts\Calendar;
12
  use SimpleCalendar\Abstracts\Calendar_View;
13
  use SimpleCalendar\Calendars\Default_Calendar;
includes/events/event-builder.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  namespace SimpleCalendar\Events;
8
 
9
- use Carbon\Carbon;
10
  use SimpleCalendar\Abstracts\Calendar;
11
 
12
  if ( ! defined( 'ABSPATH' ) ) {
@@ -68,7 +68,8 @@ class Event_Builder {
68
  * @return array
69
  */
70
  public function get_content_tags() {
71
- return array_merge( array(
 
72
 
73
  /* ============ *
74
  * Content Tags *
@@ -414,7 +415,10 @@ class Event_Builder {
414
 
415
  if ( $event->end_dt instanceof Carbon ) {
416
  $end = $event->end_dt->setTimezone( $calendar->timezone )->getTimestamp();
 
417
  } else {
 
 
418
  return '';
419
  }
420
 
@@ -715,6 +719,10 @@ class Event_Builder {
715
  $time_end = '<span class="simcal-event-end simcal-event-end-time" ' . 'data-event-end="' . $end_ts . '" ' . 'data-event-format="' . $this->calendar->time_format . '" ' . 'itemprop="endDate" content="' . $end_iso . '">' . date_i18n( $this->calendar->time_format, strtotime( $end->toDateTimeString() ) ) . '</span>';
716
 
717
  }
 
 
 
 
718
 
719
  }
720
 
@@ -726,6 +734,9 @@ class Event_Builder {
726
 
727
  $output .= ' - ' . '<span class="simcal-event-start simcal-event-end-date" ' . 'data-event-start="' . $end_ts . '" ' . 'data-event-format="' . $this->calendar->date_format . '" ' . 'itemprop="endDate" content="' . $end_iso . '">' . date_i18n( $this->calendar->date_format, strtotime( $end->toDateTimeString() ) ) . '</span>' . $this->calendar->datetime_separator . $time_end;
728
  }
 
 
 
729
 
730
  } else {
731
 
@@ -762,9 +773,12 @@ class Event_Builder {
762
  $dt = $bound . '_dt';
763
 
764
  if ( ! $event->$dt instanceof Carbon ) {
765
- return '';
766
- }
767
 
 
 
 
 
768
  $event_dt = $event->$dt;
769
 
770
  $attr = array_merge( array(
6
  */
7
  namespace SimpleCalendar\Events;
8
 
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
  use SimpleCalendar\Abstracts\Calendar;
11
 
12
  if ( ! defined( 'ABSPATH' ) ) {
68
  * @return array
69
  */
70
  public function get_content_tags() {
71
+
72
+ return array_merge( array(
73
 
74
  /* ============ *
75
  * Content Tags *
415
 
416
  if ( $event->end_dt instanceof Carbon ) {
417
  $end = $event->end_dt->setTimezone( $calendar->timezone )->getTimestamp();
418
+
419
  } else {
420
+ simcal_log_error("NOT CARBON");
421
+
422
  return '';
423
  }
424
 
719
  $time_end = '<span class="simcal-event-end simcal-event-end-time" ' . 'data-event-end="' . $end_ts . '" ' . 'data-event-format="' . $this->calendar->time_format . '" ' . 'itemprop="endDate" content="' . $end_iso . '">' . date_i18n( $this->calendar->time_format, strtotime( $end->toDateTimeString() ) ) . '</span>';
720
 
721
  }
722
+ else
723
+ {
724
+ simcal_log_error("NOT CARBON");
725
+ }
726
 
727
  }
728
 
734
 
735
  $output .= ' - ' . '<span class="simcal-event-start simcal-event-end-date" ' . 'data-event-start="' . $end_ts . '" ' . 'data-event-format="' . $this->calendar->date_format . '" ' . 'itemprop="endDate" content="' . $end_iso . '">' . date_i18n( $this->calendar->date_format, strtotime( $end->toDateTimeString() ) ) . '</span>' . $this->calendar->datetime_separator . $time_end;
736
  }
737
+ else{
738
+ simcal_log_error("NOT CARBON");
739
+ }
740
 
741
  } else {
742
 
773
  $dt = $bound . '_dt';
774
 
775
  if ( ! $event->$dt instanceof Carbon ) {
776
+ simcal_log_error("NOT CARBON");
 
777
 
778
+ return '';
779
+ }
780
+
781
+
782
  $event_dt = $event->$dt;
783
 
784
  $attr = array_merge( array(
includes/events/event.php CHANGED
@@ -1,613 +1,613 @@
1
- <?php
2
- /**
3
- * Event
4
- *
5
- * @package SimpleCalendar/Events
6
- */
7
- namespace SimpleCalendar\Events;
8
-
9
- use Carbon\Carbon;
10
-
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- /**
16
- * The Event.
17
- *
18
- * @since 3.0.0
19
- */
20
- class Event {
21
-
22
- /**
23
- * Event type.
24
- *
25
- * @access public
26
- * @var string
27
- */
28
- public $type = '';
29
-
30
- /**
31
- * Event source.
32
- *
33
- * @access public
34
- * @var string
35
- */
36
- public $source = '';
37
-
38
- /**
39
- * Event title.
40
- *
41
- * @access public
42
- * @var string
43
- */
44
- public $title = '';
45
-
46
- /**
47
- * Event description.
48
- *
49
- * @access public
50
- * @var string
51
- */
52
- public $description = '';
53
-
54
- /**
55
- * Event visibility.
56
- *
57
- * @access public
58
- * @var string
59
- */
60
- public $visibility = '';
61
-
62
- /**
63
- * Event privacy.
64
- *
65
- * @access public
66
- * @var bool
67
- */
68
- public $public = false;
69
-
70
- /**
71
- * Event link URL.
72
- *
73
- * @access public
74
- * @var
75
- */
76
- public $link = '';
77
-
78
- /**
79
- * Event unique identifier.
80
- *
81
- * @access public
82
- * @var string
83
- */
84
- public $uid = '';
85
-
86
- /**
87
- * Event iCal ID
88
- */
89
- public $ical_id = '';
90
-
91
- /**
92
- * Event parent calendar id.
93
- *
94
- * @access public
95
- * @var int
96
- */
97
- public $calendar = 0;
98
-
99
- /**
100
- * Event parent calendar timezone.
101
- *
102
- * @access public
103
- * @var string
104
- */
105
- public $timezone = 'UTC';
106
-
107
- /**
108
- * Event start time.
109
- *
110
- * @access public
111
- * @var int
112
- */
113
- public $start = 0;
114
-
115
- /**
116
- * Event start time in GMT.
117
- *
118
- * @access public
119
- * @var int
120
- */
121
- public $start_utc = 0;
122
-
123
- /**
124
- * Event start datetime object.
125
- *
126
- * @access public
127
- * @var Carbon
128
- */
129
- public $start_dt = null;
130
-
131
- /**
132
- * Event start time timezone.
133
- *
134
- * @access public
135
- * @var string
136
- */
137
- public $start_timezone = 'UTC';
138
-
139
- /**
140
- * Event location at event start.
141
- *
142
- * @access public
143
- * @var array
144
- */
145
- public $start_location = false;
146
-
147
- /**
148
- * Event end time.
149
- *
150
- * @access public
151
- * @var false|int
152
- */
153
- public $end = false;
154
-
155
- /**
156
- * Event end time in GMT.
157
- *
158
- * @access public
159
- * @var false|int
160
- */
161
- public $end_utc = false;
162
-
163
- /**
164
- * Event end datetime object.
165
- *
166
- * @access public
167
- * @var null|Carbon
168
- */
169
- public $end_dt = null;
170
-
171
- /**
172
- * Event end time timezone.
173
- *
174
- * @access public
175
- * @var string
176
- */
177
- public $end_timezone = 'UTC';
178
-
179
- /**
180
- * Event location at event end.
181
- *
182
- * @access public
183
- * @var array
184
- */
185
- public $end_location = false;
186
-
187
- /**
188
- * Event has location.
189
- *
190
- * @access public
191
- * @var bool
192
- */
193
- public $venue = false;
194
-
195
- /**
196
- * Whole day event.
197
- *
198
- * @access public
199
- * @var bool
200
- */
201
- public $whole_day = false;
202
-
203
- /**
204
- * Multiple days span.
205
- *
206
- * @access public
207
- * @var bool|int
208
- */
209
- public $multiple_days = false;
210
-
211
- /**
212
- * Recurring event.
213
- *
214
- * @access public
215
- * @var false|array
216
- */
217
- public $recurrence = false;
218
-
219
- /**
220
- * Event meta.
221
- *
222
- * @access public
223
- * @var array
224
- */
225
- public $meta = array();
226
-
227
- /**
228
- * Event default template.
229
- *
230
- * @access public
231
- * @var string
232
- */
233
- public $template = '';
234
-
235
- /**
236
- * Event constructor.
237
- *
238
- * @since 3.0.0
239
- *
240
- * @param array $event
241
- */
242
- public function __construct( array $event ) {
243
-
244
- /* ================= *
245
- * Event Identifiers *
246
- * ================= */
247
-
248
- // Event unique id.
249
- if ( ! empty( $event['uid'] ) ) {
250
- $this->uid = esc_attr( $event['uid'] );
251
- }
252
-
253
- // iCal ID
254
- if ( ! empty( $event['ical_id'] ) ) {
255
- $this->ical_id = esc_attr( $event['ical_id'] );
256
- }
257
-
258
- // Event source.
259
- if ( ! empty( $event['source'] ) ) {
260
- $this->source = esc_attr( $event['source'] );
261
- }
262
-
263
- // Event parent calendar id.
264
- if ( ! empty( $event['calendar'] ) ) {
265
- $this->calendar = max( intval( $event['calendar'] ), 0 );
266
- }
267
-
268
- // Event parent calendar timezone.
269
- if ( ! empty( $event['timezone'] ) ) {
270
- $this->timezone = esc_attr( $event['timezone'] );
271
- }
272
-
273
- /* ============= *
274
- * Event Content *
275
- * ============= */
276
-
277
- // Event title.
278
- if ( ! empty( $event['title'] ) ) {
279
- $this->title = esc_html( $event['title'] );
280
- }
281
-
282
- // Event description.
283
- if ( ! empty( $event['description'] ) ) {
284
- $this->description = wp_kses_post( $event['description'] );
285
- }
286
-
287
- // Event link URL.
288
- if ( ! empty( $event['link'] ) ) {
289
- $this->link = esc_url_raw( $event['link'] );
290
- }
291
-
292
- // Event visibility.
293
- if ( ! empty( $event['visibility'] ) ) {
294
- $this->visibility = esc_attr( $event['visibility'] );
295
- $this->public = $this->visibility == 'public' ? true : false;
296
- }
297
-
298
- /* =========== *
299
- * Event Start *
300
- * =========== */
301
-
302
- if ( ! empty( $event['start'] ) ) {
303
- $this->start = is_numeric( $event['start'] ) ? intval( $event['start'] ) : 0;
304
- if ( ! empty( $event['start_utc'] ) ) {
305
- $this->start_utc = is_numeric( $event['start_utc'] ) ? intval( $event['start_utc'] ) : 0;
306
- }
307
- if ( ! empty( $event['start_timezone'] ) ) {
308
- $this->start_timezone = esc_attr( $event['start_timezone'] );
309
- }
310
- $this->start_dt = Carbon::createFromTimestamp( $this->start, $this->start_timezone );
311
- $start_location = isset( $event['start_location'] ) ? $event['start_location'] : '';
312
- $this->start_location = $this->esc_location( $start_location );
313
- }
314
-
315
- /* ========= *
316
- * Event End *
317
- * ========= */
318
-
319
- if ( ! empty( $event['end'] ) ) {
320
- $this->end = is_numeric( $event['end'] ) ? intval( $event['end'] ): false;
321
- if ( ! empty( $event['end_utc'] ) ) {
322
- $this->end_utc = is_numeric( $event['end_utc'] ) ? intval( $event['end_utc'] ) : false;
323
- }
324
- if ( ! empty( $event['end_timezone'] ) ) {
325
- $this->end_timezone = esc_attr( $event['end_timezone'] );
326
- }
327
- $this->end_dt = Carbon::createFromTimestamp( $this->end, $this->end_timezone );
328
- $end_location = isset( $event['end_location'] ) ? $event['end_location'] : '';
329
- $this->end_location = $this->esc_location( $end_location );
330
- }
331
-
332
- /* ================== *
333
- * Event Distribution *
334
- * ================== */
335
-
336
- // Whole day event.
337
- if ( ! empty( $event['whole_day'] ) ) {
338
- $this->whole_day = true === $event['whole_day'] ? true: false;
339
- }
340
-
341
- // Multi day event.
342
- if ( ! empty( $event['multiple_days'] ) ) {
343
- $this->multiple_days = max( absint( $event['multiple_days'] ), 1 );
344
- }
345
-
346
- // Event recurrence.
347
- if ( isset( $event['recurrence'] ) ) {
348
- $this->recurrence = ! empty( $event['recurrence'] ) ? $event['recurrence'] : false;
349
- }
350
-
351
- /* ========== *
352
- * Event Meta *
353
- * ========== */
354
-
355
- // Event has venue(s).
356
- if ( $this->start_location['venue'] || $this->end_location['venue'] ) {
357
- $this->venue = true;
358
- }
359
-
360
- // Event meta.
361
- if ( ! empty( $event['meta'] ) ) {
362
- $this->meta = is_array( $event['meta'] ) ? $event['meta'] : array();
363
- }
364
-
365
- // Event template.
366
- if ( ! empty( $event['template'] ) ) {
367
- $this->template = wp_kses_post( $event['template'] );
368
- }
369
-
370
- }
371
-
372
- /**
373
- * Escape location.
374
- *
375
- * @since 3.0.0
376
- * @access private
377
- *
378
- * @param string|array $var
379
- *
380
- * @return array
381
- */
382
- private function esc_location( $var = '' ) {
383
-
384
- $location = array();
385
-
386
- if ( is_string( $var ) ) {
387
- $var = array(
388
- 'name' => $var,
389
- 'address' => $var,
390
- );
391
- } elseif ( is_bool( $var ) || is_null( $var ) ) {
392
- $var = array();
393
- } else {
394
- $var = (array) $var;
395
- }
396
-
397
- $location['name'] = isset( $var['name'] ) ? esc_attr( strip_tags( $var['name'] ) ) : '';
398
- $location['address'] = isset( $var['address'] ) ? esc_attr( strip_tags( $var['address'] ) ) : '';
399
- $location['lat'] = isset( $var['lat'] ) ? $this->esc_coordinate( $var['lat'] ) : 0;
400
- $location['lng'] = isset( $var['lng'] ) ? $this->esc_coordinate( $var['lng'] ) : 0;
401
-
402
- if ( ! empty( $location['name'] ) || ! empty( $location['address'] ) ) {
403
- $location['venue'] = true;
404
- } else {
405
- $location['venue'] = false;
406
- }
407
-
408
- return $location;
409
- }
410
-
411
- /**
412
- * Escape coordinate.
413
- *
414
- * @since 3.0.0
415
- * @access private
416
- *
417
- * @param int|float $latlng
418
- *
419
- * @return int|float
420
- */
421
- private function esc_coordinate( $latlng = 0 ) {
422
- return is_numeric( $latlng ) ? floatval( $latlng ) : 0;
423
- }
424
-
425
- /**
426
- * Set timezone.
427
- *
428
- * @since 3.0.0
429
- * @access private
430
- *
431
- * @param string $tz Timezone.
432
- *
433
- * @return bool
434
- */
435
- public function set_timezone( $tz ) {
436
- if ( in_array( $tz, timezone_identifiers_list() ) ) {
437
- $this->timezone = $tz;
438
- return true;
439
- }
440
- return false;
441
- }
442
-
443
- /**
444
- * Starts or ends today.
445
- *
446
- * @since 3.0.0
447
- *
448
- * @return bool
449
- */
450
- public function is_today() {
451
- return $this->starts_today() || $this->ends_today();
452
- }
453
-
454
- /**
455
- * Starts today.
456
- *
457
- * @since 3.0.0
458
- *
459
- * @return bool
460
- */
461
- public function starts_today() {
462
- return $this->start_dt->setTimezone( $this->timezone )->isToday();
463
- }
464
-
465
- /**
466
- * Ends today.
467
- *
468
- * @since 3.0.0
469
- *
470
- * @return bool
471
- */
472
- public function ends_today() {
473
- return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isToday() : true;
474
- }
475
-
476
- /**
477
- * Starts tomorrow
478
- *
479
- * @since 3.0.0
480
- *
481
- * @return bool
482
- */
483
- public function starts_tomorrow() {
484
- return $this->start_dt->setTimezone( $this->timezone )->isTomorrow();
485
- }
486
-
487
- /**
488
- * Ends tomorrow.
489
- *
490
- * @since 3.0.0
491
- *
492
- * @return bool
493
- */
494
- public function ends_tomorrow() {
495
- return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isTomorrow() : false;
496
- }
497
-
498
- /**
499
- * Started yesterday.
500
- *
501
- * @since 3.0.0
502
- *
503
- * @return bool
504
- */
505
- public function started_yesterday() {
506
- return $this->start_dt->setTimezone( $this->timezone )->isYesterday();
507
- }
508
-
509
- /**
510
- * Ended yesterday.
511
- *
512
- * @since 3.0.0
513
- *
514
- * @return bool
515
- */
516
- public function ended_yesterday() {
517
- return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isYesterday() : false;
518
- }
519
-
520
- /**
521
- * Starts in the future.
522
- *
523
- * @since 3.0.0
524
- *
525
- * @return bool
526
- */
527
- public function starts_future() {
528
- return $this->start_dt->setTimezone( $this->timezone )->isFuture();
529
- }
530
-
531
- /**
532
- * Ends in the future.
533
- *
534
- * @since 3.0.0
535
- *
536
- * @return bool
537
- */
538
- public function ends_future() {
539
- return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isFuture() : false;
540
- }
541
-
542
- /**
543
- * Started in the past.
544
- *
545
- * @since 3.0.0
546
- *
547
- * @return bool
548
- */
549
- public function started_past() {
550
- return $this->start_dt->setTimezone( $this->timezone )->isPast();
551
- }
552
-
553
- /**
554
- * Ended in the past.
555
- *
556
- * @since 3.0.0
557
- *
558
- * @return bool
559
- */
560
- public function ended_past() {
561
- return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isPast() : false;
562
- }
563
-
564
- /**
565
- * Get color.
566
- *
567
- * @since 3.0.0
568
- *
569
- * @param string $default
570
- *
571
- * @return string
572
- */
573
- public function get_color( $default = '' ) {
574
- if ( isset( $this->meta['color'] ) ) {
575
- return ! empty( $this->meta['color'] ) ? esc_attr( $this->meta['color'] ) : $default;
576
- }
577
- return $default;
578
- }
579
-
580
- /**
581
- * Get attachments.
582
- *
583
- * @since 3.0.0
584
- *
585
- * @return array
586
- */
587
- public function get_attachments() {
588
- return isset( $this->meta['attachments'] ) ? $this->meta['attachments'] : array();
589
- }
590
-
591
- /**
592
- * Get attendees.
593
- *
594
- * @since 3.0.0
595
- *
596
- * @return array
597
- */
598
- public function get_attendees() {
599
- return isset( $this->meta['attendees'] ) ? $this->meta['attendees'] : array();
600
- }
601
-
602
- /**
603
- * Get organizer.
604
- *
605
- * @since 3.0.0
606
- *
607
- * @return array
608
- */
609
- public function get_organizer() {
610
- return isset( $this->meta['organizer'] ) ? $this->meta['organizer'] : array();
611
- }
612
-
613
- }
1
+ <?php
2
+ /**
3
+ * Event
4
+ *
5
+ * @package SimpleCalendar/Events
6
+ */
7
+ namespace SimpleCalendar\Events;
8
+
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ /**
16
+ * The Event.
17
+ *
18
+ * @since 3.0.0
19
+ */
20
+ class Event {
21
+
22
+ /**
23
+ * Event type.
24
+ *
25
+ * @access public
26
+ * @var string
27
+ */
28
+ public $type = '';
29
+
30
+ /**
31
+ * Event source.
32
+ *
33
+ * @access public
34
+ * @var string
35
+ */
36
+ public $source = '';
37
+
38
+ /**
39
+ * Event title.
40
+ *
41
+ * @access public
42
+ * @var string
43
+ */
44
+ public $title = '';
45
+
46
+ /**
47
+ * Event description.
48
+ *
49
+ * @access public
50
+ * @var string
51
+ */
52
+ public $description = '';
53
+
54
+ /**
55
+ * Event visibility.
56
+ *
57
+ * @access public
58
+ * @var string
59
+ */
60
+ public $visibility = '';
61
+
62
+ /**
63
+ * Event privacy.
64
+ *
65
+ * @access public
66
+ * @var bool
67
+ */
68
+ public $public = false;
69
+
70
+ /**
71
+ * Event link URL.
72
+ *
73
+ * @access public
74
+ * @var
75
+ */
76
+ public $link = '';
77
+
78
+ /**
79
+ * Event unique identifier.
80
+ *
81
+ * @access public
82
+ * @var string
83
+ */
84
+ public $uid = '';
85
+
86
+ /**
87
+ * Event iCal ID
88
+ */
89
+ public $ical_id = '';
90
+
91
+ /**
92
+ * Event parent calendar id.
93
+ *
94
+ * @access public
95
+ * @var int
96
+ */
97
+ public $calendar = 0;
98
+
99
+ /**
100
+ * Event parent calendar timezone.
101
+ *
102
+ * @access public
103
+ * @var string
104
+ */
105
+ public $timezone = 'UTC';
106
+
107
+ /**
108
+ * Event start time.
109
+ *
110
+ * @access public
111
+ * @var int
112
+ */
113
+ public $start = 0;
114
+
115
+ /**
116
+ * Event start time in GMT.
117
+ *
118
+ * @access public
119
+ * @var int
120
+ */
121
+ public $start_utc = 0;
122
+
123
+ /**
124
+ * Event start datetime object.
125
+ *
126
+ * @access public
127
+ * @var Carbon
128
+ */
129
+ public $start_dt = null;
130
+
131
+ /**
132
+ * Event start time timezone.
133
+ *
134
+ * @access public
135
+ * @var string
136
+ */
137
+ public $start_timezone = 'UTC';
138
+
139
+ /**
140
+ * Event location at event start.
141
+ *
142
+ * @access public
143
+ * @var array
144
+ */
145
+ public $start_location = false;
146
+
147
+ /**
148
+ * Event end time.
149
+ *
150
+ * @access public
151
+ * @var false|int
152
+ */
153
+ public $end = false;
154
+
155
+ /**
156
+ * Event end time in GMT.
157
+ *
158
+ * @access public
159
+ * @var false|int
160
+ */
161
+ public $end_utc = false;
162
+
163
+ /**
164
+ * Event end datetime object.
165
+ *
166
+ * @access public
167
+ * @var null|Carbon
168
+ */
169
+ public $end_dt = null;
170
+
171
+ /**
172
+ * Event end time timezone.
173
+ *
174
+ * @access public
175
+ * @var string
176
+ */
177
+ public $end_timezone = 'UTC';
178
+
179
+ /**
180
+ * Event location at event end.
181
+ *
182
+ * @access public
183
+ * @var array
184
+ */
185
+ public $end_location = false;
186
+
187
+ /**
188
+ * Event has location.
189
+ *
190
+ * @access public
191
+ * @var bool
192
+ */
193
+ public $venue = false;
194
+
195
+ /**
196
+ * Whole day event.
197
+ *
198
+ * @access public
199
+ * @var bool
200
+ */
201
+ public $whole_day = false;
202
+
203
+ /**
204
+ * Multiple days span.
205
+ *
206
+ * @access public
207
+ * @var bool|int
208
+ */
209
+ public $multiple_days = false;
210
+
211
+ /**
212
+ * Recurring event.
213
+ *
214
+ * @access public
215
+ * @var false|array
216
+ */
217
+ public $recurrence = false;
218
+
219
+ /**
220
+ * Event meta.
221
+ *
222
+ * @access public
223
+ * @var array
224
+ */
225
+ public $meta = array();
226
+
227
+ /**
228
+ * Event default template.
229
+ *
230
+ * @access public
231
+ * @var string
232
+ */
233
+ public $template = '';
234
+
235
+ /**
236
+ * Event constructor.
237
+ *
238
+ * @since 3.0.0
239
+ *
240
+ * @param array $event
241
+ */
242
+ public function __construct( array $event ) {
243
+
244
+ /* ================= *
245
+ * Event Identifiers *
246
+ * ================= */
247
+
248
+ // Event unique id.
249
+ if ( ! empty( $event['uid'] ) ) {
250
+ $this->uid = esc_attr( $event['uid'] );
251
+ }
252
+
253
+ // iCal ID
254
+ if ( ! empty( $event['ical_id'] ) ) {
255
+ $this->ical_id = esc_attr( $event['ical_id'] );
256
+ }
257
+
258
+ // Event source.
259
+ if ( ! empty( $event['source'] ) ) {
260
+ $this->source = esc_attr( $event['source'] );
261
+ }
262
+
263
+ // Event parent calendar id.
264
+ if ( ! empty( $event['calendar'] ) ) {
265
+ $this->calendar = max( intval( $event['calendar'] ), 0 );
266
+ }
267
+
268
+ // Event parent calendar timezone.
269
+ if ( ! empty( $event['timezone'] ) ) {
270
+ $this->timezone = esc_attr( $event['timezone'] );
271
+ }
272
+
273
+ /* ============= *
274
+ * Event Content *
275
+ * ============= */
276
+
277
+ // Event title.
278
+ if ( ! empty( $event['title'] ) ) {
279
+ $this->title = esc_html( $event['title'] );
280
+ }
281
+
282
+ // Event description.
283
+ if ( ! empty( $event['description'] ) ) {
284
+ $this->description = wp_kses_post( $event['description'] );
285
+ }
286
+
287
+ // Event link URL.
288
+ if ( ! empty( $event['link'] ) ) {
289
+ $this->link = esc_url_raw( $event['link'] );
290
+ }
291
+
292
+ // Event visibility.
293
+ if ( ! empty( $event['visibility'] ) ) {
294
+ $this->visibility = esc_attr( $event['visibility'] );
295
+ $this->public = $this->visibility == 'public' ? true : false;
296
+ }
297
+
298
+ /* =========== *
299
+ * Event Start *
300
+ * =========== */
301
+
302
+ if ( ! empty( $event['start'] ) ) {
303
+ $this->start = is_numeric( $event['start'] ) ? intval( $event['start'] ) : 0;
304
+ if ( ! empty( $event['start_utc'] ) ) {
305
+ $this->start_utc = is_numeric( $event['start_utc'] ) ? intval( $event['start_utc'] ) : 0;
306
+ }
307
+ if ( ! empty( $event['start_timezone'] ) ) {
308
+ $this->start_timezone = esc_attr( $event['start_timezone'] );
309
+ }
310
+ $this->start_dt = Carbon::createFromTimestamp( $this->start, $this->start_timezone );
311
+ $start_location = isset( $event['start_location'] ) ? $event['start_location'] : '';
312
+ $this->start_location = $this->esc_location( $start_location );
313
+ }
314
+
315
+ /* ========= *
316
+ * Event End *
317
+ * ========= */
318
+
319
+ if ( ! empty( $event['end'] ) ) {
320
+ $this->end = is_numeric( $event['end'] ) ? intval( $event['end'] ): false;
321
+ if ( ! empty( $event['end_utc'] ) ) {
322
+ $this->end_utc = is_numeric( $event['end_utc'] ) ? intval( $event['end_utc'] ) : false;
323
+ }
324
+ if ( ! empty( $event['end_timezone'] ) ) {
325
+ $this->end_timezone = esc_attr( $event['end_timezone'] );
326
+ }
327
+ $this->end_dt = Carbon::createFromTimestamp( $this->end, $this->end_timezone );
328
+ $end_location = isset( $event['end_location'] ) ? $event['end_location'] : '';
329
+ $this->end_location = $this->esc_location( $end_location );
330
+ }
331
+
332
+ /* ================== *
333
+ * Event Distribution *
334
+ * ================== */
335
+
336
+ // Whole day event.
337
+ if ( ! empty( $event['whole_day'] ) ) {
338
+ $this->whole_day = true === $event['whole_day'] ? true: false;
339
+ }
340
+
341
+ // Multi day event.
342
+ if ( ! empty( $event['multiple_days'] ) ) {
343
+ $this->multiple_days = max( absint( $event['multiple_days'] ), 1 );
344
+ }
345
+
346
+ // Event recurrence.
347
+ if ( isset( $event['recurrence'] ) ) {
348
+ $this->recurrence = ! empty( $event['recurrence'] ) ? $event['recurrence'] : false;
349
+ }
350
+
351
+ /* ========== *
352
+ * Event Meta *
353
+ * ========== */
354
+
355
+ // Event has venue(s).
356
+ if ( $this->start_location['venue'] || $this->end_location['venue'] ) {
357
+ $this->venue = true;
358
+ }
359
+
360
+ // Event meta.
361
+ if ( ! empty( $event['meta'] ) ) {
362
+ $this->meta = is_array( $event['meta'] ) ? $event['meta'] : array();
363
+ }
364
+
365
+ // Event template.
366
+ if ( ! empty( $event['template'] ) ) {
367
+ $this->template = wp_kses_post( $event['template'] );
368
+ }
369
+
370
+ }
371
+
372
+ /**
373
+ * Escape location.
374
+ *
375
+ * @since 3.0.0
376
+ * @access private
377
+ *
378
+ * @param string|array $var
379
+ *
380
+ * @return array
381
+ */
382
+ private function esc_location( $var = '' ) {
383
+
384
+ $location = array();
385
+
386
+ if ( is_string( $var ) ) {
387
+ $var = array(
388
+ 'name' => $var,
389
+ 'address' => $var,
390
+ );
391
+ } elseif ( is_bool( $var ) || is_null( $var ) ) {
392
+ $var = array();
393
+ } else {
394
+ $var = (array) $var;
395
+ }
396
+
397
+ $location['name'] = isset( $var['name'] ) ? esc_attr( strip_tags( $var['name'] ) ) : '';
398
+ $location['address'] = isset( $var['address'] ) ? esc_attr( strip_tags( $var['address'] ) ) : '';
399
+ $location['lat'] = isset( $var['lat'] ) ? $this->esc_coordinate( $var['lat'] ) : 0;
400
+ $location['lng'] = isset( $var['lng'] ) ? $this->esc_coordinate( $var['lng'] ) : 0;
401
+
402
+ if ( ! empty( $location['name'] ) || ! empty( $location['address'] ) ) {
403
+ $location['venue'] = true;
404
+ } else {
405
+ $location['venue'] = false;
406
+ }
407
+
408
+ return $location;
409
+ }
410
+
411
+ /**
412
+ * Escape coordinate.
413
+ *
414
+ * @since 3.0.0
415
+ * @access private
416
+ *
417
+ * @param int|float $latlng
418
+ *
419
+ * @return int|float
420
+ */
421
+ private function esc_coordinate( $latlng = 0 ) {
422
+ return is_numeric( $latlng ) ? floatval( $latlng ) : 0;
423
+ }
424
+
425
+ /**
426
+ * Set timezone.
427
+ *
428
+ * @since 3.0.0
429
+ * @access private
430
+ *
431
+ * @param string $tz Timezone.
432
+ *
433
+ * @return bool
434
+ */
435
+ public function set_timezone( $tz ) {
436
+ if ( in_array( $tz, timezone_identifiers_list() ) ) {
437
+ $this->timezone = $tz;
438
+ return true;
439
+ }
440
+ return false;
441
+ }
442
+
443
+ /**
444
+ * Starts or ends today.
445
+ *
446
+ * @since 3.0.0
447
+ *
448
+ * @return bool
449
+ */
450
+ public function is_today() {
451
+ return $this->starts_today() || $this->ends_today();
452
+ }
453
+
454
+ /**
455
+ * Starts today.
456
+ *
457
+ * @since 3.0.0
458
+ *
459
+ * @return bool
460
+ */
461
+ public function starts_today() {
462
+ return $this->start_dt->setTimezone( $this->timezone )->isToday();
463
+ }
464
+
465
+ /**
466
+ * Ends today.
467
+ *
468
+ * @since 3.0.0
469
+ *
470
+ * @return bool
471
+ */
472
+ public function ends_today() {
473
+ return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isToday() : true;
474
+ }
475
+
476
+ /**
477
+ * Starts tomorrow
478
+ *
479
+ * @since 3.0.0
480
+ *
481
+ * @return bool
482
+ */
483
+ public function starts_tomorrow() {
484
+ return $this->start_dt->setTimezone( $this->timezone )->isTomorrow();
485
+ }
486
+
487
+ /**
488
+ * Ends tomorrow.
489
+ *
490
+ * @since 3.0.0
491
+ *
492
+ * @return bool
493
+ */
494
+ public function ends_tomorrow() {
495
+ return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isTomorrow() : false;
496
+ }
497
+
498
+ /**
499
+ * Started yesterday.
500
+ *
501
+ * @since 3.0.0
502
+ *
503
+ * @return bool
504
+ */
505
+ public function started_yesterday() {
506
+ return $this->start_dt->setTimezone( $this->timezone )->isYesterday();
507
+ }
508
+
509
+ /**
510
+ * Ended yesterday.
511
+ *
512
+ * @since 3.0.0
513
+ *
514
+ * @return bool
515
+ */
516
+ public function ended_yesterday() {
517
+ return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isYesterday() : false;
518
+ }
519
+
520
+ /**
521
+ * Starts in the future.
522
+ *
523
+ * @since 3.0.0
524
+ *
525
+ * @return bool
526
+ */
527
+ public function starts_future() {
528
+ return $this->start_dt->setTimezone( $this->timezone )->isFuture();
529
+ }
530
+
531
+ /**
532
+ * Ends in the future.
533
+ *
534
+ * @since 3.0.0
535
+ *
536
+ * @return bool
537
+ */
538
+ public function ends_future() {
539
+ return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isFuture() : false;
540
+ }
541
+
542
+ /**
543
+ * Started in the past.
544
+ *
545
+ * @since 3.0.0
546
+ *
547
+ * @return bool
548
+ */
549
+ public function started_past() {
550
+ return $this->start_dt->setTimezone( $this->timezone )->isPast();
551
+ }
552
+
553
+ /**
554
+ * Ended in the past.
555
+ *
556
+ * @since 3.0.0
557
+ *
558
+ * @return bool
559
+ */
560
+ public function ended_past() {
561
+ return ! is_null( $this->end_dt ) ? $this->end_dt->setTimezone( $this->timezone )->isPast() : false;
562
+ }
563
+
564
+ /**
565
+ * Get color.
566
+ *
567
+ * @since 3.0.0
568
+ *
569
+ * @param string $default
570
+ *
571
+ * @return string
572
+ */
573
+ public function get_color( $default = '' ) {
574
+ if ( isset( $this->meta['color'] ) ) {
575
+ return ! empty( $this->meta['color'] ) ? esc_attr( $this->meta['color'] ) : $default;
576
+ }
577
+ return $default;
578
+ }
579
+
580
+ /**
581
+ * Get attachments.
582
+ *
583
+ * @since 3.0.0
584
+ *
585
+ * @return array
586
+ */
587
+ public function get_attachments() {
588
+ return isset( $this->meta['attachments'] ) ? $this->meta['attachments'] : array();
589
+ }
590
+
591
+ /**
592
+ * Get attendees.
593
+ *
594
+ * @since 3.0.0
595
+ *
596
+ * @return array
597
+ */
598
+ public function get_attendees() {
599
+ return isset( $this->meta['attendees'] ) ? $this->meta['attendees'] : array();
600
+ }
601
+
602
+ /**
603
+ * Get organizer.
604
+ *
605
+ * @since 3.0.0
606
+ *
607
+ * @return array
608
+ */
609
+ public function get_organizer() {
610
+ return isset( $this->meta['organizer'] ) ? $this->meta['organizer'] : array();
611
+ }
612
+
613
+ }
includes/events/events.php CHANGED
@@ -1,605 +1,608 @@
1
- <?php
2
- /**
3
- * Events Collection
4
- *
5
- * @package SimpleCalendar/Events
6
- */
7
- namespace SimpleCalendar\Events;
8
-
9
- use Carbon\Carbon;
10
-
11
- if ( ! defined( 'ABSPATH' ) ) {
12
- exit;
13
- }
14
-
15
- /**
16
- * The Events.
17
- *
18
- * A collection of Event objects.
19
- *
20
- * @since 3.0.0
21
- */
22
- class Events {
23
-
24
- /**
25
- * Events.
26
- *
27
- * @access public
28
- * @var array
29
- */
30
- protected $events = array();
31
-
32
- /**
33
- * Timezone.
34
- *
35
- * @access public
36
- * @var string
37
- */
38
- protected $timezone = 'UTC';
39
-
40
- /**
41
- * Constructor.
42
- *
43
- * @since 3.0.0
44
- *
45
- * @param array $e Events.
46
- * @param string|\DateTimeZone $tz Timezone.
47
- */
48
- public function __construct( $e = array(), $tz = 'UTC' ) {
49
- $this->set_events( $e );
50
- $this->set_timezone( $tz );
51
- }
52
-
53
- /**
54
- * Get events.
55
- *
56
- * @since 3.0.0
57
- *
58
- * @param string|int $n Amount of events (optional).
59
- *
60
- * @return array
61
- */
62
- public function get_events( $n = '' ) {
63
- if ( ! empty( $n ) && ! empty( $this->events ) ) {
64
- $length = absint( $n );
65
- return array_slice( $this->events, 0, $length, true );
66
- }
67
- return $this->events;
68
- }
69
-
70
- /**
71
- * Set events.
72
- *
73
- * @since 3.0.0
74
- *
75
- * @param array $ev Events.
76
- */
77
- public function set_events( array $ev ) {
78
- $this->events = $ev;
79
- }
80
-
81
- /**
82
- * Set timezone.
83
- *
84
- * @since 3.0.0
85
- *
86
- * @param string|\DateTimeZone $tz Timezone.
87
- *
88
- * @return Events
89
- */
90
- public function set_timezone( $tz ) {
91
- if ( $tz instanceof \DateTimeZone ) {
92
- $tz = $tz->getName();
93
- }
94
- $this->timezone = simcal_esc_timezone( $tz, $this->timezone );
95
- return $this;
96
- }
97
-
98
- /**
99
- * Shift events.
100
- *
101
- * @since 3.0.0
102
- *
103
- * @param int $n
104
- *
105
- * @return Events
106
- */
107
- public function shift( $n ) {
108
- if ( ! empty( $this->events ) ) {
109
- $offset = intval( $n );
110
- $length = count( $this->events );
111
- $this->set_events( array_slice( $this->events, $offset, $length, true ) );
112
- }
113
- return $this;
114
- }
115
-
116
- /**
117
- * Filter private events.
118
- *
119
- * @since 3.0.0
120
- *
121
- * @return Events
122
- */
123
- public function private_only() {
124
- $this->set_events( $this->filter_property( 'public', 'hide' ) );
125
- return $this;
126
- }
127
-
128
- /**
129
- * Filter public events.
130
- *
131
- * @since 3.0.0
132
- *
133
- * @return Events
134
- */
135
- public function public_only() {
136
- $this->set_events( $this->filter_property( 'public', 'show' ) );
137
- return $this;
138
- }
139
-
140
- /**
141
- * Filter recurring events in the current block.
142
- *
143
- * @since 3.0.0
144
- *
145
- * @return Events
146
- */
147
- public function recurring() {
148
- $this->set_events( $this->filter_property( 'recurrence', 'show' ) );
149
- return $this;
150
- }
151
-
152
- /**
153
- * Filter non recurring events in the current block.
154
- *
155
- * @since 3.0.0
156
- *
157
- * @return Events
158
- */
159
- public function not_recurring() {
160
- $this->set_events( $this->filter_property( 'recurrence', 'hide' ) );
161
- return $this;
162
- }
163
-
164
- /**
165
- * Filter whole day events in the current block.
166
- *
167
- * @since 3.0.0
168
- *
169
- * @return Events
170
- */
171
- public function whole_day() {
172
- $this->set_events( $this->filter_property( 'whole_day', 'show' ) );
173
- return $this;
174
- }
175
-
176
- /**
177
- * Filter non whole day in the current block.
178
- *
179
- * @since 3.0.0
180
- *
181
- * @return Events
182
- */
183
- public function not_whole_day() {
184
- $this->set_events( $this->filter_property( 'whole_day', 'hide' ) );
185
- return $this;
186
- }
187
-
188
- /**
189
- * Filter events spanning multiple days in the current block.
190
- *
191
- * @since 3.0.0
192
- *
193
- * @return Events
194
- */
195
- public function multi_day() {
196
- $this->set_events( $this->filter_property( 'multiple_days', 'show' ) );
197
- return $this;
198
- }
199
-
200
- /**
201
- * Filter events that do not span multiple days in the current block.
202
- *
203
- * @since 3.0.0
204
- *
205
- * @return Events
206
- */
207
- public function single_day() {
208
- $this->set_events( $this->filter_property( 'multiple_days', 'hide' ) );
209
- return $this;
210
- }
211
-
212
- /**
213
- * Filter events in the current block that have a location.
214
- *
215
- * @since 3.0.0
216
- *
217
- * @return Events
218
- */
219
- public function with_location() {
220
- $this->set_events( $this->filter_property( 'venue', 'show' ) );
221
- return $this;
222
- }
223
-
224
- /**
225
- * Filter events in the current block that do not have a location.
226
- *
227
- * @since 3.0.0
228
- *
229
- * @return Events
230
- */
231
- public function without_location() {
232
- $this->set_events( $this->filter_property( 'venue', 'hide' ) );
233
- return $this;
234
- }
235
-
236
- /**
237
- * Filter whole day events.
238
- *
239
- * @since 3.0.0
240
- * @access private
241
- *
242
- * @param string $property
243
- * @param string $toggle
244
- *
245
- * @return array
246
- */
247
- private function filter_property( $property, $toggle ) {
248
- $filtered = array();
249
- if ( ! empty( $this->events ) ) {
250
- foreach ( $this->events as $ts => $events ) {
251
- foreach ( $events as $event ) {
252
- if ( 'hide' == $toggle ) {
253
- if ( ! $event->$property ) {
254
- $filtered[ $ts ][] = $event;
255
- }
256
- } elseif ( 'show' == $toggle ) {
257
- if ( $event->$property ) {
258
- $filtered[ $ts ][] = $event;
259
- }
260
- }
261
- }
262
- }
263
- }
264
- return $filtered;
265
- }
266
-
267
- /**
268
- * Filter events in the past.
269
- *
270
- * @since 3.0.0
271
- *
272
- * @param int|string $present
273
- *
274
- * @return Events
275
- */
276
- public function future( $present = '' ) {
277
- $last = $this->get_last();
278
- $to = $last instanceof Event ? $last->start_utc : false;
279
- if ( $to ) {
280
- if ( empty( $present ) ) {
281
- $present = Carbon::now( $this->timezone )->getTimestamp();
282
- }
283
- $this->set_events( $this->filter_events( intval( $present ), $to ) );
284
- }
285
- return $this;
286
- }
287
-
288
- /**
289
- * Filter events in the future.
290
- *
291
- * @since 3.0.0
292
- *
293
- * @param int|string $present
294
- *
295
- * @return Events
296
- */
297
- public function past( $present = '' ) {
298
- $first = $this->get_last();
299
- $from = $first instanceof Event ? $first->start_utc : false;
300
- if ( $from ) {
301
- if ( empty( $present ) ) {
302
- $present = Carbon::now( $this->timezone )->getTimestamp();
303
- }
304
- $this->set_events( $this->filter_events( $from, intval( $present ) ) );
305
- }
306
- return $this;
307
- }
308
-
309
- /**
310
- * Filter events after time.
311
- *
312
- * @since 3.0.0
313
- *
314
- * @param int|string|\DateTime|Carbon $time
315
- *
316
- * @return Events
317
- */
318
- public function after( $time ) {
319
- $dt = $this->parse( $time );
320
- return ! is_null( $dt ) ? $this->future( $dt->getTimestamp() ) : $this;
321
- }
322
-
323
- /**
324
- * Filter events before time.
325
- *
326
- * @since 3.0.0
327
- *
328
- * @param int|string|\DateTime|Carbon $time
329
- *
330
- * @return Events
331
- */
332
- public function before( $time ) {
333
- $dt = $this->parse( $time );
334
- return ! is_null( $dt ) ? $this->past( $dt->getTimestamp() ) : $this;
335
- }
336
-
337
- /**
338
- * Filter events from a certain time onwards.
339
- *
340
- * @since 3.0.0
341
- *
342
- * @param int|string|\DateTime|Carbon $time
343
- *
344
- * @return Events
345
- */
346
- public function from( $time ) {
347
- $last = $this->parse( $time );
348
- if ( ! is_null( $last ) ) {
349
- $this->set_events( $this->filter_events( $time, $last->getTimestamp() ) );
350
- }
351
- return $this;
352
- }
353
-
354
- /**
355
- * Filter events up to to a certain time.
356
- *
357
- * @since 3.0.0
358
- *
359
- * @param int|string|\DateTime|Carbon $time
360
- *
361
- * @return Events
362
- */
363
- public function to( $time ) {
364
- $first = $this->parse( $time );
365
- if ( ! is_null( $first ) ) {
366
- $this->set_events( $this->filter_events( $first->getTimestamp(), $time ) );
367
- }
368
- return $this;
369
- }
370
-
371
- /**
372
- * Parse time.
373
- *
374
- * @since 3.0.0
375
- *
376
- * @param int|string|\DateTime|Carbon $time
377
- *
378
- * @return null|Carbon
379
- */
380
- private function parse( $time ) {
381
- if ( is_int( $time ) ) {
382
- return Carbon::createFromTimestamp( $time, $this->timezone );
383
- } elseif ( is_string( $time ) && ! empty( $time ) ) {
384
- return Carbon::parse( $time, $this->timezone );
385
- } elseif ( $time instanceof Carbon ) {
386
- return $time->setTimezone( $this->timezone );
387
- } elseif ( $time instanceof \DateTime ) {
388
- return Carbon::instance( $time )->setTimezone( $this->timezone );
389
- }
390
- return null;
391
- }
392
-
393
- /**
394
- * Get first event of the current block.
395
- *
396
- * @since 3.0.0
397
- *
398
- * @return null|Event
399
- */
400
- public function get_first() {
401
- return array_shift( $this->events );
402
- }
403
-
404
- /**
405
- * Get last event of the current block.
406
- *
407
- * @since 3.0.0
408
- *
409
- * @return null|Event
410
- */
411
- public function get_last() {
412
- return array_pop( $this->events );
413
- }
414
-
415
- /**
416
- * Get the closest event in the future.
417
- *
418
- * @since 3.0.0
419
- *
420
- * @return null|Event
421
- */
422
- public function get_upcoming() {
423
- return $this->get_closest( 'future' );
424
- }
425
-
426
- /**
427
- * Get the closest event in the past.
428
- *
429
- * @since 3.0.0
430
- *
431
- * @return null|Event
432
- */
433
- public function get_latest() {
434
- return $this->get_closest( 'past' );
435
- }
436
-
437
- /**
438
- * Get the closest event compared to now.
439
- *
440
- * @since 3.0.0
441
- * @access private
442
- *
443
- * @param string $dir Direction: 'future' or 'past'.
444
- *
445
- * @return null|Event
446
- */
447
- private function get_closest( $dir ) {
448
- if ( 'future' == $dir ) {
449
- return array_shift( $this->future()->get_events() );
450
- } elseif ( 'past' == $dir ) {
451
- return array_shift( $this->past()->get_events() );
452
- }
453
- return null;
454
- }
455
-
456
- /**
457
- * Get events for the given year.
458
- *
459
- * @since 3.0.0
460
- *
461
- * @param int $year Year.
462
- *
463
- * @return array Multidimensional array with month number, week number and Event objects for each weekday.
464
- */
465
- public function get_year( $year ) {
466
- $y = intval( $year );
467
- $months = array();
468
- for ( $m = 1; $m <= 12; $m++ ) {
469
- $months[ strval( $m ) ] = $this->get_month( $y, $m );
470
- }
471
- return $months;
472
- }
473
-
474
- /**
475
- * Get events for the given month in the given year.
476
- *
477
- * @since 3.0.0
478
- *
479
- * @param int $year Year.
480
- * @param int $month Month number.
481
- *
482
- * @return array Multidimensional array with week number, day of the week and array of Event objects for each week day.
483
- */
484
- public function get_month( $year, $month ) {
485
- $y = intval( $year );
486
- $m = min( max( 1, absint( $month ) ), 12 );
487
- $days = Carbon::createFromDate( $y, $m, 2, $this->timezone )->startOfMonth()->daysInMonth;
488
- $weeks = array();
489
- for ( $d = 1; $d < $days; $d++ ) {
490
- $current = Carbon::createFromDate( $y, $m, $d );
491
- $week = $current->weekOfYear;
492
- $day = $current->dayOfWeek;
493
- $weeks[ strval( $week ) ][ strval( $day ) ] = $this->get_day( $y, $m, $d );
494
- }
495
- return $weeks;
496
- }
497
-
498
- /**
499
- * Get events for the given week in the given year.
500
- *
501
- * @since 3.0.0
502
- *
503
- * @param int $year Year.
504
- * @param int $week Week number.
505
- *
506
- * @return array Associative array with day of the week for key and array of Event objects for value.
507
- */
508
- public function get_week( $year, $week ) {
509
- $y = intval( $year );
510
- $w = absint( $week );
511
- $m = date( 'n', strtotime( strval( $y ) . '-W' . strval( $w ) ) );
512
- $month_dt = Carbon::createFromDate( $y, $m, 2, $this->timezone );
513
- $days = array();
514
- for ( $d = 1; $d < $month_dt->daysInMonth; $d++ ) {
515
- $current = Carbon::createFromDate( $y, $m, $d );
516
- if ( $w == $current->weekOfYear ) {
517
- $days[ strval( $current->dayOfWeek ) ] = $this->get_day( $y, $m, $d );
518
- }
519
- }
520
- return $days;
521
- }
522
-
523
- /**
524
- * Get events for the given day of the given month in the given year.
525
- *
526
- * @since 3.0.0
527
- *
528
- * @param int $year Year.
529
- * @param int $month Month number.
530
- * @param int $day Day of the month number.
531
- *
532
- * @return array Event objects for the day.
533
- */
534
- public function get_day( $year, $month, $day ) {
535
- $y = intval( $year );
536
- $m = min( max( 1, absint( $month ) ), 12 );
537
- $d = min( absint( $day ), 31 );
538
- $from = Carbon::createFromDate( $y, $m, $d, $this->timezone )->startOfDay()->getTimestamp();
539
- $to = Carbon::createFromDate( $y, $m, $d, $this->timezone )->endOfDay()->getTimestamp();
540
- return $this->filter_events( $from, $to );
541
- }
542
-
543
- /**
544
- * Get events for today.
545
- *
546
- * @since 3.0.0
547
- *
548
- * @return array Event objects for today.
549
- */
550
- public function get_today() {
551
- $start = Carbon::today( $this->timezone )->startOfDay()->getTimestamp();
552
- $end = Carbon::today( $this->timezone )->endOfDay()->getTimestamp();
553
- return $this->filter_events( $start, $end );
554
- }
555
-
556
- /**
557
- * Get events for tomorrow.
558
- *
559
- * @since 3.0.0
560
- *
561
- * @return array Event objects for tomorrow.
562
- */
563
- public function get_tomorrow() {
564
- $start = Carbon::tomorrow( $this->timezone )->startOfDay()->getTimestamp();
565
- $end = Carbon::tomorrow( $this->timezone )->endOfDay()->getTimestamp();
566
- return $this->filter_events( $start, $end );
567
- }
568
-
569
- /**
570
- * Get events for yesterday.
571
- *
572
- * @since 3.0.0
573
- *
574
- * @return array Event objects for yesterday.
575
- */
576
- public function get_yesterday() {
577
- $start = Carbon::yesterday( $this->timezone )->startOfDay()->getTimestamp();
578
- $end = Carbon::yesterday( $this->timezone )->endOfDay()->getTimestamp();
579
- return $this->filter_events( $start, $end );
580
- }
581
-
582
- /**
583
- * Filter events by timestamps.
584
- *
585
- * @since 3.0.0
586
- * @access private
587
- *
588
- * @param int $from Lower bound timestamp.
589
- * @param int $to Upper bound timestamp.
590
- *
591
- * @return array Filtered array of Event objects.
592
- */
593
- private function filter_events( $from, $to ) {
594
- $timestamps = array_keys( $this->events );
595
- $lower_bound = array_filter( $timestamps, function( $ts ) use( $from ) {
596
- return intval( $ts ) > intval( $from );
597
- } );
598
- $higher_bound = array_filter( $lower_bound, function( $ts ) use( $to ) {
599
- return intval( $ts ) > intval( $to );
600
- } );
601
- $filtered = array_combine( $higher_bound, $higher_bound );
602
- return array_intersect_key( $this->events, $filtered );
603
- }
604
-
605
- }
 
 
 
1
+ <?php
2
+ /**
3
+ * Events Collection
4
+ *
5
+ * @package SimpleCalendar/Events
6
+ */
7
+ namespace SimpleCalendar\Events;
8
+
9
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
10
+ use SimpleCalendar\plugin_deps\DateTime;
11
+ use SimpleCalendar\plugin_deps\DateTimeZone;
12
+
13
+
14
+ if ( ! defined( 'ABSPATH' ) ) {
15
+ exit;
16
+ }
17
+
18
+ /**
19
+ * The Events.
20
+ *
21
+ * A collection of Event objects.
22
+ *
23
+ * @since 3.0.0
24
+ */
25
+ class Events {
26
+
27
+ /**
28
+ * Events.
29
+ *
30
+ * @access public
31
+ * @var array
32
+ */
33
+ protected $events = array();
34
+
35
+ /**
36
+ * Timezone.
37
+ *
38
+ * @access public
39
+ * @var string
40
+ */
41
+ protected $timezone = 'UTC';
42
+
43
+ /**
44
+ * Constructor.
45
+ *
46
+ * @since 3.0.0
47
+ *
48
+ * @param array $e Events.
49
+ * @param string|\DateTimeZone $tz Timezone.
50
+ */
51
+ public function __construct( $e = array(), $tz = 'UTC' ) {
52
+ $this->set_events( $e );
53
+ $this->set_timezone( $tz );
54
+ }
55
+
56
+ /**
57
+ * Get events.
58
+ *
59
+ * @since 3.0.0
60
+ *
61
+ * @param string|int $n Amount of events (optional).
62
+ *
63
+ * @return array
64
+ */
65
+ public function get_events( $n = '' ) {
66
+ if ( ! empty( $n ) && ! empty( $this->events ) ) {
67
+ $length = absint( $n );
68
+ return array_slice( $this->events, 0, $length, true );
69
+ }
70
+ return $this->events;
71
+ }
72
+
73
+ /**
74
+ * Set events.
75
+ *
76
+ * @since 3.0.0
77
+ *
78
+ * @param array $ev Events.
79
+ */
80
+ public function set_events( array $ev ) {
81
+ $this->events = $ev;
82
+ }
83
+
84
+ /**
85
+ * Set timezone.
86
+ *
87
+ * @since 3.0.0
88
+ *
89
+ * @param string|\DateTimeZone $tz Timezone.
90
+ *
91
+ * @return Events
92
+ */
93
+ public function set_timezone( $tz ) {
94
+ if ( $tz instanceof DateTimeZone ) {
95
+ $tz = $tz->getName();
96
+ }
97
+ $this->timezone = simcal_esc_timezone( $tz, $this->timezone );
98
+ return $this;
99
+ }
100
+
101
+ /**
102
+ * Shift events.
103
+ *
104
+ * @since 3.0.0
105
+ *
106
+ * @param int $n
107
+ *
108
+ * @return Events
109
+ */
110
+ public function shift( $n ) {
111
+ if ( ! empty( $this->events ) ) {
112
+ $offset = intval( $n );
113
+ $length = count( $this->events );
114
+ $this->set_events( array_slice( $this->events, $offset, $length, true ) );
115
+ }
116
+ return $this;
117
+ }
118
+
119
+ /**
120
+ * Filter private events.
121
+ *
122
+ * @since 3.0.0
123
+ *
124
+ * @return Events
125
+ */
126
+ public function private_only() {
127
+ $this->set_events( $this->filter_property( 'public', 'hide' ) );
128
+ return $this;
129
+ }
130
+
131
+ /**
132
+ * Filter public events.
133
+ *
134
+ * @since 3.0.0
135
+ *
136
+ * @return Events
137
+ */
138
+ public function public_only() {
139
+ $this->set_events( $this->filter_property( 'public', 'show' ) );
140
+ return $this;
141
+ }
142
+
143
+ /**
144
+ * Filter recurring events in the current block.
145
+ *
146
+ * @since 3.0.0
147
+ *
148
+ * @return Events
149
+ */
150
+ public function recurring() {
151
+ $this->set_events( $this->filter_property( 'recurrence', 'show' ) );
152
+ return $this;
153
+ }
154
+
155
+ /**
156
+ * Filter non recurring events in the current block.
157
+ *
158
+ * @since 3.0.0
159
+ *
160
+ * @return Events
161
+ */
162
+ public function not_recurring() {
163
+ $this->set_events( $this->filter_property( 'recurrence', 'hide' ) );
164
+ return $this;
165
+ }
166
+
167
+ /**
168
+ * Filter whole day events in the current block.
169
+ *
170
+ * @since 3.0.0
171
+ *
172
+ * @return Events
173
+ */
174
+ public function whole_day() {
175
+ $this->set_events( $this->filter_property( 'whole_day', 'show' ) );
176
+ return $this;
177
+ }
178
+
179
+ /**
180
+ * Filter non whole day in the current block.
181
+ *
182
+ * @since 3.0.0
183
+ *
184
+ * @return Events
185
+ */
186
+ public function not_whole_day() {
187
+ $this->set_events( $this->filter_property( 'whole_day', 'hide' ) );
188
+ return $this;
189
+ }
190
+
191
+ /**
192
+ * Filter events spanning multiple days in the current block.
193
+ *
194
+ * @since 3.0.0
195
+ *
196
+ * @return Events
197
+ */
198
+ public function multi_day() {
199
+ $this->set_events( $this->filter_property( 'multiple_days', 'show' ) );
200
+ return $this;
201
+ }
202
+
203
+ /**
204
+ * Filter events that do not span multiple days in the current block.
205
+ *
206
+ * @since 3.0.0
207
+ *
208
+ * @return Events
209
+ */
210
+ public function single_day() {
211
+ $this->set_events( $this->filter_property( 'multiple_days', 'hide' ) );
212
+ return $this;
213
+ }
214
+
215
+ /**
216
+ * Filter events in the current block that have a location.
217
+ *
218
+ * @since 3.0.0
219
+ *
220
+ * @return Events
221
+ */
222
+ public function with_location() {
223
+ $this->set_events( $this->filter_property( 'venue', 'show' ) );
224
+ return $this;
225
+ }
226
+
227
+ /**
228
+ * Filter events in the current block that do not have a location.
229
+ *
230
+ * @since 3.0.0
231
+ *
232
+ * @return Events
233
+ */
234
+ public function without_location() {
235
+ $this->set_events( $this->filter_property( 'venue', 'hide' ) );
236
+ return $this;
237
+ }
238
+
239
+ /**
240
+ * Filter whole day events.
241
+ *
242
+ * @since 3.0.0
243
+ * @access private
244
+ *
245
+ * @param string $property
246
+ * @param string $toggle
247
+ *
248
+ * @return array
249
+ */
250
+ private function filter_property( $property, $toggle ) {
251
+ $filtered = array();
252
+ if ( ! empty( $this->events ) ) {
253
+ foreach ( $this->events as $ts => $events ) {
254
+ foreach ( $events as $event ) {
255
+ if ( 'hide' == $toggle ) {
256
+ if ( ! $event->$property ) {
257
+ $filtered[ $ts ][] = $event;
258
+ }
259
+ } elseif ( 'show' == $toggle ) {
260
+ if ( $event->$property ) {
261
+ $filtered[ $ts ][] = $event;
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ return $filtered;
268
+ }
269
+
270
+ /**
271
+ * Filter events in the past.
272
+ *
273
+ * @since 3.0.0
274
+ *
275
+ * @param int|string $present
276
+ *
277
+ * @return Events
278
+ */
279
+ public function future( $present = '' ) {
280
+ $last = $this->get_last();
281
+ $to = $last instanceof Event ? $last->start_utc : false;
282
+ if ( $to ) {
283
+ if ( empty( $present ) ) {
284
+ $present = Carbon::now( $this->timezone )->getTimestamp();
285
+ }
286
+ $this->set_events( $this->filter_events( intval( $present ), $to ) );
287
+ }
288
+ return $this;
289
+ }
290
+
291
+ /**
292
+ * Filter events in the future.
293
+ *
294
+ * @since 3.0.0
295
+ *
296
+ * @param int|string $present
297
+ *
298
+ * @return Events
299
+ */
300
+ public function past( $present = '' ) {
301
+ $first = $this->get_last();
302
+ $from = $first instanceof Event ? $first->start_utc : false;
303
+ if ( $from ) {
304
+ if ( empty( $present ) ) {
305
+ $present = Carbon::now( $this->timezone )->getTimestamp();
306
+ }
307
+ $this->set_events( $this->filter_events( $from, intval( $present ) ) );
308
+ }
309
+ return $this;
310
+ }
311
+
312
+ /**
313
+ * Filter events after time.
314
+ *
315
+ * @since 3.0.0
316
+ *
317
+ * @param int|string|\DateTime|Carbon $time
318
+ *
319
+ * @return Events
320
+ */
321
+ public function after( $time ) {
322
+ $dt = $this->parse( $time );
323
+ return ! is_null( $dt ) ? $this->future( $dt->getTimestamp() ) : $this;
324
+ }
325
+
326
+ /**
327
+ * Filter events before time.
328
+ *
329
+ * @since 3.0.0
330
+ *
331
+ * @param int|string|\DateTime|Carbon $time
332
+ *
333
+ * @return Events
334
+ */
335
+ public function before( $time ) {
336
+ $dt = $this->parse( $time );
337
+ return ! is_null( $dt ) ? $this->past( $dt->getTimestamp() ) : $this;
338
+ }
339
+
340
+ /**
341
+ * Filter events from a certain time onwards.
342
+ *
343
+ * @since 3.0.0
344
+ *
345
+ * @param int|string|\DateTime|Carbon $time
346
+ *
347
+ * @return Events
348
+ */
349
+ public function from( $time ) {
350
+ $last = $this->parse( $time );
351
+ if ( ! is_null( $last ) ) {
352
+ $this->set_events( $this->filter_events( $time, $last->getTimestamp() ) );
353
+ }
354
+ return $this;
355
+ }
356
+
357
+ /**
358
+ * Filter events up to to a certain time.
359
+ *
360
+ * @since 3.0.0
361
+ *
362
+ * @param int|string|\DateTime|Carbon $time
363
+ *
364
+ * @return Events
365
+ */
366
+ public function to( $time ) {
367
+ $first = $this->parse( $time );
368
+ if ( ! is_null( $first ) ) {
369
+ $this->set_events( $this->filter_events( $first->getTimestamp(), $time ) );
370
+ }
371
+ return $this;
372
+ }
373
+
374
+ /**
375
+ * Parse time.
376
+ *
377
+ * @since 3.0.0
378
+ *
379
+ * @param int|string|\DateTime|Carbon $time
380
+ *
381
+ * @return null|Carbon
382
+ */
383
+ private function parse( $time ) {
384
+ if ( is_int( $time ) ) {
385
+ return Carbon::createFromTimestamp( $time, $this->timezone );
386
+ } elseif ( is_string( $time ) && ! empty( $time ) ) {
387
+ return Carbon::parse( $time, $this->timezone );
388
+ } elseif ( $time instanceof Carbon ) {
389
+ return $time->setTimezone( $this->timezone );
390
+ } elseif ( $time instanceof DateTime ) {
391
+ return Carbon::instance( $time )->setTimezone( $this->timezone );
392
+ }
393
+ return null;
394
+ }
395
+
396
+ /**
397
+ * Get first event of the current block.
398
+ *
399
+ * @since 3.0.0
400
+ *
401
+ * @return null|Event
402
+ */
403
+ public function get_first() {
404
+ return array_shift( $this->events );
405
+ }
406
+
407
+ /**
408
+ * Get last event of the current block.
409
+ *
410
+ * @since 3.0.0
411
+ *
412
+ * @return null|Event
413
+ */
414
+ public function get_last() {
415
+ return array_pop( $this->events );
416
+ }
417
+
418
+ /**
419
+ * Get the closest event in the future.
420
+ *
421
+ * @since 3.0.0
422
+ *
423
+ * @return null|Event
424
+ */
425
+ public function get_upcoming() {
426
+ return $this->get_closest( 'future' );
427
+ }
428
+
429
+ /**
430
+ * Get the closest event in the past.
431
+ *
432
+ * @since 3.0.0
433
+ *
434
+ * @return null|Event
435
+ */
436
+ public function get_latest() {
437
+ return $this->get_closest( 'past' );
438
+ }
439
+
440
+ /**
441
+ * Get the closest event compared to now.
442
+ *
443
+ * @since 3.0.0
444
+ * @access private
445
+ *
446
+ * @param string $dir Direction: 'future' or 'past'.
447
+ *
448
+ * @return null|Event
449
+ */
450
+ private function get_closest( $dir ) {
451
+ if ( 'future' == $dir ) {
452
+ return array_shift( $this->future()->get_events() );
453
+ } elseif ( 'past' == $dir ) {
454
+ return array_shift( $this->past()->get_events() );
455
+ }
456
+ return null;
457
+ }
458
+
459
+ /**
460
+ * Get events for the given year.
461
+ *
462
+ * @since 3.0.0
463
+ *
464
+ * @param int $year Year.
465
+ *
466
+ * @return array Multidimensional array with month number, week number and Event objects for each weekday.
467
+ */
468
+ public function get_year( $year ) {
469
+ $y = intval( $year );
470
+ $months = array();
471
+ for ( $m = 1; $m <= 12; $m++ ) {
472
+ $months[ strval( $m ) ] = $this->get_month( $y, $m );
473
+ }
474
+ return $months;
475
+ }
476
+
477
+ /**
478
+ * Get events for the given month in the given year.
479
+ *
480
+ * @since 3.0.0
481
+ *
482
+ * @param int $year Year.
483
+ * @param int $month Month number.
484
+ *
485
+ * @return array Multidimensional array with week number, day of the week and array of Event objects for each week day.
486
+ */
487
+ public function get_month( $year, $month ) {
488
+ $y = intval( $year );
489
+ $m = min( max( 1, absint( $month ) ), 12 );
490
+ $days = Carbon::createFromDate( $y, $m, 2, $this->timezone )->startOfMonth()->daysInMonth;
491
+ $weeks = array();
492
+ for ( $d = 1; $d < $days; $d++ ) {
493
+ $current = Carbon::createFromDate( $y, $m, $d );
494
+ $week = $current->weekOfYear;
495
+ $day = $current->dayOfWeek;
496
+ $weeks[ strval( $week ) ][ strval( $day ) ] = $this->get_day( $y, $m, $d );
497
+ }
498
+ return $weeks;
499
+ }
500
+
501
+ /**
502
+ * Get events for the given week in the given year.
503
+ *
504
+ * @since 3.0.0
505
+ *
506
+ * @param int $year Year.
507
+ * @param int $week Week number.
508
+ *
509
+ * @return array Associative array with day of the week for key and array of Event objects for value.
510
+ */
511
+ public function get_week( $year, $week ) {
512
+ $y = intval( $year );
513
+ $w = absint( $week );
514
+ $m = date( 'n', strtotime( strval( $y ) . '-W' . strval( $w ) ) );
515
+ $month_dt = Carbon::createFromDate( $y, $m, 2, $this->timezone );
516
+ $days = array();
517
+ for ( $d = 1; $d < $month_dt->daysInMonth; $d++ ) {
518
+ $current = Carbon::createFromDate( $y, $m, $d );
519
+ if ( $w == $current->weekOfYear ) {
520
+ $days[ strval( $current->dayOfWeek ) ] = $this->get_day( $y, $m, $d );
521
+ }
522
+ }
523
+ return $days;
524
+ }
525
+
526
+ /**
527
+ * Get events for the given day of the given month in the given year.
528
+ *
529
+ * @since 3.0.0
530
+ *
531
+ * @param int $year Year.
532
+ * @param int $month Month number.
533
+ * @param int $day Day of the month number.
534
+ *
535
+ * @return array Event objects for the day.
536
+ */
537
+ public function get_day( $year, $month, $day ) {
538
+ $y = intval( $year );
539
+ $m = min( max( 1, absint( $month ) ), 12 );
540
+ $d = min( absint( $day ), 31 );
541
+ $from = Carbon::createFromDate( $y, $m, $d, $this->timezone )->startOfDay()->getTimestamp();
542
+ $to = Carbon::createFromDate( $y, $m, $d, $this->timezone )->endOfDay()->getTimestamp();
543
+ return $this->filter_events( $from, $to );
544
+ }
545
+
546
+ /**
547
+ * Get events for today.
548
+ *
549
+ * @since 3.0.0
550
+ *
551
+ * @return array Event objects for today.
552
+ */
553
+ public function get_today() {
554
+ $start = Carbon::today( $this->timezone )->startOfDay()->getTimestamp();
555
+ $end = Carbon::today( $this->timezone )->endOfDay()->getTimestamp();
556
+ return $this->filter_events( $start, $end );
557
+ }
558
+
559
+ /**
560
+ * Get events for tomorrow.
561
+ *
562
+ * @since 3.0.0
563
+ *
564
+ * @return array Event objects for tomorrow.
565
+ */
566
+ public function get_tomorrow() {
567
+ $start = Carbon::tomorrow( $this->timezone )->startOfDay()->getTimestamp();
568
+ $end = Carbon::tomorrow( $this->timezone )->endOfDay()->getTimestamp();
569
+ return $this->filter_events( $start, $end );
570
+ }
571
+
572
+ /**
573
+ * Get events for yesterday.
574
+ *
575
+ * @since 3.0.0
576
+ *
577
+ * @return array Event objects for yesterday.
578
+ */
579
+ public function get_yesterday() {
580
+ $start = Carbon::yesterday( $this->timezone )->startOfDay()->getTimestamp();
581
+ $end = Carbon::yesterday( $this->timezone )->endOfDay()->getTimestamp();
582
+ return $this->filter_events( $start, $end );
583
+ }
584
+
585
+ /**
586
+ * Filter events by timestamps.
587
+ *
588
+ * @since 3.0.0
589
+ * @access private
590
+ *
591
+ * @param int $from Lower bound timestamp.
592
+ * @param int $to Upper bound timestamp.
593
+ *
594
+ * @return array Filtered array of Event objects.
595
+ */
596
+ private function filter_events( $from, $to ) {
597
+ $timestamps = array_keys( $this->events );
598
+ $lower_bound = array_filter( $timestamps, function( $ts ) use( $from ) {
599
+ return intval( $ts ) > intval( $from );
600
+ } );
601
+ $higher_bound = array_filter( $lower_bound, function( $ts ) use( $to ) {
602
+ return intval( $ts ) > intval( $to );
603
+ } );
604
+ $filtered = array_combine( $higher_bound, $higher_bound );
605
+ return array_intersect_key( $this->events, $filtered );
606
+ }
607
+
608
+ }
includes/feeds/admin/google-admin.php CHANGED
@@ -1,355 +1,357 @@
1
- <?php
2
- /**
3
- * Google Calendar - Admin
4
- *
5
- * @package SimpleCalendar/Feeds
6
- */
7
- namespace SimpleCalendar\Feeds\Admin;
8
-
9
- use SimpleCalendar\Admin\Metaboxes\Settings;
10
- use SimpleCalendar\Admin\Notice;
11
- use SimpleCalendar\Feeds\Google;
12
-
13
- if ( ! defined( 'ABSPATH' ) ) {
14
- exit;
15
- }
16
-
17
- /**
18
- * Google Calendar feed admin.
19
- *
20
- * @since 3.0.0
21
- */
22
- class Google_Admin {
23
-
24
- /**
25
- * Google calendar feed object.
26
- *
27
- * @access private
28
- * @var Google
29
- */
30
- private $feed = null;
31
-
32
- /**
33
- * Google Api Key.
34
- *
35
- * @access private
36
- * @var string
37
- */
38
- private $google_api_key = '';
39
-
40
- /**
41
- * Google Calendar id.
42
- *
43
- * @access private
44
- * @var string
45
- */
46
- private $google_calendar_id = '';
47
-
48
- /**
49
- * Hook in tabs.
50
- *
51
- * @since 3.0.0
52
- *
53
- * @param Google $feed
54
- * @param string $google_api_key
55
- * @param string $google_calendar_id
56
- */
57
- public function __construct( Google $feed, $google_api_key, $google_calendar_id ) {
58
-
59
- $this->feed = $feed;
60
- $this->google_api_key = $google_api_key;
61
- $this->google_calendar_id = $google_calendar_id;
62
-
63
- $screen = simcal_is_admin_screen();
64
-
65
- if ( 'calendar' == $screen ) {
66
- $this->test_api_key_connection( $this->google_calendar_id );
67
- add_filter( 'simcal_settings_meta_tabs_li', array( $this, 'add_settings_meta_tab_li' ), 10, 1 );
68
- add_action( 'simcal_settings_meta_panels', array( $this, 'add_settings_meta_panel' ), 10, 1 );
69
- }
70
-
71
- add_action( 'simcal_process_settings_meta', array( $this, 'process_meta' ), 10, 1 );
72
- }
73
-
74
- /**
75
- * Feed settings page fields.
76
- *
77
- * @since 3.0.0
78
- *
79
- * @return array
80
- */
81
- public function settings_fields() {
82
- return array(
83
- 'name' => $this->feed->name,
84
- 'description' => __( "To read events from your public Google Calendars you'll need create a Google API key and save it here.", 'google-calendar-events' ) .
85
- '<br/><br/>' .
86
- '<em style="font-size: 14px;">' .
87
- sprintf( __( '<strong>Note:</strong> Calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong> use a different method of authorization.', 'google-calendar-events' ),
88
- simcal_ga_campaign_url( simcal_get_url( 'addons' ), 'core-plugin', 'settings-link' )
89
- ) .
90
- '</em>',
91
- 'fields' => array(
92
- 'api_key' => array(
93
- 'type' => 'standard',
94
- 'subtype' => 'text',
95
- 'class' => array( 'simcal-wide-text regular-text', 'ltr' ),
96
- 'title' => __( 'Google API Key', 'google-calendar-events' ),
97
- 'validation' => array( $this, 'check_google_api_key' ),
98
- ),
99
- ),
100
- );
101
- }
102
-
103
- /**
104
- * Check if there's a Google API Key or a legacy key is being used.
105
- *
106
- * This method only checks if the api key setting is not empty.
107
- * It is not currently possible to check or validate an API Key without performing a full request.
108
- * On the settings page there are no known calendars to use for this so we can only check if there is a string.
109
- *
110
- * @since 3.0.0
111
- *
112
- * @param string $api_key Google API key.
113
- *
114
- * @return true|string
115
- */
116
- public function check_google_api_key( $api_key = '' ) {
117
-
118
- $message = '';
119
- $has_errors = false;
120
-
121
- if ( empty( $api_key ) ){
122
- $api_key = $this->google_api_key;
123
- if ( empty( $api_key ) ) {
124
- $settings = get_option( 'simple-calendar_settings_feeds' );
125
- $api_key = isset( $settings['google']['api_key'] ) ? esc_attr( $settings['google']['api_key'] ) : '';
126
- }
127
- }
128
-
129
- $message = '<p class="description">' .
130
- sprintf( __( '<a href="%s" target="_blank">Step-by-step instructions</a> ', 'google-calendar-events' ),
131
- simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/google-api-key/', 'core-plugin', 'settings-link' )
132
- ) .
133
- '<br/>' .
134
- sprintf( __( '<a href="%s" target="_blank">Google Developers Console</a> ', 'google-calendar-events' ),
135
- simcal_get_url( 'gdev-console' )
136
- ) .
137
- '</p>';
138
-
139
- return $message;
140
- }
141
-
142
- /**
143
- * Add a tab to the settings meta box.
144
- *
145
- * @since 3.0.0
146
- *
147
- * @param array $tabs
148
- *
149
- * @return array
150
- */
151
- public function add_settings_meta_tab_li( $tabs ) {
152
- return array_merge( $tabs, array(
153
- 'google' => array(
154
- 'label' => $this->feed->name,
155
- 'target' => 'google-settings-panel',
156
- 'class' => array( 'simcal-feed-type', 'simcal-feed-type-google' ),
157
- 'icon' => 'simcal-icon-google',
158
- ),
159
- ) );
160
- }
161
-
162
- /**
163
- * Add a panel to the settings meta box.
164
- *
165
- * @since 3.0.0
166
- *
167
- * @param int $post_id
168
- */
169
- public function add_settings_meta_panel( $post_id ) {
170
-
171
- $inputs = array(
172
- $this->feed->type => array(
173
- '_google_calendar_id' => array(
174
- 'type' => 'standard',
175
- 'subtype' => 'text',
176
- 'name' => '_google_calendar_id',
177
- 'id' => '_google_calendar_id',
178
- 'title' => __( 'Calendar ID', 'google-calendar-events' ),
179
- 'tooltip' => __( 'Visit your Google Calendar account, copy your public calendar ID, then paste it here.', 'google-calendar-events' ),
180
- 'placeholder' => __( 'Enter a valid Google Calendar ID from a public calendar', 'google-calendar-events' ),
181
- 'escaping' => array( $this->feed, 'esc_google_calendar_id' ),
182
- 'validation' => array( $this, 'test_api_key_connection' ),
183
- ),
184
- '_google_events_search_query' => array(
185
- 'type' => 'standard',
186
- 'subtype' => 'text',
187
- 'name' => '_google_events_search_query',
188
- 'id' => '_google_events_search_query',
189
- 'title' => __( 'Search Query', 'google-calendar-events' ),
190
- 'tooltip' => __( 'Type in keywords if you only want display events that match these terms. You can use basic boolean search operators too.', 'google-calendar-events' ),
191
- 'placeholder' => __( 'Filter events to display by search terms...', 'google-calendar-events' ),
192
- ),
193
- '_google_events_recurring' => array(
194
- 'type' => 'select',
195
- 'name' => '_google_events_recurring',
196
- 'id' => '_google_events_recurring',
197
- 'title' => __( 'Recurring Events', 'google-calendar-events' ),
198
- 'tooltip' => __( 'Events that are programmed to repeat themselves periodically.', 'google-calendar-events' ),
199
- 'options' => array(
200
- 'show' => __( 'Show all', 'google-calendar-events' ),
201
- 'first-only' => __( 'Only show first occurrence', 'google-calendar-events' ),
202
- ),
203
- ),
204
- '_google_events_max_results' => array(
205
- 'type' => 'standard',
206
- 'subtype' => 'number',
207
- 'name' => '_google_events_max_results',
208
- 'id' => '_google_events_max_results',
209
- 'title' => __( 'Maximum Events', 'google-calendar-events' ),
210
- 'tooltip' => __( 'Google Calendar only allows to query for a maximum amount of 2500 events from a calendar each time.', 'google-calendar-events' ),
211
- 'class' => array(
212
- 'simcal-field-small',
213
- ),
214
- 'default' => '2500',
215
- 'attributes' => array(
216
- 'min' => '0',
217
- 'max' => '2500',
218
- ),
219
- ),
220
- ),
221
- );
222
-
223
- ?>
224
- <div id="google-settings-panel" class="simcal-panel">
225
- <table>
226
- <thead>
227
- <tr><th colspan="2"><?php _e( 'Google Calendar Settings', 'google-calendar-events' ); ?></th></tr>
228
- </thead>
229
- <?php Settings::print_panel_fields( $inputs, $post_id ); ?>
230
- </table>
231
- </div>
232
- <?php
233
-
234
- }
235
-
236
- /**
237
- * Test a connection to Google Calendar API.
238
- *
239
- * @since 3.0.0
240
- *
241
- * @param string $google_calendar_id
242
- *
243
- * @return true|string
244
- */
245
- public function test_api_key_connection( $google_calendar_id ) {
246
-
247
- global $post;
248
-
249
- $post_id = isset( $post->ID ) ? $post->ID : 0;
250
- $feed = null;
251
- if ( $feed_type = wp_get_object_terms( $post_id, 'calendar_feed' ) ) {
252
- $feed = sanitize_title( current( $feed_type )->name );
253
- }
254
-
255
- $message = '';
256
- $error = '';
257
- $has_errors = false;
258
-
259
- $message .= '<p class="description">' .
260
- sprintf(
261
- __( 'Step 1: Set the Google Calendar you want to use as <strong>"public."</strong> <a href="%1s" target="_blank">Detailed instructions</a>', 'google-calendar-events' ) . '<br />' .
262
- __( 'Step 2: Copy and paste your Google Calendar ID here. <a href="%2s" target="_blank">Detailed instructions</a>', 'google-calendar-events' ),
263
- simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/make-google-calendar-public/', 'core-plugin', 'settings-link' ),
264
- simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/find-google-calendar-id/', 'core-plugin', 'settings-link' )
265
- ) . '</p>';
266
-
267
- if ( $post_id > 0 && ! is_null( $feed ) && ! empty( $this->feed->type ) ) {
268
-
269
- $no_key_notice = new Notice( array(
270
- 'id' => array( 'calendar_' . $post_id => 'google-no-api-key' ),
271
- 'type' => 'error',
272
- 'screen' => 'calendar',
273
- 'post' => $post_id,
274
- 'dismissable' => false,
275
- 'content' => '<p>' .
276
- '<i class="simcal-icon-warning"></i> ' .
277
- sprintf(
278
- __( 'Your Google Calendar events will not show up until you <a href="%s">create and save a Google API key</a>.', 'google-calendar-events' ),
279
- admin_url( 'edit.php?post_type=calendar&page=simple-calendar_settings&tab=feeds' )
280
- ) .
281
- '</p>',
282
- )
283
- );
284
-
285
- if ( empty( $this->google_api_key ) && ( $feed == $this->feed->type ) ) {
286
-
287
- $has_errors = true;
288
- $no_key_notice->add();
289
-
290
- } else {
291
-
292
- $no_key_notice->remove();
293
-
294
- try {
295
- $this->feed->make_request( $google_calendar_id );
296
- } catch ( \Exception $e ) {
297
- $error = $e->getMessage();
298
- $message = ! empty( $error ) ? '<blockquote>' . $error . '</blockquote>' : '';
299
- }
300
-
301
- $error_notice = new Notice( array(
302
- 'id' => array( 'calendar_' . $post_id => 'google-error-response' ),
303
- 'type' => 'error',
304
- 'screen' => 'calendar',
305
- 'post' => $post_id,
306
- 'dismissable' => false,
307
- 'content' => '<p>' .
308
- '<i class="simcal-icon-warning"></i> ' .
309
- __( 'While trying to retrieve events, Google returned an error:', 'google-calendar-events' ) .
310
- '<br>' . $message . '<br>' .
311
- __( 'Please ensure that both your Google Calendar ID and API Key are valid and that the Google Calendar you want to display is public.', 'google-calendar-events' ) .
312
- '</p>',
313
- )
314
- );
315
-
316
- if ( ! empty( $error ) && ( $feed == $this->feed->type ) ) {
317
- $error_notice->add();
318
- $has_errors = true;
319
- } else {
320
- $error_notice->remove();
321
- $has_errors = false;
322
- }
323
-
324
- }
325
-
326
- }
327
-
328
- return $message;
329
- }
330
-
331
- /**
332
- * Process meta fields.
333
- *
334
- * @since 3.0.0
335
- *
336
- * @param int $post_id
337
- */
338
- public function process_meta( $post_id ) {
339
-
340
- $calendar_id = isset( $_POST['_google_calendar_id'] ) ? base64_encode( trim( $_POST['_google_calendar_id'] ) ): '';
341
- update_post_meta( $post_id, '_google_calendar_id', $calendar_id );
342
-
343
- $search_query = isset( $_POST['_google_events_search_query'] ) ? sanitize_text_field( $_POST['_google_events_search_query'] ) : '';
344
- update_post_meta( $post_id, '_google_events_search_query', $search_query );
345
-
346
- $recurring = isset( $_POST['_google_events_recurring'] ) ? sanitize_key( $_POST['_google_events_recurring'] ) : 'show';
347
- update_post_meta( $post_id, '_google_events_recurring', $recurring );
348
-
349
- $max_results = isset( $_POST['_google_events_max_results'] ) ? absint( $_POST['_google_events_max_results'] ) : '2500';
350
- update_post_meta( $post_id, '_google_events_max_results', $max_results );
351
-
352
- $this->test_api_key_connection( $calendar_id );
353
- }
354
-
355
- }
 
 
1
+ <?php
2
+ /**
3
+ * Google Calendar - Admin
4
+ *
5
+ * @package SimpleCalendar/Feeds
6
+ */
7
+ namespace SimpleCalendar\Feeds\Admin;
8
+
9
+ use SimpleCalendar\plugin_deps\Google\Service\Exception;
10
+
11
+ use SimpleCalendar\Admin\Metaboxes\Settings;
12
+ use SimpleCalendar\Admin\Notice;
13
+ use SimpleCalendar\Feeds\Google;
14
+
15
+ if ( ! defined( 'ABSPATH' ) ) {
16
+ exit;
17
+ }
18
+
19
+ /**
20
+ * Google Calendar feed admin.
21
+ *
22
+ * @since 3.0.0
23
+ */
24
+ class Google_Admin {
25
+
26
+ /**
27
+ * Google calendar feed object.
28
+ *
29
+ * @access private
30
+ * @var Google
31
+ */
32
+ private $feed = null;
33
+
34
+ /**
35
+ * Google Api Key.
36
+ *
37
+ * @access private
38
+ * @var string
39
+ */
40
+ private $google_api_key = '';
41
+
42
+ /**
43
+ * Google Calendar id.
44
+ *
45
+ * @access private
46
+ * @var string
47
+ */
48
+ private $google_calendar_id = '';
49
+
50
+ /**
51
+ * Hook in tabs.
52
+ *
53
+ * @since 3.0.0
54
+ *
55
+ * @param Google $feed
56
+ * @param string $google_api_key
57
+ * @param string $google_calendar_id
58
+ */
59
+ public function __construct( Google $feed, $google_api_key, $google_calendar_id ) {
60
+
61
+ $this->feed = $feed;
62
+ $this->google_api_key = $google_api_key;
63
+ $this->google_calendar_id = $google_calendar_id;
64
+
65
+ $screen = simcal_is_admin_screen();
66
+
67
+ if ( 'calendar' == $screen ) {
68
+ $this->test_api_key_connection( $this->google_calendar_id );
69
+ add_filter( 'simcal_settings_meta_tabs_li', array( $this, 'add_settings_meta_tab_li' ), 10, 1 );
70
+ add_action( 'simcal_settings_meta_panels', array( $this, 'add_settings_meta_panel' ), 10, 1 );
71
+ }
72
+
73
+ add_action( 'simcal_process_settings_meta', array( $this, 'process_meta' ), 10, 1 );
74
+ }
75
+
76
+ /**
77
+ * Feed settings page fields.
78
+ *
79
+ * @since 3.0.0
80
+ *
81
+ * @return array
82
+ */
83
+ public function settings_fields() {
84
+ return array(
85
+ 'name' => $this->feed->name,
86
+ 'description' => __( "To read events from your public Google Calendars you'll need create a Google API key and save it here.", 'google-calendar-events' ) .
87
+ '<br/><br/>' .
88
+ '<em style="font-size: 14px;">' .
89
+ sprintf( __( '<strong>Note:</strong> Calendars configured to use the <strong><a href="%s" target="_blank">Google Calendar Pro add-on</a></strong> use a different method of authorization.', 'google-calendar-events' ),
90
+ simcal_ga_campaign_url( simcal_get_url( 'addons' ), 'core-plugin', 'settings-link' )
91
+ ) .
92
+ '</em>',
93
+ 'fields' => array(
94
+ 'api_key' => array(
95
+ 'type' => 'standard',
96
+ 'subtype' => 'text',
97
+ 'class' => array( 'simcal-wide-text regular-text', 'ltr' ),
98
+ 'title' => __( 'Google API Key', 'google-calendar-events' ),
99
+ 'validation' => array( $this, 'check_google_api_key' ),
100
+ ),
101
+ ),
102
+ );
103
+ }
104
+
105
+ /**
106
+ * Check if there's a Google API Key or a legacy key is being used.
107
+ *
108
+ * This method only checks if the api key setting is not empty.
109
+ * It is not currently possible to check or validate an API Key without performing a full request.
110
+ * On the settings page there are no known calendars to use for this so we can only check if there is a string.
111
+ *
112
+ * @since 3.0.0
113
+ *
114
+ * @param string $api_key Google API key.
115
+ *
116
+ * @return true|string
117
+ */
118
+ public function check_google_api_key( $api_key = '' ) {
119
+
120
+ $message = '';
121
+ $has_errors = false;
122
+
123
+ if ( empty( $api_key ) ){
124
+ $api_key = $this->google_api_key;
125
+ if ( empty( $api_key ) ) {
126
+ $settings = get_option( 'simple-calendar_settings_feeds' );
127
+ $api_key = isset( $settings['google']['api_key'] ) ? esc_attr( $settings['google']['api_key'] ) : '';
128
+ }
129
+ }
130
+
131
+ $message = '<p class="description">' .
132
+ sprintf( __( '<a href="%s" target="_blank">Step-by-step instructions</a> ', 'google-calendar-events' ),
133
+ simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/google-api-key/', 'core-plugin', 'settings-link' )
134
+ ) .
135
+ '<br/>' .
136
+ sprintf( __( '<a href="%s" target="_blank">Google Developers Console</a> ', 'google-calendar-events' ),
137
+ simcal_get_url( 'gdev-console' )
138
+ ) .
139
+ '</p>';
140
+
141
+ return $message;
142
+ }
143
+
144
+ /**
145
+ * Add a tab to the settings meta box.
146
+ *
147
+ * @since 3.0.0
148
+ *
149
+ * @param array $tabs
150
+ *
151
+ * @return array
152
+ */
153
+ public function add_settings_meta_tab_li( $tabs ) {
154
+ return array_merge( $tabs, array(
155
+ 'google' => array(
156
+ 'label' => $this->feed->name,
157
+ 'target' => 'google-settings-panel',
158
+ 'class' => array( 'simcal-feed-type', 'simcal-feed-type-google' ),
159
+ 'icon' => 'simcal-icon-google',
160
+ ),
161
+ ) );
162
+ }
163
+
164
+ /**
165
+ * Add a panel to the settings meta box.
166
+ *
167
+ * @since 3.0.0
168
+ *
169
+ * @param int $post_id
170
+ */
171
+ public function add_settings_meta_panel( $post_id ) {
172
+
173
+ $inputs = array(
174
+ $this->feed->type => array(
175
+ '_google_calendar_id' => array(
176
+ 'type' => 'standard',
177
+ 'subtype' => 'text',
178
+ 'name' => '_google_calendar_id',
179
+ 'id' => '_google_calendar_id',
180
+ 'title' => __( 'Calendar ID', 'google-calendar-events' ),
181
+ 'tooltip' => __( 'Visit your Google Calendar account, copy your public calendar ID, then paste it here.', 'google-calendar-events' ),
182
+ 'placeholder' => __( 'Enter a valid Google Calendar ID from a public calendar', 'google-calendar-events' ),
183
+ 'escaping' => array( $this->feed, 'esc_google_calendar_id' ),
184
+ 'validation' => array( $this, 'test_api_key_connection' ),
185
+ ),
186
+ '_google_events_search_query' => array(
187
+ 'type' => 'standard',
188
+ 'subtype' => 'text',
189
+ 'name' => '_google_events_search_query',
190
+ 'id' => '_google_events_search_query',
191
+ 'title' => __( 'Search Query', 'google-calendar-events' ),
192
+ 'tooltip' => __( 'Type in keywords if you only want display events that match these terms. You can use basic boolean search operators too.', 'google-calendar-events' ),
193
+ 'placeholder' => __( 'Filter events to display by search terms...', 'google-calendar-events' ),
194
+ ),
195
+ '_google_events_recurring' => array(
196
+ 'type' => 'select',
197
+ 'name' => '_google_events_recurring',
198
+ 'id' => '_google_events_recurring',
199
+ 'title' => __( 'Recurring Events', 'google-calendar-events' ),
200
+ 'tooltip' => __( 'Events that are programmed to repeat themselves periodically.', 'google-calendar-events' ),
201
+ 'options' => array(
202
+ 'show' => __( 'Show all', 'google-calendar-events' ),
203
+ 'first-only' => __( 'Only show first occurrence', 'google-calendar-events' ),
204
+ ),
205
+ ),
206
+ '_google_events_max_results' => array(
207
+ 'type' => 'standard',
208
+ 'subtype' => 'number',
209
+ 'name' => '_google_events_max_results',
210
+ 'id' => '_google_events_max_results',
211
+ 'title' => __( 'Maximum Events', 'google-calendar-events' ),
212
+ 'tooltip' => __( 'Google Calendar only allows to query for a maximum amount of 2500 events from a calendar each time.', 'google-calendar-events' ),
213
+ 'class' => array(
214
+ 'simcal-field-small',
215
+ ),
216
+ 'default' => '2500',
217
+ 'attributes' => array(
218
+ 'min' => '0',
219
+ 'max' => '2500',
220
+ ),
221
+ ),
222
+ ),
223
+ );
224
+
225
+ ?>
226
+ <div id="google-settings-panel" class="simcal-panel">
227
+ <table>
228
+ <thead>
229
+ <tr><th colspan="2"><?php _e( 'Google Calendar Settings', 'google-calendar-events' ); ?></th></tr>
230
+ </thead>
231
+ <?php Settings::print_panel_fields( $inputs, $post_id ); ?>
232
+ </table>
233
+ </div>
234
+ <?php
235
+
236
+ }
237
+
238
+ /**
239
+ * Test a connection to Google Calendar API.
240
+ *
241
+ * @since 3.0.0
242
+ *
243
+ * @param string $google_calendar_id
244
+ *
245
+ * @return true|string
246
+ */
247
+ public function test_api_key_connection( $google_calendar_id ) {
248
+
249
+ global $post;
250
+
251
+ $post_id = isset( $post->ID ) ? $post->ID : 0;
252
+ $feed = null;
253
+ if ( $feed_type = wp_get_object_terms( $post_id, 'calendar_feed' ) ) {
254
+ $feed = sanitize_title( current( $feed_type )->name );
255
+ }
256
+
257
+ $message = '';
258
+ $error = '';
259
+ $has_errors = false;
260
+
261
+ $message .= '<p class="description">' .
262
+ sprintf(
263
+ __( 'Step 1: Set the Google Calendar you want to use as <strong>"public."</strong> <a href="%1s" target="_blank">Detailed instructions</a>', 'google-calendar-events' ) . '<br />' .
264
+ __( 'Step 2: Copy and paste your Google Calendar ID here. <a href="%2s" target="_blank">Detailed instructions</a>', 'google-calendar-events' ),
265
+ simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/make-google-calendar-public/', 'core-plugin', 'settings-link' ),
266
+ simcal_ga_campaign_url( simcal_get_url( 'docs' ) . '/find-google-calendar-id/', 'core-plugin', 'settings-link' )
267
+ ) . '</p>';
268
+
269
+ if ( $post_id > 0 && ! is_null( $feed ) && ! empty( $this->feed->type ) ) {
270
+
271
+ $no_key_notice = new Notice( array(
272
+ 'id' => array( 'calendar_' . $post_id => 'google-no-api-key' ),
273
+ 'type' => 'error',
274
+ 'screen' => 'calendar',
275
+ 'post' => $post_id,
276
+ 'dismissable' => false,
277
+ 'content' => '<p>' .
278
+ '<i class="simcal-icon-warning"></i> ' .
279
+ sprintf(
280
+ __( 'Your Google Calendar events will not show up until you <a href="%s">create and save a Google API key</a>.', 'google-calendar-events' ),
281
+ admin_url( 'edit.php?post_type=calendar&page=simple-calendar_settings&tab=feeds' )
282
+ ) .
283
+ '</p>',
284
+ )
285
+ );
286
+
287
+ if ( empty( $this->google_api_key ) && ( $feed == $this->feed->type ) ) {
288
+
289
+ $has_errors = true;
290
+ $no_key_notice->add();
291
+
292
+ } else {
293
+
294
+ $no_key_notice->remove();
295
+
296
+ try {
297
+ $this->feed->make_request( $google_calendar_id );
298
+ } catch ( Exception $e ) {
299
+ $error = $e->getMessage();
300
+ $message = ! empty( $error ) ? '<blockquote>' . $error . '</blockquote>' : '';
301
+ }
302
+
303
+ $error_notice = new Notice( array(
304
+ 'id' => array( 'calendar_' . $post_id => 'google-error-response' ),
305
+ 'type' => 'error',
306
+ 'screen' => 'calendar',
307
+ 'post' => $post_id,
308
+ 'dismissable' => false,
309
+ 'content' => '<p>' .
310
+ '<i class="simcal-icon-warning"></i> ' .
311
+ __( 'While trying to retrieve events, Google returned an error:', 'google-calendar-events' ) .
312
+ '<br>' . $message . '<br>' .
313
+ __( 'Please ensure that both your Google Calendar ID and API Key are valid and that the Google Calendar you want to display is public.', 'google-calendar-events' ) .
314
+ '</p>',
315
+ )
316
+ );
317
+
318
+ if ( ! empty( $error ) && ( $feed == $this->feed->type ) ) {
319
+ $error_notice->add();
320
+ $has_errors = true;
321
+ } else {
322
+ $error_notice->remove();
323
+ $has_errors = false;
324
+ }
325
+
326
+ }
327
+
328
+ }
329
+
330
+ return $message;
331
+ }
332
+
333
+ /**
334
+ * Process meta fields.
335
+ *
336
+ * @since 3.0.0
337
+ *
338
+ * @param int $post_id
339
+ */
340
+ public function process_meta( $post_id ) {
341
+
342
+ $calendar_id = isset( $_POST['_google_calendar_id'] ) ? base64_encode( trim( $_POST['_google_calendar_id'] ) ): '';
343
+ update_post_meta( $post_id, '_google_calendar_id', $calendar_id );
344
+
345
+ $search_query = isset( $_POST['_google_events_search_query'] ) ? sanitize_text_field( $_POST['_google_events_search_query'] ) : '';
346
+ update_post_meta( $post_id, '_google_events_search_query', $search_query );
347
+
348
+ $recurring = isset( $_POST['_google_events_recurring'] ) ? sanitize_key( $_POST['_google_events_recurring'] ) : 'show';
349
+ update_post_meta( $post_id, '_google_events_recurring', $recurring );
350
+
351
+ $max_results = isset( $_POST['_google_events_max_results'] ) ? absint( $_POST['_google_events_max_results'] ) : '2500';
352
+ update_post_meta( $post_id, '_google_events_max_results', $max_results );
353
+
354
+ $this->test_api_key_connection( $calendar_id );
355
+ }
356
+
357
+ }
includes/feeds/google.php CHANGED
@@ -6,11 +6,18 @@
6
  */
7
  namespace SimpleCalendar\Feeds;
8
 
9
- use Carbon\Carbon;
 
 
 
 
 
 
 
10
  use SimpleCalendar\Abstracts\Calendar;
11
  use SimpleCalendar\Abstracts\Feed;
12
  use SimpleCalendar\Feeds\Admin\Google_Admin as Admin;
13
- use GuzzleHttp\Client;
14
 
15
  if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
@@ -100,7 +107,7 @@ class Google extends Feed {
100
  // Google client config.
101
  $settings = get_option( 'simple-calendar_settings_feeds' );
102
  $this->google_api_key = isset( $settings['google']['api_key'] ) ? esc_attr( $settings['google']['api_key'] ) : '';
103
- $this->google_client_scopes = array( \Google_Service_Calendar::CALENDAR_READONLY );
104
  $this->google_client = $this->get_client();
105
 
106
  if ( $this->post_id > 0 ) {
@@ -155,7 +162,7 @@ class Google extends Feed {
155
 
156
  try {
157
  $response = $this->make_request( $this->google_calendar_id );
158
- } catch ( \Exception $e ) {
159
  $error .= $e->getMessage();
160
  }
161
 
@@ -172,7 +179,7 @@ class Google extends Feed {
172
 
173
  if ( ! empty( $response['events'] ) && is_array( $response['events'] ) ) {
174
  foreach ( $response['events'] as $event ) {
175
- if ( $event instanceof \Google_Service_Calendar_Event ) {
176
 
177
  // Visibility and status.
178
  // Public calendars may have private events which can't be properly accessed by simple api key method.
@@ -414,7 +421,7 @@ class Google extends Feed {
414
  *
415
  * @return array
416
  *
417
- * @throws \Exception On request failure will throw an exception from Google.
418
  */
419
  public function make_request( $id = '', $time_min = 0, $time_max = 0 ) {
420
 
@@ -477,7 +484,7 @@ class Google extends Feed {
477
  // Query events in calendar.
478
  $response = $google->events->listEvents( $id, $args );
479
 
480
- if ( $response instanceof \Google_Service_Calendar_Events ) {
481
  $calendar = array(
482
  'id' => $id,
483
  'title' => $response->getSummary(),
@@ -502,7 +509,7 @@ class Google extends Feed {
502
  */
503
  private function get_client() {
504
 
505
- $client = new \Google_Client();
506
  $client->setApplicationName( 'Simple Calendar' );
507
  $client->setScopes( $this->google_client_scopes );
508
  $client->setDeveloperKey( $this->google_api_key );
@@ -527,10 +534,10 @@ class Google extends Feed {
527
  * @since 3.0.0
528
  * @access protected
529
  *
530
- * @return null|\Google_Service_Calendar
531
  */
532
  protected function get_service() {
533
- return $this->google_client instanceof \Google_Client ? new \Google_Service_Calendar( $this->google_client ) : null;
534
  }
535
 
536
  }
6
  */
7
  namespace SimpleCalendar\Feeds;
8
 
9
+ use SimpleCalendar\plugin_deps\Google\Google_Service;
10
+ use SimpleCalendar\plugin_deps\Google_Service_Calendar;
11
+ use SimpleCalendar\plugin_deps\Google_Client;
12
+ use SimpleCalendar\plugin_deps\Google_Service_Calendar_Event;
13
+ use SimpleCalendar\plugin_deps\Google_Service_Calendar_Events;
14
+ use SimpleCalendar\plugin_deps\Google\Service\Exception;
15
+
16
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
17
  use SimpleCalendar\Abstracts\Calendar;
18
  use SimpleCalendar\Abstracts\Feed;
19
  use SimpleCalendar\Feeds\Admin\Google_Admin as Admin;
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
21
 
22
  if ( ! defined( 'ABSPATH' ) ) {
23
  exit;
107
  // Google client config.
108
  $settings = get_option( 'simple-calendar_settings_feeds' );
109
  $this->google_api_key = isset( $settings['google']['api_key'] ) ? esc_attr( $settings['google']['api_key'] ) : '';
110
+ $this->google_client_scopes = array( Google_Service_Calendar::CALENDAR_READONLY );
111
  $this->google_client = $this->get_client();
112
 
113
  if ( $this->post_id > 0 ) {
162
 
163
  try {
164
  $response = $this->make_request( $this->google_calendar_id );
165
+ } catch ( Exception $e ) {
166
  $error .= $e->getMessage();
167
  }
168
 
179
 
180
  if ( ! empty( $response['events'] ) && is_array( $response['events'] ) ) {
181
  foreach ( $response['events'] as $event ) {
182
+ if ( $event instanceof Google_Service_Calendar_Event ) {
183
 
184
  // Visibility and status.
185
  // Public calendars may have private events which can't be properly accessed by simple api key method.
421
  *
422
  * @return array
423
  *
424
+ * @throws Exception On request failure will throw an exception from Google.
425
  */
426
  public function make_request( $id = '', $time_min = 0, $time_max = 0 ) {
427
 
484
  // Query events in calendar.
485
  $response = $google->events->listEvents( $id, $args );
486
 
487
+ if ( $response instanceof Google_Service_Calendar_Events ) {
488
  $calendar = array(
489
  'id' => $id,
490
  'title' => $response->getSummary(),
509
  */
510
  private function get_client() {
511
 
512
+ $client = new Google_Client();
513
  $client->setApplicationName( 'Simple Calendar' );
514
  $client->setScopes( $this->google_client_scopes );
515
  $client->setDeveloperKey( $this->google_api_key );
534
  * @since 3.0.0
535
  * @access protected
536
  *
537
+ * @return null|Google_Service_Calendar
538
  */
539
  protected function get_service() {
540
+ return $this->google_client instanceof Google_Client ? new Google_Service_Calendar( $this->google_client ) : null;
541
  }
542
 
543
  }
includes/functions/shared.php CHANGED
@@ -11,6 +11,8 @@ if ( ! defined( 'ABSPATH' ) ) {
11
  exit;
12
  }
13
 
 
 
14
  /**
15
  * Check if there is a calendar.
16
  *
@@ -39,6 +41,15 @@ function is_simple_calendar() {
39
  return false;
40
  }
41
 
 
 
 
 
 
 
 
 
 
42
  /**
43
  * Get plugin URL.
44
  *
@@ -227,7 +238,7 @@ function simcal_get_calendar_names_i18n( $group, $style = 'full' ) {
227
  $format = '';
228
  $length = 0;
229
 
230
- $date = \Carbon\Carbon::now();
231
 
232
  if ( 'month' == $group ) {
233
  $date->month( 0 )->startOfMonth();
11
  exit;
12
  }
13
 
14
+ use SimpleCalendar\plugin_deps\Carbon\Carbon;
15
+
16
  /**
17
  * Check if there is a calendar.
18
  *
41
  return false;
42
  }
43
 
44
+
45
+ function simcal_log_error( $text ) {
46
+ if (true === WP_DEBUG) {
47
+ error_log($text);
48
+ }
49
+ return true;
50
+ }
51
+
52
+
53
  /**
54
  * Get plugin URL.
55
  *
238
  $format = '';
239
  $length = 0;
240
 
241
+ $date = Carbon::now();
242
 
243
  if ( 'month' == $group ) {
244
  $date->month( 0 )->startOfMonth();
includes/vendor/autoload.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload.php @generated by Composer
4
+
5
+ require_once __DIR__ . '/composer/autoload_real.php';
6
+
7
+ return ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20::getLoader();
includes/vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,479 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
17
+ *
18
+ * $loader = new \Composer\Autoload\ClassLoader();
19
+ *
20
+ * // register classes with namespaces
21
+ * $loader->add('Symfony\Component', __DIR__.'/component');
22
+ * $loader->add('Symfony', __DIR__.'/framework');
23
+ *
24
+ * // activate the autoloader
25
+ * $loader->register();
26
+ *
27
+ * // to enable searching the include path (eg. for PEAR packages)
28
+ * $loader->setUseIncludePath(true);
29
+ *
30
+ * In this example, if you try to use a class in the Symfony\Component
31
+ * namespace or one of its children (Symfony\Component\Console for instance),
32
+ * the autoloader will first look for the class under the component/
33
+ * directory, and it will then fallback to the framework/ directory if not
34
+ * found before giving up.
35
+ *
36
+ * This class is loosely based on the Symfony UniversalClassLoader.
37
+ *
38
+ * @author Fabien Potencier <fabien@symfony.com>
39
+ * @author Jordi Boggiano <j.boggiano@seld.be>
40
+ * @see https://www.php-fig.org/psr/psr-0/
41
+ * @see https://www.php-fig.org/psr/psr-4/
42
+ */
43
+ class ClassLoader
44
+ {
45
+ private $vendorDir;
46
+
47
+ // PSR-4
48
+ private $prefixLengthsPsr4 = array();
49
+ private $prefixDirsPsr4 = array();
50
+ private $fallbackDirsPsr4 = array();
51
+
52
+ // PSR-0
53
+ private $prefixesPsr0 = array();
54
+ private $fallbackDirsPsr0 = array();
55
+
56
+ private $useIncludePath = false;
57
+ private $classMap = array();
58
+ private $classMapAuthoritative = false;
59
+ private $missingClasses = array();
60
+ private $apcuPrefix;
61
+
62
+ private static $registeredLoaders = array();
63
+
64
+ public function __construct($vendorDir = null)
65
+ {
66
+ $this->vendorDir = $vendorDir;
67
+ }
68
+
69
+ public function getPrefixes()
70
+ {
71
+ if (!empty($this->prefixesPsr0)) {
72
+ return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
73
+ }
74
+
75
+ return array();
76
+ }
77
+
78
+ public function getPrefixesPsr4()
79
+ {
80
+ return $this->prefixDirsPsr4;
81
+ }
82
+
83
+ public function getFallbackDirs()
84
+ {
85
+ return $this->fallbackDirsPsr0;
86
+ }
87
+
88
+ public function getFallbackDirsPsr4()
89
+ {
90
+ return $this->fallbackDirsPsr4;
91
+ }
92
+
93
+ public function getClassMap()
94
+ {
95
+ return $this->classMap;
96
+ }
97
+
98
+ /**
99
+ * @param array $classMap Class to filename map
100
+ */
101
+ public function addClassMap(array $classMap)
102
+ {
103
+ if ($this->classMap) {
104
+ $this->classMap = array_merge($this->classMap, $classMap);
105
+ } else {
106
+ $this->classMap = $classMap;
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Registers a set of PSR-0 directories for a given prefix, either
112
+ * appending or prepending to the ones previously set for this prefix.
113
+ *
114
+ * @param string $prefix The prefix
115
+ * @param array|string $paths The PSR-0 root directories
116
+ * @param bool $prepend Whether to prepend the directories
117
+ */
118
+ public function add($prefix, $paths, $prepend = false)
119
+ {
120
+ if (!$prefix) {
121
+ if ($prepend) {
122
+ $this->fallbackDirsPsr0 = array_merge(
123
+ (array) $paths,
124
+ $this->fallbackDirsPsr0
125
+ );
126
+ } else {
127
+ $this->fallbackDirsPsr0 = array_merge(
128
+ $this->fallbackDirsPsr0,
129
+ (array) $paths
130
+ );
131
+ }
132
+
133
+ return;
134
+ }
135
+
136
+ $first = $prefix[0];
137
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
138
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
139
+
140
+ return;
141
+ }
142
+ if ($prepend) {
143
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
144
+ (array) $paths,
145
+ $this->prefixesPsr0[$first][$prefix]
146
+ );
147
+ } else {
148
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
149
+ $this->prefixesPsr0[$first][$prefix],
150
+ (array) $paths
151
+ );
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Registers a set of PSR-4 directories for a given namespace, either
157
+ * appending or prepending to the ones previously set for this namespace.
158
+ *
159
+ * @param string $prefix The prefix/namespace, with trailing '\\'
160
+ * @param array|string $paths The PSR-4 base directories
161
+ * @param bool $prepend Whether to prepend the directories
162
+ *
163
+ * @throws \InvalidArgumentException
164
+ */
165
+ public function addPsr4($prefix, $paths, $prepend = false)
166
+ {
167
+ if (!$prefix) {
168
+ // Register directories for the root namespace.
169
+ if ($prepend) {
170
+ $this->fallbackDirsPsr4 = array_merge(
171
+ (array) $paths,
172
+ $this->fallbackDirsPsr4
173
+ );
174
+ } else {
175
+ $this->fallbackDirsPsr4 = array_merge(
176
+ $this->fallbackDirsPsr4,
177
+ (array) $paths
178
+ );
179
+ }
180
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
181
+ // Register directories for a new namespace.
182
+ $length = strlen($prefix);
183
+ if ('\\' !== $prefix[$length - 1]) {
184
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
185
+ }
186
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
187
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
188
+ } elseif ($prepend) {
189
+ // Prepend directories for an already registered namespace.
190
+ $this->prefixDirsPsr4[$prefix] = array_merge(
191
+ (array) $paths,
192
+ $this->prefixDirsPsr4[$prefix]
193
+ );
194
+ } else {
195
+ // Append directories for an already registered namespace.
196
+ $this->prefixDirsPsr4[$prefix] = array_merge(
197
+ $this->prefixDirsPsr4[$prefix],
198
+ (array) $paths
199
+ );
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Registers a set of PSR-0 directories for a given prefix,
205
+ * replacing any others previously set for this prefix.
206
+ *
207
+ * @param string $prefix The prefix
208
+ * @param array|string $paths The PSR-0 base directories
209
+ */
210
+ public function set($prefix, $paths)
211
+ {
212
+ if (!$prefix) {
213
+ $this->fallbackDirsPsr0 = (array) $paths;
214
+ } else {
215
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
216
+ }
217
+ }
218
+
219
+ /**
220
+ * Registers a set of PSR-4 directories for a given namespace,
221
+ * replacing any others previously set for this namespace.
222
+ *
223
+ * @param string $prefix The prefix/namespace, with trailing '\\'
224
+ * @param array|string $paths The PSR-4 base directories
225
+ *
226
+ * @throws \InvalidArgumentException
227
+ */
228
+ public function setPsr4($prefix, $paths)
229
+ {
230
+ if (!$prefix) {
231
+ $this->fallbackDirsPsr4 = (array) $paths;
232
+ } else {
233
+ $length = strlen($prefix);
234
+ if ('\\' !== $prefix[$length - 1]) {
235
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
236
+ }
237
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
238
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
239
+ }
240
+ }
241
+
242
+ /**
243
+ * Turns on searching the include path for class files.
244
+ *
245
+ * @param bool $useIncludePath
246
+ */
247
+ public function setUseIncludePath($useIncludePath)
248
+ {
249
+ $this->useIncludePath = $useIncludePath;
250
+ }
251
+
252
+ /**
253
+ * Can be used to check if the autoloader uses the include path to check
254
+ * for classes.
255
+ *
256
+ * @return bool
257
+ */
258
+ public function getUseIncludePath()
259
+ {
260
+ return $this->useIncludePath;
261
+ }
262
+
263
+ /**
264
+ * Turns off searching the prefix and fallback directories for classes
265
+ * that have not been registered with the class map.
266
+ *
267
+ * @param bool $classMapAuthoritative
268
+ */
269
+ public function setClassMapAuthoritative($classMapAuthoritative)
270
+ {
271
+ $this->classMapAuthoritative = $classMapAuthoritative;
272
+ }
273
+
274
+ /**
275
+ * Should class lookup fail if not found in the current class map?
276
+ *
277
+ * @return bool
278
+ */
279
+ public function isClassMapAuthoritative()
280
+ {
281
+ return $this->classMapAuthoritative;
282
+ }
283
+
284
+ /**
285
+ * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
286
+ *
287
+ * @param string|null $apcuPrefix
288
+ */
289
+ public function setApcuPrefix($apcuPrefix)
290
+ {
291
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
292
+ }
293
+
294
+ /**
295
+ * The APCu prefix in use, or null if APCu caching is not enabled.
296
+ *
297
+ * @return string|null
298
+ */
299
+ public function getApcuPrefix()
300
+ {
301
+ return $this->apcuPrefix;
302
+ }
303
+
304
+ /**
305
+ * Registers this instance as an autoloader.
306
+ *
307
+ * @param bool $prepend Whether to prepend the autoloader or not
308
+ */
309
+ public function register($prepend = false)
310
+ {
311
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
312
+
313
+ if (null === $this->vendorDir) {
314
+ return;
315
+ }
316
+
317
+ if ($prepend) {
318
+ self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
319
+ } else {
320
+ unset(self::$registeredLoaders[$this->vendorDir]);
321
+ self::$registeredLoaders[$this->vendorDir] = $this;
322
+ }
323
+ }
324
+
325
+ /**
326
+ * Unregisters this instance as an autoloader.
327
+ */
328
+ public function unregister()
329
+ {
330
+ spl_autoload_unregister(array($this, 'loadClass'));
331
+
332
+ if (null !== $this->vendorDir) {
333
+ unset(self::$registeredLoaders[$this->vendorDir]);
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Loads the given class or interface.
339
+ *
340
+ * @param string $class The name of the class
341
+ * @return bool|null True if loaded, null otherwise
342
+ */
343
+ public function loadClass($class)
344
+ {
345
+ if ($file = $this->findFile($class)) {
346
+ includeFile($file);
347
+
348
+ return true;
349
+ }
350
+ }
351
+
352
+ /**
353
+ * Finds the path to the file where the class is defined.
354
+ *
355
+ * @param string $class The name of the class
356
+ *
357
+ * @return string|false The path if found, false otherwise
358
+ */
359
+ public function findFile($class)
360
+ {
361
+ // class map lookup
362
+ if (isset($this->classMap[$class])) {
363
+ return $this->classMap[$class];
364
+ }
365
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
366
+ return false;
367
+ }
368
+ if (null !== $this->apcuPrefix) {
369
+ $file = apcu_fetch($this->apcuPrefix.$class, $hit);
370
+ if ($hit) {
371
+ return $file;
372
+ }
373
+ }
374
+
375
+ $file = $this->findFileWithExtension($class, '.php');
376
+
377
+ // Search for Hack files if we are running on HHVM
378
+ if (false === $file && defined('HHVM_VERSION')) {
379
+ $file = $this->findFileWithExtension($class, '.hh');
380
+ }
381
+
382
+ if (null !== $this->apcuPrefix) {
383
+ apcu_add($this->apcuPrefix.$class, $file);
384
+ }
385
+
386
+ if (false === $file) {
387
+ // Remember that this class does not exist.
388
+ $this->missingClasses[$class] = true;
389
+ }
390
+
391
+ return $file;
392
+ }
393
+
394
+ /**
395
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
396
+ *
397
+ * @return self[]
398
+ */
399
+ public static function getRegisteredLoaders()
400
+ {
401
+ return self::$registeredLoaders;
402
+ }
403
+
404
+ private function findFileWithExtension($class, $ext)
405
+ {
406
+ // PSR-4 lookup
407
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
408
+
409
+ $first = $class[0];
410
+ if (isset($this->prefixLengthsPsr4[$first])) {
411
+ $subPath = $class;
412
+ while (false !== $lastPos = strrpos($subPath, '\\')) {
413
+ $subPath = substr($subPath, 0, $lastPos);
414
+ $search = $subPath . '\\';
415
+ if (isset($this->prefixDirsPsr4[$search])) {
416
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
417
+ foreach ($this->prefixDirsPsr4[$search] as $dir) {
418
+ if (file_exists($file = $dir . $pathEnd)) {
419
+ return $file;
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+
426
+ // PSR-4 fallback dirs
427
+ foreach ($this->fallbackDirsPsr4 as $dir) {
428
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
429
+ return $file;
430
+ }
431
+ }
432
+
433
+ // PSR-0 lookup
434
+ if (false !== $pos = strrpos($class, '\\')) {
435
+ // namespaced class name
436
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
437
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
438
+ } else {
439
+ // PEAR-like class name
440
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
441
+ }
442
+
443
+ if (isset($this->prefixesPsr0[$first])) {
444
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
445
+ if (0 === strpos($class, $prefix)) {
446
+ foreach ($dirs as $dir) {
447
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
448
+ return $file;
449
+ }
450
+ }
451
+ }
452
+ }
453
+ }
454
+
455
+ // PSR-0 fallback dirs
456
+ foreach ($this->fallbackDirsPsr0 as $dir) {
457
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
458
+ return $file;
459
+ }
460
+ }
461
+
462
+ // PSR-0 include paths.
463
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
464
+ return $file;
465
+ }
466
+
467
+ return false;
468
+ }
469
+ }
470
+
471
+ /**
472
+ * Scope isolated include.
473
+ *
474
+ * Prevents access to $this/self from included files.
475
+ */
476
+ function includeFile($file)
477
+ {
478
+ include $file;
479
+ }
{vendor → includes/vendor}/composer/LICENSE RENAMED
File without changes
includes/vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20' => $vendorDir . '/composer/autoload_real.php',
10
+ 'Composer\\Autoload\\ClassLoader' => $vendorDir . '/composer/ClassLoader.php',
11
+ 'Composer\\Autoload\\ComposerStaticInit5b236c569dd3ff8e1122a0229c295f20' => $vendorDir . '/composer/autoload_static.php',
12
+ 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
13
+ 'SimCal_WP_Requirements' => $baseDir . '/wp-requirements.php',
14
+ 'SimpleCalendar\\Abstracts\\Admin_Page' => $baseDir . '/abstracts/admin-page.php',
15
+ 'SimpleCalendar\\Abstracts\\Calendar' => $baseDir . '/abstracts/calendar.php',
16
+ 'SimpleCalendar\\Abstracts\\Calendar_View' => $baseDir . '/abstracts/calendar-view.php',
17
+ 'SimpleCalendar\\Abstracts\\Feed' => $baseDir . '/abstracts/feed.php',
18
+ 'SimpleCalendar\\Abstracts\\Field' => $baseDir . '/abstracts/field.php',
19
+ 'SimpleCalendar\\Abstracts\\Meta_Box' => $baseDir . '/abstracts/meta-box.php',
20
+ 'SimpleCalendar\\Abstracts\\Widget' => $baseDir . '/abstracts/widget.php',
21
+ 'SimpleCalendar\\Admin\\Ajax' => $baseDir . '/admin/ajax.php',
22
+ 'SimpleCalendar\\Admin\\Assets' => $baseDir . '/admin/assets.php',
23
+ 'SimpleCalendar\\Admin\\Bulk_Actions' => $baseDir . '/admin/bulk-actions.php',
24
+ 'SimpleCalendar\\Admin\\Fields\\Checkbox' => $baseDir . '/admin/fields/checkbox.php',
25
+ 'SimpleCalendar\\Admin\\Fields\\Date_Picker' => $baseDir . '/admin/fields/date-picker.php',
26
+ 'SimpleCalendar\\Admin\\Fields\\Datetime_Format' => $baseDir . '/admin/fields/datetime-format.php',
27
+ 'SimpleCalendar\\Admin\\Fields\\License' => $baseDir . '/admin/fields/license.php',
28
+ 'SimpleCalendar\\Admin\\Fields\\Nonce' => $baseDir . '/admin/fields/nonce.php',
29
+ 'SimpleCalendar\\Admin\\Fields\\Radio' => $baseDir . '/admin/fields/radio.php',
30
+ 'SimpleCalendar\\Admin\\Fields\\Select' => $baseDir . '/admin/fields/select.php',
31
+ 'SimpleCalendar\\Admin\\Fields\\Standard' => $baseDir . '/admin/fields/standard.php',
32
+ 'SimpleCalendar\\Admin\\Fields\\Textarea' => $baseDir . '/admin/fields/textarea.php',
33
+ 'SimpleCalendar\\Admin\\Menus' => $baseDir . '/admin/menus.php',
34
+ 'SimpleCalendar\\Admin\\Meta_Boxes' => $baseDir . '/admin/meta-boxes.php',
35
+ 'SimpleCalendar\\Admin\\Metaboxes\\Attach_Calendar' => $baseDir . '/admin/metaboxes/attach-calendar.php',
36
+ 'SimpleCalendar\\Admin\\Metaboxes\\Get_Shortcode' => $baseDir . '/admin/metaboxes/get-shortcode.php',
37
+ 'SimpleCalendar\\Admin\\Metaboxes\\Newsletter' => $baseDir . '/admin/metaboxes/newsletter.php',
38
+ 'SimpleCalendar\\Admin\\Metaboxes\\Settings' => $baseDir . '/admin/metaboxes/settings.php',
39
+ 'SimpleCalendar\\Admin\\Metaboxes\\Upgrade_To_Premium' => $baseDir . '/admin/metaboxes/upgrade-to-premium.php',
40
+ 'SimpleCalendar\\Admin\\Notice' => $baseDir . '/admin/notice.php',
41
+ 'SimpleCalendar\\Admin\\Notices' => $baseDir . '/admin/notices.php',
42
+ 'SimpleCalendar\\Admin\\Pages' => $baseDir . '/admin/pages.php',
43
+ 'SimpleCalendar\\Admin\\Pages\\Add_Ons' => $baseDir . '/admin/pages/add-ons.php',
44
+ 'SimpleCalendar\\Admin\\Pages\\Advanced' => $baseDir . '/admin/pages/advanced.php',
45
+ 'SimpleCalendar\\Admin\\Pages\\Calendars' => $baseDir . '/admin/pages/calendars.php',
46
+ 'SimpleCalendar\\Admin\\Pages\\Feeds' => $baseDir . '/admin/pages/feeds.php',
47
+ 'SimpleCalendar\\Admin\\Pages\\Licenses' => $baseDir . '/admin/pages/licenses.php',
48
+ 'SimpleCalendar\\Admin\\Pages\\System_Status' => $baseDir . '/admin/pages/system-status.php',
49
+ 'SimpleCalendar\\Admin\\Post_Types' => $baseDir . '/admin/post-types.php',
50
+ 'SimpleCalendar\\Admin\\Updater' => $baseDir . '/admin/updater.php',
51
+ 'SimpleCalendar\\Admin\\Welcome' => $baseDir . '/admin/welcome.php',
52
+ 'SimpleCalendar\\Ajax' => $baseDir . '/ajax.php',
53
+ 'SimpleCalendar\\Assets' => $baseDir . '/assets.php',
54
+ 'SimpleCalendar\\Browser' => $baseDir . '/browser.php',
55
+ 'SimpleCalendar\\Calendars\\Admin\\Default_Calendar_Admin' => $baseDir . '/calendars/admin/default-calendar-admin.php',
56
+ 'SimpleCalendar\\Calendars\\Default_Calendar' => $baseDir . '/calendars/default-calendar.php',
57
+ 'SimpleCalendar\\Calendars\\Views\\Default_Calendar_Grid' => $baseDir . '/calendars/views/default-calendar-grid.php',
58
+ 'SimpleCalendar\\Calendars\\Views\\Default_Calendar_List' => $baseDir . '/calendars/views/default-calendar-list.php',
59
+ 'SimpleCalendar\\Events\\Event' => $baseDir . '/events/event.php',
60
+ 'SimpleCalendar\\Events\\Event_Builder' => $baseDir . '/events/event-builder.php',
61
+ 'SimpleCalendar\\Events\\Events' => $baseDir . '/events/events.php',
62
+ 'SimpleCalendar\\Feeds\\Admin\\Google_Admin' => $baseDir . '/feeds/admin/google-admin.php',
63
+ 'SimpleCalendar\\Feeds\\Admin\\Grouped_Calendars_Admin' => $baseDir . '/feeds/admin/grouped-calendars-admin.php',
64
+ 'SimpleCalendar\\Feeds\\Google' => $baseDir . '/feeds/google.php',
65
+ 'SimpleCalendar\\Feeds\\Grouped_Calendars' => $baseDir . '/feeds/grouped-calendars.php',
66
+ 'SimpleCalendar\\Installation' => $baseDir . '/installation.php',
67
+ 'SimpleCalendar\\Objects' => $baseDir . '/objects.php',
68
+ 'SimpleCalendar\\Plugin' => $baseDir . '/main.php',
69
+ 'SimpleCalendar\\Post_Types' => $baseDir . '/post-types.php',
70
+ 'SimpleCalendar\\Shortcodes' => $baseDir . '/shortcodes.php',
71
+ 'SimpleCalendar\\Update' => $baseDir . '/update.php',
72
+ 'SimpleCalendar\\Updates\\Update_V210' => $baseDir . '/updates/update-v210.php',
73
+ 'SimpleCalendar\\Updates\\Update_V220' => $baseDir . '/updates/update-v220.php',
74
+ 'SimpleCalendar\\Updates\\Update_V300' => $baseDir . '/updates/update-v300.php',
75
+ 'SimpleCalendar\\Updates\\Update_V3013' => $baseDir . '/updates/update-v3013.php',
76
+ 'SimpleCalendar\\Widgets' => $baseDir . '/widgets.php',
77
+ 'SimpleCalendar\\Widgets\\Calendar' => $baseDir . '/widgets/calendar.php',
78
+ );
includes/vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
includes/vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
includes/vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ /**
17
+ * @return \Composer\Autoload\ClassLoader
18
+ */
19
+ public static function getLoader()
20
+ {
21
+ if (null !== self::$loader) {
22
+ return self::$loader;
23
+ }
24
+
25
+ spl_autoload_register(array('ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20', 'loadClassLoader'), true, true);
26
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20', 'loadClassLoader'));
28
+
29
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
+ if ($useStaticLoader) {
31
+ require __DIR__ . '/autoload_static.php';
32
+
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit5b236c569dd3ff8e1122a0229c295f20::getInitializer($loader));
34
+ } else {
35
+ $classMap = require __DIR__ . '/autoload_classmap.php';
36
+ if ($classMap) {
37
+ $loader->addClassMap($classMap);
38
+ }
39
+ }
40
+
41
+ $loader->setClassMapAuthoritative(true);
42
+ $loader->register(true);
43
+
44
+ return $loader;
45
+ }
46
+ }
includes/vendor/composer/autoload_static.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_static.php @generated by Composer
4
+
5
+ namespace Composer\Autoload;
6
+
7
+ class ComposerStaticInit5b236c569dd3ff8e1122a0229c295f20
8
+ {
9
+ public static $classMap = array (
10
+ 'ComposerAutoloaderInit5b236c569dd3ff8e1122a0229c295f20' => __DIR__ . '/..' . '/composer/autoload_real.php',
11
+ 'Composer\\Autoload\\ClassLoader' => __DIR__ . '/..' . '/composer/ClassLoader.php',
12
+ 'Composer\\Autoload\\ComposerStaticInit5b236c569dd3ff8e1122a0229c295f20' => __DIR__ . '/..' . '/composer/autoload_static.php',
13
+ 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
14
+ 'SimCal_WP_Requirements' => __DIR__ . '/../..' . '/wp-requirements.php',
15
+ 'SimpleCalendar\\Abstracts\\Admin_Page' => __DIR__ . '/../..' . '/abstracts/admin-page.php',
16
+ 'SimpleCalendar\\Abstracts\\Calendar' => __DIR__ . '/../..' . '/abstracts/calendar.php',
17
+ 'SimpleCalendar\\Abstracts\\Calendar_View' => __DIR__ . '/../..' . '/abstracts/calendar-view.php',
18
+ 'SimpleCalendar\\Abstracts\\Feed' => __DIR__ . '/../..' . '/abstracts/feed.php',
19
+ 'SimpleCalendar\\Abstracts\\Field' => __DIR__ . '/../..' . '/abstracts/field.php',
20
+ 'SimpleCalendar\\Abstracts\\Meta_Box' => __DIR__ . '/../..' . '/abstracts/meta-box.php',
21
+ 'SimpleCalendar\\Abstracts\\Widget' => __DIR__ . '/../..' . '/abstracts/widget.php',
22
+ 'SimpleCalendar\\Admin\\Ajax' => __DIR__ . '/../..' . '/admin/ajax.php',
23
+ 'SimpleCalendar\\Admin\\Assets' => __DIR__ . '/../..' . '/admin/assets.php',
24
+ 'SimpleCalendar\\Admin\\Bulk_Actions' => __DIR__ . '/../..' . '/admin/bulk-actions.php',
25
+ 'SimpleCalendar\\Admin\\Fields\\Checkbox' => __DIR__ . '/../..' . '/admin/fields/checkbox.php',
26
+ 'SimpleCalendar\\Admin\\Fields\\Date_Picker' => __DIR__ . '/../..' . '/admin/fields/date-picker.php',
27
+ 'SimpleCalendar\\Admin\\Fields\\Datetime_Format' => __DIR__ . '/../..' . '/admin/fields/datetime-format.php',
28
+ 'SimpleCalendar\\Admin\\Fields\\License' => __DIR__ . '/../..' . '/admin/fields/license.php',
29
+ 'SimpleCalendar\\Admin\\Fields\\Nonce' => __DIR__ . '/../..' . '/admin/fields/nonce.php',
30
+ 'SimpleCalendar\\Admin\\Fields\\Radio' => __DIR__ . '/../..' . '/admin/fields/radio.php',
31
+ 'SimpleCalendar\\Admin\\Fields\\Select' => __DIR__ . '/../..' . '/admin/fields/select.php',
32
+ 'SimpleCalendar\\Admin\\Fields\\Standard' => __DIR__ . '/../..' . '/admin/fields/standard.php',
33
+ 'SimpleCalendar\\Admin\\Fields\\Textarea' => __DIR__ . '/../..' . '/admin/fields/textarea.php',
34
+ 'SimpleCalendar\\Admin\\Menus' => __DIR__ . '/../..' . '/admin/menus.php',
35
+ 'SimpleCalendar\\Admin\\Meta_Boxes' => __DIR__ . '/../..' . '/admin/meta-boxes.php',
36
+ 'SimpleCalendar\\Admin\\Metaboxes\\Attach_Calendar' => __DIR__ . '/../..' . '/admin/metaboxes/attach-calendar.php',
37
+ 'SimpleCalendar\\Admin\\Metaboxes\\Get_Shortcode' => __DIR__ . '/../..' . '/admin/metaboxes/get-shortcode.php',
38
+ 'SimpleCalendar\\Admin\\Metaboxes\\Newsletter' => __DIR__ . '/../..' . '/admin/metaboxes/newsletter.php',
39
+ 'SimpleCalendar\\Admin\\Metaboxes\\Settings' => __DIR__ . '/../..' . '/admin/metaboxes/settings.php',
40
+ 'SimpleCalendar\\Admin\\Metaboxes\\Upgrade_To_Premium' => __DIR__ . '/../..' . '/admin/metaboxes/upgrade-to-premium.php',
41
+ 'SimpleCalendar\\Admin\\Notice' => __DIR__ . '/../..' . '/admin/notice.php',
42
+ 'SimpleCalendar\\Admin\\Notices' => __DIR__ . '/../..' . '/admin/notices.php',
43
+ 'SimpleCalendar\\Admin\\Pages' => __DIR__ . '/../..' . '/admin/pages.php',
44
+ 'SimpleCalendar\\Admin\\Pages\\Add_Ons' => __DIR__ . '/../..' . '/admin/pages/add-ons.php',
45
+ 'SimpleCalendar\\Admin\\Pages\\Advanced' => __DIR__ . '/../..' . '/admin/pages/advanced.php',
46
+ 'SimpleCalendar\\Admin\\Pages\\Calendars' => __DIR__ . '/../..' . '/admin/pages/calendars.php',
47
+ 'SimpleCalendar\\Admin\\Pages\\Feeds' => __DIR__ . '/../..' . '/admin/pages/feeds.php',
48
+ 'SimpleCalendar\\Admin\\Pages\\Licenses' => __DIR__ . '/../..' . '/admin/pages/licenses.php',
49
+ 'SimpleCalendar\\Admin\\Pages\\System_Status' => __DIR__ . '/../..' . '/admin/pages/system-status.php',
50
+ 'SimpleCalendar\\Admin\\Post_Types' => __DIR__ . '/../..' . '/admin/post-types.php',
51
+ 'SimpleCalendar\\Admin\\Updater' => __DIR__ . '/../..' . '/admin/updater.php',
52
+ 'SimpleCalendar\\Admin\\Welcome' => __DIR__ . '/../..' . '/admin/welcome.php',
53
+ 'SimpleCalendar\\Ajax' => __DIR__ . '/../..' . '/ajax.php',
54
+ 'SimpleCalendar\\Assets' => __DIR__ . '/../..' . '/assets.php',
55
+ 'SimpleCalendar\\Browser' => __DIR__ . '/../..' . '/browser.php',
56
+ 'SimpleCalendar\\Calendars\\Admin\\Default_Calendar_Admin' => __DIR__ . '/../..' . '/calendars/admin/default-calendar-admin.php',
57
+ 'SimpleCalendar\\Calendars\\Default_Calendar' => __DIR__ . '/../..' . '/calendars/default-calendar.php',
58
+ 'SimpleCalendar\\Calendars\\Views\\Default_Calendar_Grid' => __DIR__ . '/../..' . '/calendars/views/default-calendar-grid.php',
59
+ 'SimpleCalendar\\Calendars\\Views\\Default_Calendar_List' => __DIR__ . '/../..' . '/calendars/views/default-calendar-list.php',
60
+ 'SimpleCalendar\\Events\\Event' => __DIR__ . '/../..' . '/events/event.php',
61
+ 'SimpleCalendar\\Events\\Event_Builder' => __DIR__ . '/../..' . '/events/event-builder.php',
62
+ 'SimpleCalendar\\Events\\Events' => __DIR__ . '/../..' . '/events/events.php',
63
+ 'SimpleCalendar\\Feeds\\Admin\\Google_Admin' => __DIR__ . '/../..' . '/feeds/admin/google-admin.php',
64
+ 'SimpleCalendar\\Feeds\\Admin\\Grouped_Calendars_Admin' => __DIR__ . '/../..' . '/feeds/admin/grouped-calendars-admin.php',
65
+ 'SimpleCalendar\\Feeds\\Google' => __DIR__ . '/../..' . '/feeds/google.php',
66
+ 'SimpleCalendar\\Feeds\\Grouped_Calendars' => __DIR__ . '/../..' . '/feeds/grouped-calendars.php',
67
+ 'SimpleCalendar\\Installation' => __DIR__ . '/../..' . '/installation.php',
68
+ 'SimpleCalendar\\Objects' => __DIR__ . '/../..' . '/objects.php',
69
+ 'SimpleCalendar\\Plugin' => __DIR__ . '/../..' . '/main.php',
70
+ 'SimpleCalendar\\Post_Types' => __DIR__ . '/../..' . '/post-types.php',
71
+ 'SimpleCalendar\\Shortcodes' => __DIR__ . '/../..' . '/shortcodes.php',
72
+ 'SimpleCalendar\\Update' => __DIR__ . '/../..' . '/update.php',
73
+ 'SimpleCalendar\\Updates\\Update_V210' => __DIR__ . '/../..' . '/updates/update-v210.php',
74
+ 'SimpleCalendar\\Updates\\Update_V220' => __DIR__ . '/../..' . '/updates/update-v220.php',
75
+ 'SimpleCalendar\\Updates\\Update_V300' => __DIR__ . '/../..' . '/updates/update-v300.php',
76
+ 'SimpleCalendar\\Updates\\Update_V3013' => __DIR__ . '/../..' . '/updates/update-v3013.php',
77
+ 'SimpleCalendar\\Widgets' => __DIR__ . '/../..' . '/widgets.php',
78
+ 'SimpleCalendar\\Widgets\\Calendar' => __DIR__ . '/../..' . '/widgets/calendar.php',
79
+ );
80
+
81
+ public static function getInitializer(ClassLoader $loader)
82
+ {
83
+ return \Closure::bind(function () use ($loader) {
84
+ $loader->classMap = ComposerStaticInit5b236c569dd3ff8e1122a0229c295f20::$classMap;
85
+
86
+ }, null, ClassLoader::class);
87
+ }
88
+ }
package-lock.json CHANGED
@@ -1,15 +1,9 @@
1
  {
2
  "name": "Simple-Calendar",
3
- "version": "3.1.32",
4
  "lockfileVersion": 1,
5
  "requires": true,
6
  "dependencies": {
7
- "@types/color-name": {
8
- "version": "1.1.1",
9
- "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
10
- "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
11
- "dev": true
12
- },
13
  "abbrev": {
14
  "version": "1.1.1",
15
  "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -17,12 +11,12 @@
17
  "dev": true
18
  },
19
  "ajv": {
20
- "version": "6.6.1",
21
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz",
22
- "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==",
23
  "dev": true,
24
  "requires": {
25
- "fast-deep-equal": "^2.0.1",
26
  "fast-json-stable-stringify": "^2.0.0",
27
  "json-schema-traverse": "^0.4.1",
28
  "uri-js": "^4.2.2"
@@ -37,6 +31,17 @@
37
  "kind-of": "^3.0.2",
38
  "longest": "^1.0.1",
39
  "repeat-string": "^1.5.2"
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
  },
42
  "amdefine": {
@@ -52,12 +57,12 @@
52
  "dev": true
53
  },
54
  "ansi-styles": {
55
- "version": "3.2.1",
56
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
57
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
58
  "dev": true,
59
  "requires": {
60
- "color-convert": "^1.9.0"
61
  }
62
  },
63
  "aproba": {
@@ -68,7 +73,7 @@
68
  },
69
  "archiver": {
70
  "version": "1.3.0",
71
- "resolved": "http://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
72
  "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=",
73
  "dev": true,
74
  "requires": {
@@ -129,7 +134,7 @@
129
  "dependencies": {
130
  "sprintf-js": {
131
  "version": "1.0.3",
132
- "resolved": "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
133
  "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
134
  "dev": true
135
  }
@@ -227,7 +232,7 @@
227
  },
228
  "async": {
229
  "version": "1.5.2",
230
- "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz",
231
  "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
232
  "dev": true
233
  },
@@ -256,9 +261,9 @@
256
  "dev": true
257
  },
258
  "aws4": {
259
- "version": "1.8.0",
260
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
261
- "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
262
  "dev": true
263
  },
264
  "balanced-match": {
@@ -319,19 +324,13 @@
319
  "is-data-descriptor": "^1.0.0",
320
  "kind-of": "^6.0.2"
321
  }
322
- },
323
- "kind-of": {
324
- "version": "6.0.3",
325
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
326
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
327
- "dev": true
328
  }
329
  }
330
  },
331
  "base64-js": {
332
- "version": "1.3.1",
333
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
334
- "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
335
  "dev": true
336
  },
337
  "bcrypt-pbkdf": {
@@ -423,13 +422,13 @@
423
  }
424
  },
425
  "buffer": {
426
- "version": "5.6.0",
427
- "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
428
- "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
429
  "dev": true,
430
  "requires": {
431
- "base64-js": "^1.0.2",
432
- "ieee754": "^1.1.4"
433
  }
434
  },
435
  "buffer-alloc": {
@@ -466,12 +465,6 @@
466
  "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
467
  "dev": true
468
  },
469
- "builtin-modules": {
470
- "version": "1.1.1",
471
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
472
- "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
473
- "dev": true
474
- },
475
  "bytes": {
476
  "version": "1.0.0",
477
  "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
@@ -495,6 +488,16 @@
495
  "unset-value": "^1.0.0"
496
  }
497
  },
 
 
 
 
 
 
 
 
 
 
498
  "camelcase": {
499
  "version": "2.1.1",
500
  "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
@@ -503,7 +506,7 @@
503
  },
504
  "camelcase-keys": {
505
  "version": "2.1.0",
506
- "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
507
  "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
508
  "dev": true,
509
  "requires": {
@@ -535,33 +538,6 @@
535
  "requires": {
536
  "ansi-styles": "^4.1.0",
537
  "supports-color": "^7.1.0"
538
- },
539
- "dependencies": {
540
- "ansi-styles": {
541
- "version": "4.2.1",
542
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
543
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
544
- "dev": true,
545
- "requires": {
546
- "@types/color-name": "^1.1.1",
547
- "color-convert": "^2.0.1"
548
- }
549
- },
550
- "color-convert": {
551
- "version": "2.0.1",
552
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
553
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
554
- "dev": true,
555
- "requires": {
556
- "color-name": "~1.1.4"
557
- }
558
- },
559
- "color-name": {
560
- "version": "1.1.4",
561
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
562
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
563
- "dev": true
564
- }
565
  }
566
  },
567
  "chownr": {
@@ -619,22 +595,6 @@
619
  "requires": {
620
  "exit": "0.1.2",
621
  "glob": "^7.1.1"
622
- },
623
- "dependencies": {
624
- "glob": {
625
- "version": "7.1.3",
626
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
627
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
628
- "dev": true,
629
- "requires": {
630
- "fs.realpath": "^1.0.0",
631
- "inflight": "^1.0.4",
632
- "inherits": "2",
633
- "minimatch": "^3.0.4",
634
- "once": "^1.3.0",
635
- "path-is-absolute": "^1.0.0"
636
- }
637
- }
638
  }
639
  },
640
  "cliui": {
@@ -665,30 +625,30 @@
665
  }
666
  },
667
  "color-convert": {
668
- "version": "1.9.3",
669
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
670
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
671
  "dev": true,
672
  "requires": {
673
- "color-name": "1.1.3"
674
  }
675
  },
676
  "color-name": {
677
- "version": "1.1.3",
678
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
679
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
680
  "dev": true
681
  },
682
  "colors": {
683
  "version": "1.1.2",
684
- "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
685
  "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
686
  "dev": true
687
  },
688
  "combined-stream": {
689
- "version": "1.0.7",
690
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
691
- "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
692
  "dev": true,
693
  "requires": {
694
  "delayed-stream": "~1.0.0"
@@ -823,12 +783,12 @@
823
  "dev": true
824
  },
825
  "debug": {
826
- "version": "3.2.6",
827
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
828
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
829
  "dev": true,
830
  "requires": {
831
- "ms": "^2.1.1"
832
  }
833
  },
834
  "decamelize": {
@@ -907,12 +867,6 @@
907
  "is-data-descriptor": "^1.0.0",
908
  "kind-of": "^6.0.2"
909
  }
910
- },
911
- "kind-of": {
912
- "version": "6.0.3",
913
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
914
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
915
- "dev": true
916
  }
917
  }
918
  },
@@ -942,25 +896,25 @@
942
  "optional": true
943
  },
944
  "dom-serializer": {
945
- "version": "0.1.0",
946
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
947
- "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
948
  "dev": true,
949
  "requires": {
950
- "domelementtype": "~1.1.1",
951
- "entities": "~1.1.1"
952
  },
953
  "dependencies": {
954
  "domelementtype": {
955
- "version": "1.1.3",
956
- "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
957
- "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
958
  "dev": true
959
  },
960
  "entities": {
961
- "version": "1.1.2",
962
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
963
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
964
  "dev": true
965
  }
966
  }
@@ -1033,18 +987,17 @@
1033
  },
1034
  "entities": {
1035
  "version": "1.0.0",
1036
- "resolved": "http://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
1037
  "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
1038
  "dev": true
1039
  },
1040
  "error": {
1041
- "version": "7.0.2",
1042
- "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz",
1043
- "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=",
1044
  "dev": true,
1045
  "requires": {
1046
- "string-template": "~0.2.1",
1047
- "xtend": "~4.0.0"
1048
  }
1049
  },
1050
  "error-ex": {
@@ -1070,7 +1023,7 @@
1070
  },
1071
  "eventemitter2": {
1072
  "version": "0.4.14",
1073
- "resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
1074
  "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=",
1075
  "dev": true
1076
  },
@@ -1095,15 +1048,6 @@
1095
  "to-regex": "^3.0.1"
1096
  },
1097
  "dependencies": {
1098
- "debug": {
1099
- "version": "2.6.9",
1100
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1101
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1102
- "dev": true,
1103
- "requires": {
1104
- "ms": "2.0.0"
1105
- }
1106
- },
1107
  "define-property": {
1108
  "version": "0.2.5",
1109
  "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
@@ -1121,12 +1065,6 @@
1121
  "requires": {
1122
  "is-extendable": "^0.1.0"
1123
  }
1124
- },
1125
- "ms": {
1126
- "version": "2.0.0",
1127
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1128
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
1129
- "dev": true
1130
  }
1131
  }
1132
  },
@@ -1235,12 +1173,6 @@
1235
  "is-data-descriptor": "^1.0.0",
1236
  "kind-of": "^6.0.2"
1237
  }
1238
- },
1239
- "kind-of": {
1240
- "version": "6.0.3",
1241
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
1242
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
1243
- "dev": true
1244
  }
1245
  }
1246
  },
@@ -1251,15 +1183,15 @@
1251
  "dev": true
1252
  },
1253
  "fast-deep-equal": {
1254
- "version": "2.0.1",
1255
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
1256
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
1257
  "dev": true
1258
  },
1259
  "fast-json-stable-stringify": {
1260
- "version": "2.0.0",
1261
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
1262
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
1263
  "dev": true
1264
  },
1265
  "faye-websocket": {
@@ -1426,6 +1358,26 @@
1426
  "inherits": "~2.0.0",
1427
  "mkdirp": ">=0.5 0",
1428
  "rimraf": "2"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1429
  }
1430
  },
1431
  "function-bind": {
@@ -1465,6 +1417,17 @@
1465
  "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
1466
  "dev": true
1467
  },
 
 
 
 
 
 
 
 
 
 
 
1468
  "get-stdin": {
1469
  "version": "4.0.1",
1470
  "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@@ -1500,15 +1463,15 @@
1500
  "optional": true
1501
  },
1502
  "glob": {
1503
- "version": "7.0.6",
1504
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
1505
- "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=",
1506
  "dev": true,
1507
  "requires": {
1508
  "fs.realpath": "^1.0.0",
1509
  "inflight": "^1.0.4",
1510
  "inherits": "2",
1511
- "minimatch": "^3.0.2",
1512
  "once": "^1.3.0",
1513
  "path-is-absolute": "^1.0.0"
1514
  }
@@ -1538,36 +1501,20 @@
1538
  }
1539
  },
1540
  "globule": {
1541
- "version": "1.2.1",
1542
- "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
1543
- "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
1544
  "dev": true,
1545
  "requires": {
1546
  "glob": "~7.1.1",
1547
  "lodash": "~4.17.10",
1548
  "minimatch": "~3.0.2"
1549
- },
1550
- "dependencies": {
1551
- "glob": {
1552
- "version": "7.1.3",
1553
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1554
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1555
- "dev": true,
1556
- "requires": {
1557
- "fs.realpath": "^1.0.0",
1558
- "inflight": "^1.0.4",
1559
- "inherits": "2",
1560
- "minimatch": "^3.0.4",
1561
- "once": "^1.3.0",
1562
- "path-is-absolute": "^1.0.0"
1563
- }
1564
- }
1565
  }
1566
  },
1567
  "graceful-fs": {
1568
- "version": "4.1.15",
1569
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
1570
- "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
1571
  "dev": true
1572
  },
1573
  "grunt": {
@@ -1593,20 +1540,6 @@
1593
  "rimraf": "~3.0.2"
1594
  },
1595
  "dependencies": {
1596
- "glob": {
1597
- "version": "7.1.6",
1598
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
1599
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
1600
- "dev": true,
1601
- "requires": {
1602
- "fs.realpath": "^1.0.0",
1603
- "inflight": "^1.0.4",
1604
- "inherits": "2",
1605
- "minimatch": "^3.0.4",
1606
- "once": "^1.3.0",
1607
- "path-is-absolute": "^1.0.0"
1608
- }
1609
- },
1610
  "grunt-cli": {
1611
  "version": "1.3.2",
1612
  "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz",
@@ -1631,21 +1564,6 @@
1631
  }
1632
  }
1633
  }
1634
- },
1635
- "mkdirp": {
1636
- "version": "1.0.4",
1637
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
1638
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
1639
- "dev": true
1640
- },
1641
- "rimraf": {
1642
- "version": "3.0.2",
1643
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
1644
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
1645
- "dev": true,
1646
- "requires": {
1647
- "glob": "^7.1.3"
1648
- }
1649
  }
1650
  }
1651
  },
@@ -1666,7 +1584,7 @@
1666
  },
1667
  "chalk": {
1668
  "version": "1.1.3",
1669
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1670
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1671
  "dev": true,
1672
  "requires": {
@@ -1703,7 +1621,7 @@
1703
  },
1704
  "chalk": {
1705
  "version": "0.2.1",
1706
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz",
1707
  "integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=",
1708
  "dev": true,
1709
  "requires": {
@@ -1721,6 +1639,17 @@
1721
  "requires": {
1722
  "async": "^1.5.2",
1723
  "rimraf": "^2.5.1"
 
 
 
 
 
 
 
 
 
 
 
1724
  }
1725
  },
1726
  "grunt-contrib-compress": {
@@ -1745,7 +1674,7 @@
1745
  },
1746
  "chalk": {
1747
  "version": "1.1.3",
1748
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1749
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1750
  "dev": true,
1751
  "requires": {
@@ -1782,7 +1711,7 @@
1782
  },
1783
  "chalk": {
1784
  "version": "1.1.3",
1785
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1786
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1787
  "dev": true,
1788
  "requires": {
@@ -1812,6 +1741,15 @@
1812
  "maxmin": "^2.1.0"
1813
  },
1814
  "dependencies": {
 
 
 
 
 
 
 
 
 
1815
  "chalk": {
1816
  "version": "2.4.2",
1817
  "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -1823,69 +1761,27 @@
1823
  "supports-color": "^5.3.0"
1824
  }
1825
  },
1826
- "gzip-size": {
1827
- "version": "3.0.0",
1828
- "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
1829
- "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
1830
  "dev": true,
1831
  "requires": {
1832
- "duplexer": "^0.1.1"
1833
  }
1834
  },
 
 
 
 
 
 
1835
  "has-flag": {
1836
  "version": "3.0.0",
1837
  "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1838
  "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
1839
  "dev": true
1840
  },
1841
- "maxmin": {
1842
- "version": "2.1.0",
1843
- "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
1844
- "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=",
1845
- "dev": true,
1846
- "requires": {
1847
- "chalk": "^1.0.0",
1848
- "figures": "^1.0.1",
1849
- "gzip-size": "^3.0.0",
1850
- "pretty-bytes": "^3.0.0"
1851
- },
1852
- "dependencies": {
1853
- "ansi-styles": {
1854
- "version": "2.2.1",
1855
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
1856
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
1857
- "dev": true
1858
- },
1859
- "chalk": {
1860
- "version": "1.1.3",
1861
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1862
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1863
- "dev": true,
1864
- "requires": {
1865
- "ansi-styles": "^2.2.1",
1866
- "escape-string-regexp": "^1.0.2",
1867
- "has-ansi": "^2.0.0",
1868
- "strip-ansi": "^3.0.0",
1869
- "supports-color": "^2.0.0"
1870
- }
1871
- },
1872
- "supports-color": {
1873
- "version": "2.0.0",
1874
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
1875
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
1876
- "dev": true
1877
- }
1878
- }
1879
- },
1880
- "pretty-bytes": {
1881
- "version": "3.0.1",
1882
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
1883
- "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=",
1884
- "dev": true,
1885
- "requires": {
1886
- "number-is-nan": "^1.0.0"
1887
- }
1888
- },
1889
  "supports-color": {
1890
  "version": "5.5.0",
1891
  "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
@@ -1899,7 +1795,7 @@
1899
  },
1900
  "grunt-contrib-jshint": {
1901
  "version": "1.1.0",
1902
- "resolved": "http://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-1.1.0.tgz",
1903
  "integrity": "sha1-Np2QmyWTxA6L55lAshNAhQx5Oaw=",
1904
  "dev": true,
1905
  "requires": {
@@ -1916,7 +1812,7 @@
1916
  },
1917
  "chalk": {
1918
  "version": "1.1.3",
1919
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1920
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1921
  "dev": true,
1922
  "requires": {
@@ -1967,6 +1863,38 @@
1967
  "supports-color": "^2.0.0"
1968
  }
1969
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1970
  "supports-color": {
1971
  "version": "2.0.0",
1972
  "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
@@ -1988,12 +1916,12 @@
1988
  },
1989
  "dependencies": {
1990
  "async": {
1991
- "version": "2.6.1",
1992
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
1993
- "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
1994
  "dev": true,
1995
  "requires": {
1996
- "lodash": "^4.17.10"
1997
  }
1998
  }
1999
  }
@@ -2014,14 +1942,6 @@
2014
  "grunt-legacy-log-utils": "~2.1.0",
2015
  "hooker": "~0.2.3",
2016
  "lodash": "~4.17.19"
2017
- },
2018
- "dependencies": {
2019
- "lodash": {
2020
- "version": "4.17.20",
2021
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
2022
- "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
2023
- "dev": true
2024
- }
2025
  }
2026
  },
2027
  "grunt-legacy-log-utils": {
@@ -2032,14 +1952,6 @@
2032
  "requires": {
2033
  "chalk": "~4.1.0",
2034
  "lodash": "~4.17.19"
2035
- },
2036
- "dependencies": {
2037
- "lodash": {
2038
- "version": "4.17.20",
2039
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
2040
- "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
2041
- "dev": true
2042
- }
2043
  }
2044
  },
2045
  "grunt-legacy-util": {
@@ -2055,14 +1967,6 @@
2055
  "lodash": "~4.17.20",
2056
  "underscore.string": "~3.3.5",
2057
  "which": "~1.3.0"
2058
- },
2059
- "dependencies": {
2060
- "lodash": {
2061
- "version": "4.17.20",
2062
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
2063
- "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
2064
- "dev": true
2065
- }
2066
  }
2067
  },
2068
  "grunt-sass": {
@@ -2077,13 +1981,12 @@
2077
  }
2078
  },
2079
  "gzip-size": {
2080
- "version": "1.0.0",
2081
- "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz",
2082
- "integrity": "sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=",
2083
  "dev": true,
2084
  "requires": {
2085
- "browserify-zlib": "^0.1.4",
2086
- "concat-stream": "^1.4.1"
2087
  }
2088
  },
2089
  "har-schema": {
@@ -2093,15 +1996,24 @@
2093
  "dev": true
2094
  },
2095
  "har-validator": {
2096
- "version": "5.1.3",
2097
- "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
2098
- "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
2099
  "dev": true,
2100
  "requires": {
2101
- "ajv": "^6.5.5",
2102
  "har-schema": "^2.0.0"
2103
  }
2104
  },
 
 
 
 
 
 
 
 
 
2105
  "has-ansi": {
2106
  "version": "2.0.0",
2107
  "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
@@ -2183,14 +2095,14 @@
2183
  "dev": true
2184
  },
2185
  "hosted-git-info": {
2186
- "version": "2.7.1",
2187
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
2188
- "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
2189
  "dev": true
2190
  },
2191
  "htmlparser2": {
2192
  "version": "3.8.3",
2193
- "resolved": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
2194
  "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
2195
  "dev": true,
2196
  "requires": {
@@ -2209,7 +2121,7 @@
2209
  },
2210
  "readable-stream": {
2211
  "version": "1.1.14",
2212
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
2213
  "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
2214
  "dev": true,
2215
  "requires": {
@@ -2221,16 +2133,16 @@
2221
  },
2222
  "string_decoder": {
2223
  "version": "0.10.31",
2224
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
2225
  "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
2226
  "dev": true
2227
  }
2228
  }
2229
  },
2230
  "http-parser-js": {
2231
- "version": "0.5.0",
2232
- "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz",
2233
- "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==",
2234
  "dev": true
2235
  },
2236
  "http-signature": {
@@ -2254,9 +2166,9 @@
2254
  }
2255
  },
2256
  "ieee754": {
2257
- "version": "1.1.13",
2258
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
2259
- "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
2260
  "dev": true
2261
  },
2262
  "iltorb": {
@@ -2299,15 +2211,15 @@
2299
  }
2300
  },
2301
  "inherits": {
2302
- "version": "2.0.3",
2303
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
2304
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
2305
  "dev": true
2306
  },
2307
  "ini": {
2308
- "version": "1.3.5",
2309
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
2310
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
2311
  "dev": true
2312
  },
2313
  "interpret": {
@@ -2333,6 +2245,17 @@
2333
  "dev": true,
2334
  "requires": {
2335
  "kind-of": "^3.0.2"
 
 
 
 
 
 
 
 
 
 
 
2336
  }
2337
  },
2338
  "is-arrayish": {
@@ -2347,13 +2270,13 @@
2347
  "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
2348
  "dev": true
2349
  },
2350
- "is-builtin-module": {
2351
- "version": "1.0.0",
2352
- "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
2353
- "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
2354
  "dev": true,
2355
  "requires": {
2356
- "builtin-modules": "^1.0.0"
2357
  }
2358
  },
2359
  "is-data-descriptor": {
@@ -2363,6 +2286,17 @@
2363
  "dev": true,
2364
  "requires": {
2365
  "kind-of": "^3.0.2"
 
 
 
 
 
 
 
 
 
 
 
2366
  }
2367
  },
2368
  "is-descriptor": {
@@ -2397,13 +2331,10 @@
2397
  "dev": true
2398
  },
2399
  "is-finite": {
2400
- "version": "1.0.2",
2401
- "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
2402
- "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
2403
- "dev": true,
2404
- "requires": {
2405
- "number-is-nan": "^1.0.0"
2406
- }
2407
  },
2408
  "is-fullwidth-code-point": {
2409
  "version": "1.0.0",
@@ -2430,6 +2361,17 @@
2430
  "dev": true,
2431
  "requires": {
2432
  "kind-of": "^3.0.2"
 
 
 
 
 
 
 
 
 
 
 
2433
  }
2434
  },
2435
  "is-plain-object": {
@@ -2502,15 +2444,15 @@
2502
  "dev": true
2503
  },
2504
  "js-base64": {
2505
- "version": "2.6.2",
2506
- "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.2.tgz",
2507
- "integrity": "sha512-1hgLrLIrmCgZG+ID3VoLNLOSwjGnoZa8tyrUdEteMeIzsT6PH7PMLyUvbDwzNE56P3PNxyvuIOx4Uh2E5rzQIw==",
2508
  "dev": true
2509
  },
2510
  "js-yaml": {
2511
- "version": "3.14.0",
2512
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
2513
- "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
2514
  "dev": true,
2515
  "requires": {
2516
  "argparse": "^1.0.7",
@@ -2578,13 +2520,10 @@
2578
  }
2579
  },
2580
  "kind-of": {
2581
- "version": "3.2.2",
2582
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2583
- "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2584
- "dev": true,
2585
- "requires": {
2586
- "is-buffer": "^1.1.5"
2587
- }
2588
  },
2589
  "lazy-cache": {
2590
  "version": "1.0.4",
@@ -2651,7 +2590,7 @@
2651
  },
2652
  "load-json-file": {
2653
  "version": "1.1.0",
2654
- "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
2655
  "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
2656
  "dev": true,
2657
  "requires": {
@@ -2719,14 +2658,6 @@
2719
  "dev": true,
2720
  "requires": {
2721
  "kind-of": "^6.0.2"
2722
- },
2723
- "dependencies": {
2724
- "kind-of": {
2725
- "version": "6.0.3",
2726
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2727
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2728
- "dev": true
2729
- }
2730
  }
2731
  },
2732
  "map-cache": {
@@ -2751,15 +2682,15 @@
2751
  }
2752
  },
2753
  "maxmin": {
2754
- "version": "1.1.0",
2755
- "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz",
2756
- "integrity": "sha1-cTZehKmd2Piz99X94vANHn9zvmE=",
2757
  "dev": true,
2758
  "requires": {
2759
  "chalk": "^1.0.0",
2760
  "figures": "^1.0.1",
2761
- "gzip-size": "^1.0.0",
2762
- "pretty-bytes": "^1.0.0"
2763
  },
2764
  "dependencies": {
2765
  "ansi-styles": {
@@ -2770,7 +2701,7 @@
2770
  },
2771
  "chalk": {
2772
  "version": "1.1.3",
2773
- "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
2774
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
2775
  "dev": true,
2776
  "requires": {
@@ -2782,13 +2713,12 @@
2782
  }
2783
  },
2784
  "pretty-bytes": {
2785
- "version": "1.0.4",
2786
- "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
2787
- "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
2788
  "dev": true,
2789
  "requires": {
2790
- "get-stdin": "^4.0.1",
2791
- "meow": "^3.1.0"
2792
  }
2793
  },
2794
  "supports-color": {
@@ -2801,7 +2731,7 @@
2801
  },
2802
  "meow": {
2803
  "version": "3.7.0",
2804
- "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
2805
  "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
2806
  "dev": true,
2807
  "requires": {
@@ -2836,29 +2766,21 @@
2836
  "regex-not": "^1.0.0",
2837
  "snapdragon": "^0.8.1",
2838
  "to-regex": "^3.0.2"
2839
- },
2840
- "dependencies": {
2841
- "kind-of": {
2842
- "version": "6.0.3",
2843
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2844
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2845
- "dev": true
2846
- }
2847
  }
2848
  },
2849
  "mime-db": {
2850
- "version": "1.37.0",
2851
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
2852
- "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==",
2853
  "dev": true
2854
  },
2855
  "mime-types": {
2856
- "version": "2.1.21",
2857
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
2858
- "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
2859
  "dev": true,
2860
  "requires": {
2861
- "mime-db": "~1.37.0"
2862
  }
2863
  },
2864
  "mimic-response": {
@@ -2905,13 +2827,10 @@
2905
  }
2906
  },
2907
  "mkdirp": {
2908
- "version": "0.5.5",
2909
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
2910
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
2911
- "dev": true,
2912
- "requires": {
2913
- "minimist": "^1.2.5"
2914
- }
2915
  },
2916
  "mkdirp-classic": {
2917
  "version": "0.5.3",
@@ -2921,9 +2840,9 @@
2921
  "optional": true
2922
  },
2923
  "ms": {
2924
- "version": "2.1.1",
2925
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
2926
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
2927
  "dev": true
2928
  },
2929
  "multimatch": {
@@ -2939,11 +2858,10 @@
2939
  }
2940
  },
2941
  "nan": {
2942
- "version": "2.14.1",
2943
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
2944
- "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
2945
- "dev": true,
2946
- "optional": true
2947
  },
2948
  "nanomatch": {
2949
  "version": "1.2.13",
@@ -2962,14 +2880,6 @@
2962
  "regex-not": "^1.0.0",
2963
  "snapdragon": "^0.8.1",
2964
  "to-regex": "^3.0.1"
2965
- },
2966
- "dependencies": {
2967
- "kind-of": {
2968
- "version": "6.0.3",
2969
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2970
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2971
- "dev": true
2972
- }
2973
  }
2974
  },
2975
  "napi-build-utils": {
@@ -2980,9 +2890,9 @@
2980
  "optional": true
2981
  },
2982
  "node-abi": {
2983
- "version": "2.19.1",
2984
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.1.tgz",
2985
- "integrity": "sha512-HbtmIuByq44yhAzK7b9j/FelKlHYISKQn0mtvcBrU5QBkhoCMp5bu8Hv5AI34DcKfOAcJBcOEMwLlwO62FFu9A==",
2986
  "dev": true,
2987
  "optional": true,
2988
  "requires": {
@@ -3009,9 +2919,27 @@
3009
  "which": "1"
3010
  },
3011
  "dependencies": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3012
  "semver": {
3013
  "version": "5.3.0",
3014
- "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
3015
  "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
3016
  "dev": true
3017
  }
@@ -3061,11 +2989,14 @@
3061
  "supports-color": "^2.0.0"
3062
  }
3063
  },
3064
- "nan": {
3065
- "version": "2.14.1",
3066
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
3067
- "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
3068
- "dev": true
 
 
 
3069
  },
3070
  "supports-color": {
3071
  "version": "2.0.0",
@@ -3092,13 +3023,13 @@
3092
  }
3093
  },
3094
  "normalize-package-data": {
3095
- "version": "2.4.0",
3096
- "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
3097
- "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
3098
  "dev": true,
3099
  "requires": {
3100
  "hosted-git-info": "^2.1.4",
3101
- "is-builtin-module": "^1.0.0",
3102
  "semver": "2 || 3 || 4 || 5",
3103
  "validate-npm-package-license": "^3.0.1"
3104
  }
@@ -3161,6 +3092,15 @@
3161
  "requires": {
3162
  "is-descriptor": "^0.1.0"
3163
  }
 
 
 
 
 
 
 
 
 
3164
  }
3165
  }
3166
  },
@@ -3180,15 +3120,15 @@
3180
  }
3181
  },
3182
  "object.assign": {
3183
- "version": "4.1.0",
3184
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
3185
- "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
3186
  "dev": true,
3187
  "requires": {
3188
- "define-properties": "^1.1.2",
3189
- "function-bind": "^1.1.1",
3190
- "has-symbols": "^1.0.0",
3191
- "object-keys": "^1.0.11"
3192
  }
3193
  },
3194
  "object.defaults": {
@@ -3239,13 +3179,13 @@
3239
  },
3240
  "os-homedir": {
3241
  "version": "1.0.2",
3242
- "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
3243
  "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
3244
  "dev": true
3245
  },
3246
  "os-tmpdir": {
3247
  "version": "1.0.2",
3248
- "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
3249
  "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
3250
  "dev": true
3251
  },
@@ -3285,7 +3225,7 @@
3285
  },
3286
  "pako": {
3287
  "version": "0.2.9",
3288
- "resolved": "http://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
3289
  "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
3290
  "dev": true
3291
  },
@@ -3332,7 +3272,7 @@
3332
  },
3333
  "path-is-absolute": {
3334
  "version": "1.0.1",
3335
- "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
3336
  "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
3337
  "dev": true
3338
  },
@@ -3376,7 +3316,7 @@
3376
  },
3377
  "pify": {
3378
  "version": "2.3.0",
3379
- "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
3380
  "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
3381
  "dev": true
3382
  },
@@ -3411,9 +3351,9 @@
3411
  "dev": true
3412
  },
3413
  "prebuild-install": {
3414
- "version": "5.3.5",
3415
- "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.5.tgz",
3416
- "integrity": "sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw==",
3417
  "dev": true,
3418
  "optional": true,
3419
  "requires": {
@@ -3421,7 +3361,7 @@
3421
  "expand-template": "^2.0.3",
3422
  "github-from-package": "0.0.0",
3423
  "minimist": "^1.2.3",
3424
- "mkdirp": "^0.5.1",
3425
  "napi-build-utils": "^1.0.1",
3426
  "node-abi": "^2.7.0",
3427
  "noop-logger": "^0.1.1",
@@ -3432,27 +3372,18 @@
3432
  "tar-fs": "^2.0.0",
3433
  "tunnel-agent": "^0.6.0",
3434
  "which-pm-runs": "^1.0.0"
3435
- },
3436
- "dependencies": {
3437
- "minimist": {
3438
- "version": "1.2.5",
3439
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
3440
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
3441
- "dev": true,
3442
- "optional": true
3443
- }
3444
  }
3445
  },
3446
  "pretty-bytes": {
3447
  "version": "4.0.2",
3448
- "resolved": "http://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
3449
  "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
3450
  "dev": true
3451
  },
3452
  "process-nextick-args": {
3453
- "version": "2.0.0",
3454
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
3455
- "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
3456
  "dev": true
3457
  },
3458
  "pseudomap": {
@@ -3462,9 +3393,9 @@
3462
  "dev": true
3463
  },
3464
  "psl": {
3465
- "version": "1.1.31",
3466
- "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
3467
- "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==",
3468
  "dev": true
3469
  },
3470
  "pump": {
@@ -3485,9 +3416,9 @@
3485
  "dev": true
3486
  },
3487
  "qs": {
3488
- "version": "6.5.2",
3489
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
3490
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
3491
  "dev": true
3492
  },
3493
  "raw-body": {
@@ -3502,7 +3433,7 @@
3502
  "dependencies": {
3503
  "string_decoder": {
3504
  "version": "0.10.31",
3505
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
3506
  "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
3507
  "dev": true
3508
  }
@@ -3543,9 +3474,9 @@
3543
  }
3544
  },
3545
  "readable-stream": {
3546
- "version": "2.3.6",
3547
- "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
3548
- "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
3549
  "dev": true,
3550
  "requires": {
3551
  "core-util-is": "~1.0.0",
@@ -3614,9 +3545,9 @@
3614
  }
3615
  },
3616
  "request": {
3617
- "version": "2.88.0",
3618
- "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
3619
- "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
3620
  "dev": true,
3621
  "requires": {
3622
  "aws-sign2": "~0.7.0",
@@ -3626,7 +3557,7 @@
3626
  "extend": "~3.0.2",
3627
  "forever-agent": "~0.6.1",
3628
  "form-data": "~2.3.2",
3629
- "har-validator": "~5.1.0",
3630
  "http-signature": "~1.2.0",
3631
  "is-typedarray": "~1.0.0",
3632
  "isstream": "~0.1.2",
@@ -3636,9 +3567,17 @@
3636
  "performance-now": "^2.1.0",
3637
  "qs": "~6.5.2",
3638
  "safe-buffer": "^5.1.2",
3639
- "tough-cookie": "~2.4.3",
3640
  "tunnel-agent": "^0.6.0",
3641
  "uuid": "^3.3.2"
 
 
 
 
 
 
 
 
3642
  }
3643
  },
3644
  "require-directory": {
@@ -3654,11 +3593,12 @@
3654
  "dev": true
3655
  },
3656
  "resolve": {
3657
- "version": "1.17.0",
3658
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
3659
- "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
3660
  "dev": true,
3661
  "requires": {
 
3662
  "path-parse": "^1.0.6"
3663
  }
3664
  },
@@ -3709,12 +3649,12 @@
3709
  }
3710
  },
3711
  "rimraf": {
3712
- "version": "2.6.2",
3713
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
3714
- "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
3715
  "dev": true,
3716
  "requires": {
3717
- "glob": "^7.0.5"
3718
  }
3719
  },
3720
  "safe-buffer": {
@@ -3836,12 +3776,23 @@
3836
  "requires": {
3837
  "js-base64": "^2.1.8",
3838
  "source-map": "^0.4.2"
 
 
 
 
 
 
 
 
 
 
 
3839
  }
3840
  },
3841
  "semver": {
3842
- "version": "5.6.0",
3843
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
3844
- "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
3845
  "dev": true
3846
  },
3847
  "set-blocking": {
@@ -3881,14 +3832,14 @@
3881
  },
3882
  "shelljs": {
3883
  "version": "0.3.0",
3884
- "resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
3885
  "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
3886
  "dev": true
3887
  },
3888
  "signal-exit": {
3889
- "version": "3.0.2",
3890
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
3891
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
3892
  "dev": true
3893
  },
3894
  "simple-concat": {
@@ -3926,15 +3877,6 @@
3926
  "use": "^3.1.0"
3927
  },
3928
  "dependencies": {
3929
- "debug": {
3930
- "version": "2.6.9",
3931
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
3932
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
3933
- "dev": true,
3934
- "requires": {
3935
- "ms": "2.0.0"
3936
- }
3937
- },
3938
  "define-property": {
3939
  "version": "0.2.5",
3940
  "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
@@ -3952,18 +3894,6 @@
3952
  "requires": {
3953
  "is-extendable": "^0.1.0"
3954
  }
3955
- },
3956
- "ms": {
3957
- "version": "2.0.0",
3958
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
3959
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
3960
- "dev": true
3961
- },
3962
- "source-map": {
3963
- "version": "0.5.7",
3964
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
3965
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
3966
- "dev": true
3967
  }
3968
  }
3969
  },
@@ -4015,12 +3945,6 @@
4015
  "is-data-descriptor": "^1.0.0",
4016
  "kind-of": "^6.0.2"
4017
  }
4018
- },
4019
- "kind-of": {
4020
- "version": "6.0.3",
4021
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
4022
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
4023
- "dev": true
4024
  }
4025
  }
4026
  },
@@ -4031,16 +3955,24 @@
4031
  "dev": true,
4032
  "requires": {
4033
  "kind-of": "^3.2.0"
 
 
 
 
 
 
 
 
 
 
 
4034
  }
4035
  },
4036
  "source-map": {
4037
- "version": "0.4.4",
4038
- "resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
4039
- "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
4040
- "dev": true,
4041
- "requires": {
4042
- "amdefine": ">=0.0.4"
4043
- }
4044
  },
4045
  "source-map-resolve": {
4046
  "version": "0.5.3",
@@ -4062,9 +3994,9 @@
4062
  "dev": true
4063
  },
4064
  "spdx-correct": {
4065
- "version": "3.1.0",
4066
- "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
4067
- "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
4068
  "dev": true,
4069
  "requires": {
4070
  "spdx-expression-parse": "^3.0.0",
@@ -4072,15 +4004,15 @@
4072
  }
4073
  },
4074
  "spdx-exceptions": {
4075
- "version": "2.2.0",
4076
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
4077
- "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
4078
  "dev": true
4079
  },
4080
  "spdx-expression-parse": {
4081
- "version": "3.0.0",
4082
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
4083
- "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
4084
  "dev": true,
4085
  "requires": {
4086
  "spdx-exceptions": "^2.1.0",
@@ -4088,9 +4020,9 @@
4088
  }
4089
  },
4090
  "spdx-license-ids": {
4091
- "version": "3.0.2",
4092
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz",
4093
- "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==",
4094
  "dev": true
4095
  },
4096
  "split-string": {
@@ -4109,9 +4041,9 @@
4109
  "dev": true
4110
  },
4111
  "sshpk": {
4112
- "version": "1.15.2",
4113
- "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz",
4114
- "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==",
4115
  "dev": true,
4116
  "requires": {
4117
  "asn1": "~0.2.3",
@@ -4180,7 +4112,7 @@
4180
  },
4181
  "string_decoder": {
4182
  "version": "1.1.1",
4183
- "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
4184
  "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
4185
  "dev": true,
4186
  "requires": {
@@ -4189,7 +4121,7 @@
4189
  },
4190
  "strip-ansi": {
4191
  "version": "3.0.1",
4192
- "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
4193
  "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
4194
  "dev": true,
4195
  "requires": {
@@ -4242,16 +4174,16 @@
4242
  }
4243
  },
4244
  "tar-fs": {
4245
- "version": "2.1.0",
4246
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz",
4247
- "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==",
4248
  "dev": true,
4249
  "optional": true,
4250
  "requires": {
4251
  "chownr": "^1.1.1",
4252
  "mkdirp-classic": "^0.5.2",
4253
  "pump": "^3.0.0",
4254
- "tar-stream": "^2.0.0"
4255
  },
4256
  "dependencies": {
4257
  "bl": {
@@ -4264,15 +4196,6 @@
4264
  "buffer": "^5.5.0",
4265
  "inherits": "^2.0.4",
4266
  "readable-stream": "^3.4.0"
4267
- },
4268
- "dependencies": {
4269
- "inherits": {
4270
- "version": "2.0.4",
4271
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
4272
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
4273
- "dev": true,
4274
- "optional": true
4275
- }
4276
  }
4277
  },
4278
  "readable-stream": {
@@ -4288,9 +4211,9 @@
4288
  }
4289
  },
4290
  "tar-stream": {
4291
- "version": "2.1.4",
4292
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.4.tgz",
4293
- "integrity": "sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw==",
4294
  "dev": true,
4295
  "optional": true,
4296
  "requires": {
@@ -4336,6 +4259,23 @@
4336
  "livereload-js": "^2.3.0",
4337
  "object-assign": "^4.1.0",
4338
  "qs": "^6.4.0"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4339
  }
4340
  },
4341
  "to-buffer": {
@@ -4351,6 +4291,17 @@
4351
  "dev": true,
4352
  "requires": {
4353
  "kind-of": "^3.0.2"
 
 
 
 
 
 
 
 
 
 
 
4354
  }
4355
  },
4356
  "to-regex": {
@@ -4376,21 +4327,13 @@
4376
  }
4377
  },
4378
  "tough-cookie": {
4379
- "version": "2.4.3",
4380
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
4381
- "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
4382
  "dev": true,
4383
  "requires": {
4384
- "psl": "^1.1.24",
4385
- "punycode": "^1.4.1"
4386
- },
4387
- "dependencies": {
4388
- "punycode": {
4389
- "version": "1.4.1",
4390
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
4391
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
4392
- "dev": true
4393
- }
4394
  }
4395
  },
4396
  "trim-newlines": {
@@ -4406,22 +4349,6 @@
4406
  "dev": true,
4407
  "requires": {
4408
  "glob": "^7.1.2"
4409
- },
4410
- "dependencies": {
4411
- "glob": {
4412
- "version": "7.1.6",
4413
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
4414
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
4415
- "dev": true,
4416
- "requires": {
4417
- "fs.realpath": "^1.0.0",
4418
- "inflight": "^1.0.4",
4419
- "inherits": "2",
4420
- "minimatch": "^3.0.4",
4421
- "once": "^1.3.0",
4422
- "path-is-absolute": "^1.0.0"
4423
- }
4424
- }
4425
  }
4426
  },
4427
  "tunnel-agent": {
@@ -4454,14 +4381,6 @@
4454
  "source-map": "~0.5.1",
4455
  "uglify-to-browserify": "~1.0.0",
4456
  "yargs": "~3.10.0"
4457
- },
4458
- "dependencies": {
4459
- "source-map": {
4460
- "version": "0.5.7",
4461
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
4462
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
4463
- "dev": true
4464
- }
4465
  }
4466
  },
4467
  "uglify-to-browserify": {
@@ -4540,9 +4459,9 @@
4540
  }
4541
  },
4542
  "uri-js": {
4543
- "version": "4.2.2",
4544
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
4545
- "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
4546
  "dev": true,
4547
  "requires": {
4548
  "punycode": "^2.1.0"
@@ -4573,9 +4492,9 @@
4573
  "dev": true
4574
  },
4575
  "uuid": {
4576
- "version": "3.3.2",
4577
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
4578
- "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
4579
  "dev": true
4580
  },
4581
  "v8flags": {
@@ -4615,12 +4534,13 @@
4615
  "dev": true
4616
  },
4617
  "websocket-driver": {
4618
- "version": "0.7.0",
4619
- "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
4620
- "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
4621
  "dev": true,
4622
  "requires": {
4623
- "http-parser-js": ">=0.4.0",
 
4624
  "websocket-extensions": ">=0.1.1"
4625
  }
4626
  },
@@ -4690,6 +4610,30 @@
4690
  "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
4691
  "dev": true
4692
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4693
  "is-fullwidth-code-point": {
4694
  "version": "2.0.0",
4695
  "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
@@ -4725,15 +4669,15 @@
4725
  "dev": true
4726
  },
4727
  "xtend": {
4728
- "version": "4.0.1",
4729
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
4730
- "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
4731
  "dev": true
4732
  },
4733
  "y18n": {
4734
- "version": "4.0.0",
4735
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
4736
- "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
4737
  "dev": true
4738
  },
4739
  "yallist": {
1
  {
2
  "name": "Simple-Calendar",
3
+ "version": "3.1.35",
4
  "lockfileVersion": 1,
5
  "requires": true,
6
  "dependencies": {
 
 
 
 
 
 
7
  "abbrev": {
8
  "version": "1.1.1",
9
  "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
11
  "dev": true
12
  },
13
  "ajv": {
14
+ "version": "6.12.6",
15
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
16
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
17
  "dev": true,
18
  "requires": {
19
+ "fast-deep-equal": "^3.1.1",
20
  "fast-json-stable-stringify": "^2.0.0",
21
  "json-schema-traverse": "^0.4.1",
22
  "uri-js": "^4.2.2"
31
  "kind-of": "^3.0.2",
32
  "longest": "^1.0.1",
33
  "repeat-string": "^1.5.2"
34
+ },
35
+ "dependencies": {
36
+ "kind-of": {
37
+ "version": "3.2.2",
38
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
39
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
40
+ "dev": true,
41
+ "requires": {
42
+ "is-buffer": "^1.1.5"
43
+ }
44
+ }
45
  }
46
  },
47
  "amdefine": {
57
  "dev": true
58
  },
59
  "ansi-styles": {
60
+ "version": "4.3.0",
61
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
62
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
63
  "dev": true,
64
  "requires": {
65
+ "color-convert": "^2.0.1"
66
  }
67
  },
68
  "aproba": {
73
  },
74
  "archiver": {
75
  "version": "1.3.0",
76
+ "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
77
  "integrity": "sha1-TyGU1tj5nfP1MeaIHxTxXVX6ryI=",
78
  "dev": true,
79
  "requires": {
134
  "dependencies": {
135
  "sprintf-js": {
136
  "version": "1.0.3",
137
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
138
  "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
139
  "dev": true
140
  }
232
  },
233
  "async": {
234
  "version": "1.5.2",
235
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
236
  "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
237
  "dev": true
238
  },
261
  "dev": true
262
  },
263
  "aws4": {
264
+ "version": "1.11.0",
265
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
266
+ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
267
  "dev": true
268
  },
269
  "balanced-match": {
324
  "is-data-descriptor": "^1.0.0",
325
  "kind-of": "^6.0.2"
326
  }
 
 
 
 
 
 
327
  }
328
  }
329
  },
330
  "base64-js": {
331
+ "version": "1.5.1",
332
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
333
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
334
  "dev": true
335
  },
336
  "bcrypt-pbkdf": {
422
  }
423
  },
424
  "buffer": {
425
+ "version": "5.7.1",
426
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
427
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
428
  "dev": true,
429
  "requires": {
430
+ "base64-js": "^1.3.1",
431
+ "ieee754": "^1.1.13"
432
  }
433
  },
434
  "buffer-alloc": {
465
  "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
466
  "dev": true
467
  },
 
 
 
 
 
 
468
  "bytes": {
469
  "version": "1.0.0",
470
  "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
488
  "unset-value": "^1.0.0"
489
  }
490
  },
491
+ "call-bind": {
492
+ "version": "1.0.2",
493
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
494
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
495
+ "dev": true,
496
+ "requires": {
497
+ "function-bind": "^1.1.1",
498
+ "get-intrinsic": "^1.0.2"
499
+ }
500
+ },
501
  "camelcase": {
502
  "version": "2.1.1",
503
  "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
506
  },
507
  "camelcase-keys": {
508
  "version": "2.1.0",
509
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
510
  "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
511
  "dev": true,
512
  "requires": {
538
  "requires": {
539
  "ansi-styles": "^4.1.0",
540
  "supports-color": "^7.1.0"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
541
  }
542
  },
543
  "chownr": {
595
  "requires": {
596
  "exit": "0.1.2",
597
  "glob": "^7.1.1"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
599
  },
600
  "cliui": {
625
  }
626
  },
627
  "color-convert": {
628
+ "version": "2.0.1",
629
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
630
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
631
  "dev": true,
632
  "requires": {
633
+ "color-name": "~1.1.4"
634
  }
635
  },
636
  "color-name": {
637
+ "version": "1.1.4",
638
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
639
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
640
  "dev": true
641
  },
642
  "colors": {
643
  "version": "1.1.2",
644
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
645
  "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
646
  "dev": true
647
  },
648
  "combined-stream": {
649
+ "version": "1.0.8",
650
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
651
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
652
  "dev": true,
653
  "requires": {
654
  "delayed-stream": "~1.0.0"
783
  "dev": true
784
  },
785
  "debug": {
786
+ "version": "2.6.9",
787
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
788
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
789
  "dev": true,
790
  "requires": {
791
+ "ms": "2.0.0"
792
  }
793
  },
794
  "decamelize": {
867
  "is-data-descriptor": "^1.0.0",
868
  "kind-of": "^6.0.2"
869
  }
 
 
 
 
 
 
870
  }
871
  }
872
  },
896
  "optional": true
897
  },
898
  "dom-serializer": {
899
+ "version": "0.2.2",
900
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
901
+ "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
902
  "dev": true,
903
  "requires": {
904
+ "domelementtype": "^2.0.1",
905
+ "entities": "^2.0.0"
906
  },
907
  "dependencies": {
908
  "domelementtype": {
909
+ "version": "2.1.0",
910
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz",
911
+ "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==",
912
  "dev": true
913
  },
914
  "entities": {
915
+ "version": "2.1.0",
916
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
917
+ "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
918
  "dev": true
919
  }
920
  }
987
  },
988
  "entities": {
989
  "version": "1.0.0",
990
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
991
  "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=",
992
  "dev": true
993
  },
994
  "error": {
995
+ "version": "7.2.1",
996
+ "resolved": "https://registry.npmjs.org/error/-/error-7.2.1.tgz",
997
+ "integrity": "sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA==",
998
  "dev": true,
999
  "requires": {
1000
+ "string-template": "~0.2.1"
 
1001
  }
1002
  },
1003
  "error-ex": {
1023
  },
1024
  "eventemitter2": {
1025
  "version": "0.4.14",
1026
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
1027
  "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=",
1028
  "dev": true
1029
  },
1048
  "to-regex": "^3.0.1"
1049
  },
1050
  "dependencies": {
 
 
 
 
 
 
 
 
 
1051
  "define-property": {
1052
  "version": "0.2.5",
1053
  "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
1065
  "requires": {
1066
  "is-extendable": "^0.1.0"
1067
  }
 
 
 
 
 
 
1068
  }
1069
  }
1070
  },
1173
  "is-data-descriptor": "^1.0.0",
1174
  "kind-of": "^6.0.2"
1175
  }
 
 
 
 
 
 
1176
  }
1177
  }
1178
  },
1183
  "dev": true
1184
  },
1185
  "fast-deep-equal": {
1186
+ "version": "3.1.3",
1187
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
1188
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
1189
  "dev": true
1190
  },
1191
  "fast-json-stable-stringify": {
1192
+ "version": "2.1.0",
1193
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
1194
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
1195
  "dev": true
1196
  },
1197
  "faye-websocket": {
1358
  "inherits": "~2.0.0",
1359
  "mkdirp": ">=0.5 0",
1360
  "rimraf": "2"
1361
+ },
1362
+ "dependencies": {
1363
+ "mkdirp": {
1364
+ "version": "0.5.5",
1365
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
1366
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
1367
+ "dev": true,
1368
+ "requires": {
1369
+ "minimist": "^1.2.5"
1370
+ }
1371
+ },
1372
+ "rimraf": {
1373
+ "version": "2.7.1",
1374
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
1375
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
1376
+ "dev": true,
1377
+ "requires": {
1378
+ "glob": "^7.1.3"
1379
+ }
1380
+ }
1381
  }
1382
  },
1383
  "function-bind": {
1417
  "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
1418
  "dev": true
1419
  },
1420
+ "get-intrinsic": {
1421
+ "version": "1.0.2",
1422
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz",
1423
+ "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==",
1424
+ "dev": true,
1425
+ "requires": {
1426
+ "function-bind": "^1.1.1",
1427
+ "has": "^1.0.3",
1428
+ "has-symbols": "^1.0.1"
1429
+ }
1430
+ },
1431
  "get-stdin": {
1432
  "version": "4.0.1",
1433
  "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
1463
  "optional": true
1464
  },
1465
  "glob": {
1466
+ "version": "7.1.6",
1467
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
1468
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
1469
  "dev": true,
1470
  "requires": {
1471
  "fs.realpath": "^1.0.0",
1472
  "inflight": "^1.0.4",
1473
  "inherits": "2",
1474
+ "minimatch": "^3.0.4",
1475
  "once": "^1.3.0",
1476
  "path-is-absolute": "^1.0.0"
1477
  }
1501
  }
1502
  },
1503
  "globule": {
1504
+ "version": "1.3.2",
1505
+ "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz",
1506
+ "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==",
1507
  "dev": true,
1508
  "requires": {
1509
  "glob": "~7.1.1",
1510
  "lodash": "~4.17.10",
1511
  "minimatch": "~3.0.2"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1512
  }
1513
  },
1514
  "graceful-fs": {
1515
+ "version": "4.2.4",
1516
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
1517
+ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
1518
  "dev": true
1519
  },
1520
  "grunt": {
1540
  "rimraf": "~3.0.2"
1541
  },
1542
  "dependencies": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1543
  "grunt-cli": {
1544
  "version": "1.3.2",
1545
  "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz",
1564
  }
1565
  }
1566
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1567
  }
1568
  }
1569
  },
1584
  },
1585
  "chalk": {
1586
  "version": "1.1.3",
1587
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1588
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1589
  "dev": true,
1590
  "requires": {
1621
  },
1622
  "chalk": {
1623
  "version": "0.2.1",
1624
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.2.1.tgz",
1625
  "integrity": "sha1-dhPhV1FFshOGSD9/SFql/6jL0Qw=",
1626
  "dev": true,
1627
  "requires": {
1639
  "requires": {
1640
  "async": "^1.5.2",
1641
  "rimraf": "^2.5.1"
1642
+ },
1643
+ "dependencies": {
1644
+ "rimraf": {
1645
+ "version": "2.7.1",
1646
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
1647
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
1648
+ "dev": true,
1649
+ "requires": {
1650
+ "glob": "^7.1.3"
1651
+ }
1652
+ }
1653
  }
1654
  },
1655
  "grunt-contrib-compress": {
1674
  },
1675
  "chalk": {
1676
  "version": "1.1.3",
1677
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1678
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1679
  "dev": true,
1680
  "requires": {
1711
  },
1712
  "chalk": {
1713
  "version": "1.1.3",
1714
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1715
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1716
  "dev": true,
1717
  "requires": {
1741
  "maxmin": "^2.1.0"
1742
  },
1743
  "dependencies": {
1744
+ "ansi-styles": {
1745
+ "version": "3.2.1",
1746
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1747
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
1748
+ "dev": true,
1749
+ "requires": {
1750
+ "color-convert": "^1.9.0"
1751
+ }
1752
+ },
1753
  "chalk": {
1754
  "version": "2.4.2",
1755
  "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1761
  "supports-color": "^5.3.0"
1762
  }
1763
  },
1764
+ "color-convert": {
1765
+ "version": "1.9.3",
1766
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
1767
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
1768
  "dev": true,
1769
  "requires": {
1770
+ "color-name": "1.1.3"
1771
  }
1772
  },
1773
+ "color-name": {
1774
+ "version": "1.1.3",
1775
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
1776
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
1777
+ "dev": true
1778
+ },
1779
  "has-flag": {
1780
  "version": "3.0.0",
1781
  "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1782
  "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
1783
  "dev": true
1784
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1785
  "supports-color": {
1786
  "version": "5.5.0",
1787
  "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1795
  },
1796
  "grunt-contrib-jshint": {
1797
  "version": "1.1.0",
1798
+ "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-1.1.0.tgz",
1799
  "integrity": "sha1-Np2QmyWTxA6L55lAshNAhQx5Oaw=",
1800
  "dev": true,
1801
  "requires": {
1812
  },
1813
  "chalk": {
1814
  "version": "1.1.3",
1815
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
1816
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
1817
  "dev": true,
1818
  "requires": {
1863
  "supports-color": "^2.0.0"
1864
  }
1865
  },
1866
+ "gzip-size": {
1867
+ "version": "1.0.0",
1868
+ "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz",
1869
+ "integrity": "sha1-Zs+LEBBHInuVus5uodoMF37Vwi8=",
1870
+ "dev": true,
1871
+ "requires": {
1872
+ "browserify-zlib": "^0.1.4",
1873
+ "concat-stream": "^1.4.1"
1874
+ }
1875
+ },
1876
+ "maxmin": {
1877
+ "version": "1.1.0",
1878
+ "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz",
1879
+ "integrity": "sha1-cTZehKmd2Piz99X94vANHn9zvmE=",
1880
+ "dev": true,
1881
+ "requires": {
1882
+ "chalk": "^1.0.0",
1883
+ "figures": "^1.0.1",
1884
+ "gzip-size": "^1.0.0",
1885
+ "pretty-bytes": "^1.0.0"
1886
+ }
1887
+ },
1888
+ "pretty-bytes": {
1889
+ "version": "1.0.4",
1890
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz",
1891
+ "integrity": "sha1-CiLoIQYJrTVUL4yNXSFZr/B1HIQ=",
1892
+ "dev": true,
1893
+ "requires": {
1894
+ "get-stdin": "^4.0.1",
1895
+ "meow": "^3.1.0"
1896
+ }
1897
+ },
1898
  "supports-color": {
1899
  "version": "2.0.0",
1900
  "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
1916
  },
1917
  "dependencies": {
1918
  "async": {
1919
+ "version": "2.6.3",
1920
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
1921
+ "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
1922
  "dev": true,
1923
  "requires": {
1924
+ "lodash": "^4.17.14"
1925
  }
1926
  }
1927
  }
1942
  "grunt-legacy-log-utils": "~2.1.0",
1943
  "hooker": "~0.2.3",
1944
  "lodash": "~4.17.19"
 
 
 
 
 
 
 
 
1945
  }
1946
  },
1947
  "grunt-legacy-log-utils": {
1952
  "requires": {
1953
  "chalk": "~4.1.0",
1954
  "lodash": "~4.17.19"
 
 
 
 
 
 
 
 
1955
  }
1956
  },
1957
  "grunt-legacy-util": {
1967
  "lodash": "~4.17.20",
1968
  "underscore.string": "~3.3.5",
1969
  "which": "~1.3.0"
 
 
 
 
 
 
 
 
1970
  }
1971
  },
1972
  "grunt-sass": {
1981
  }
1982
  },
1983
  "gzip-size": {
1984
+ "version": "3.0.0",
1985
+ "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
1986
+ "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
1987
  "dev": true,
1988
  "requires": {
1989
+ "duplexer": "^0.1.1"
 
1990
  }
1991
  },
1992
  "har-schema": {
1996
  "dev": true
1997
  },
1998
  "har-validator": {
1999
+ "version": "5.1.5",
2000
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
2001
+ "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
2002
  "dev": true,
2003
  "requires": {
2004
+ "ajv": "^6.12.3",
2005
  "har-schema": "^2.0.0"
2006
  }
2007
  },
2008
+ "has": {
2009
+ "version": "1.0.3",
2010
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
2011
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
2012
+ "dev": true,
2013
+ "requires": {
2014
+ "function-bind": "^1.1.1"
2015
+ }
2016
+ },
2017
  "has-ansi": {
2018
  "version": "2.0.0",
2019
  "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
2095
  "dev": true
2096
  },
2097
  "hosted-git-info": {
2098
+ "version": "2.8.8",
2099
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
2100
+ "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
2101
  "dev": true
2102
  },
2103
  "htmlparser2": {
2104
  "version": "3.8.3",
2105
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
2106
  "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
2107
  "dev": true,
2108
  "requires": {
2121
  },
2122
  "readable-stream": {
2123
  "version": "1.1.14",
2124
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
2125
  "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
2126
  "dev": true,
2127
  "requires": {
2133
  },
2134
  "string_decoder": {
2135
  "version": "0.10.31",
2136
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
2137
  "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
2138
  "dev": true
2139
  }
2140
  }
2141
  },
2142
  "http-parser-js": {
2143
+ "version": "0.5.3",
2144
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz",
2145
+ "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==",
2146
  "dev": true
2147
  },
2148
  "http-signature": {
2166
  }
2167
  },
2168
  "ieee754": {
2169
+ "version": "1.2.1",
2170
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
2171
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
2172
  "dev": true
2173
  },
2174
  "iltorb": {
2211
  }
2212
  },
2213
  "inherits": {
2214
+ "version": "2.0.4",
2215
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
2216
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
2217
  "dev": true
2218
  },
2219
  "ini": {
2220
+ "version": "1.3.8",
2221
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
2222
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
2223
  "dev": true
2224
  },
2225
  "interpret": {
2245
  "dev": true,
2246
  "requires": {
2247
  "kind-of": "^3.0.2"
2248
+ },
2249
+ "dependencies": {
2250
+ "kind-of": {
2251
+ "version": "3.2.2",
2252
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2253
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2254
+ "dev": true,
2255
+ "requires": {
2256
+ "is-buffer": "^1.1.5"
2257
+ }
2258
+ }
2259
  }
2260
  },
2261
  "is-arrayish": {
2270
  "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
2271
  "dev": true
2272
  },
2273
+ "is-core-module": {
2274
+ "version": "2.2.0",
2275
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
2276
+ "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
2277
  "dev": true,
2278
  "requires": {
2279
+ "has": "^1.0.3"
2280
  }
2281
  },
2282
  "is-data-descriptor": {
2286
  "dev": true,
2287
  "requires": {
2288
  "kind-of": "^3.0.2"
2289
+ },
2290
+ "dependencies": {
2291
+ "kind-of": {
2292
+ "version": "3.2.2",
2293
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2294
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2295
+ "dev": true,
2296
+ "requires": {
2297
+ "is-buffer": "^1.1.5"
2298
+ }
2299
+ }
2300
  }
2301
  },
2302
  "is-descriptor": {
2331
  "dev": true
2332
  },
2333
  "is-finite": {
2334
+ "version": "1.1.0",
2335
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
2336
+ "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
2337
+ "dev": true
 
 
 
2338
  },
2339
  "is-fullwidth-code-point": {
2340
  "version": "1.0.0",
2361
  "dev": true,
2362
  "requires": {
2363
  "kind-of": "^3.0.2"
2364
+ },
2365
+ "dependencies": {
2366
+ "kind-of": {
2367
+ "version": "3.2.2",
2368
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
2369
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
2370
+ "dev": true,
2371
+ "requires": {
2372
+ "is-buffer": "^1.1.5"
2373
+ }
2374
+ }
2375
  }
2376
  },
2377
  "is-plain-object": {
2444
  "dev": true
2445
  },
2446
  "js-base64": {
2447
+ "version": "2.6.4",
2448
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
2449
+ "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
2450
  "dev": true
2451
  },
2452
  "js-yaml": {
2453
+ "version": "3.14.1",
2454
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
2455
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
2456
  "dev": true,
2457
  "requires": {
2458
  "argparse": "^1.0.7",
2520
  }
2521
  },
2522
  "kind-of": {
2523
+ "version": "6.0.3",
2524
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
2525
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
2526
+ "dev": true
 
 
 
2527
  },
2528
  "lazy-cache": {
2529
  "version": "1.0.4",
2590
  },
2591
  "load-json-file": {
2592
  "version": "1.1.0",
2593
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
2594
  "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
2595
  "dev": true,
2596
  "requires": {
2658
  "dev": true,
2659
  "requires": {
2660
  "kind-of": "^6.0.2"
 
 
 
 
 
 
 
 
2661
  }
2662
  },
2663
  "map-cache": {
2682
  }
2683
  },
2684
  "maxmin": {
2685
+ "version": "2.1.0",
2686
+ "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
2687
+ "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=",
2688
  "dev": true,
2689
  "requires": {
2690
  "chalk": "^1.0.0",
2691
  "figures": "^1.0.1",
2692
+ "gzip-size": "^3.0.0",
2693
+ "pretty-bytes": "^3.0.0"
2694
  },
2695
  "dependencies": {
2696
  "ansi-styles": {
2701
  },
2702
  "chalk": {
2703
  "version": "1.1.3",
2704
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
2705
  "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
2706
  "dev": true,
2707
  "requires": {
2713
  }
2714
  },
2715
  "pretty-bytes": {
2716
+ "version": "3.0.1",
2717
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
2718
+ "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=",
2719
  "dev": true,
2720
  "requires": {
2721
+ "number-is-nan": "^1.0.0"
 
2722
  }
2723
  },
2724
  "supports-color": {
2731
  },
2732
  "meow": {
2733
  "version": "3.7.0",
2734
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
2735
  "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
2736
  "dev": true,
2737
  "requires": {
2766
  "regex-not": "^1.0.0",
2767
  "snapdragon": "^0.8.1",
2768
  "to-regex": "^3.0.2"
 
 
 
 
 
 
 
 
2769
  }
2770
  },
2771
  "mime-db": {
2772
+ "version": "1.45.0",
2773
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
2774
+ "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
2775
  "dev": true
2776
  },
2777
  "mime-types": {
2778
+ "version": "2.1.28",
2779
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
2780
+ "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
2781
  "dev": true,
2782
  "requires": {
2783
+ "mime-db": "1.45.0"
2784
  }
2785
  },
2786
  "mimic-response": {
2827
  }
2828
  },
2829
  "mkdirp": {
2830
+ "version": "1.0.4",
2831
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
2832
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
2833
+ "dev": true
 
 
 
2834
  },
2835
  "mkdirp-classic": {
2836
  "version": "0.5.3",
2840
  "optional": true
2841
  },
2842
  "ms": {
2843
+ "version": "2.0.0",
2844
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2845
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
2846
  "dev": true
2847
  },
2848
  "multimatch": {
2858
  }
2859
  },
2860
  "nan": {
2861
+ "version": "2.14.2",
2862
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
2863
+ "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
2864
+ "dev": true
 
2865
  },
2866
  "nanomatch": {
2867
  "version": "1.2.13",
2880
  "regex-not": "^1.0.0",
2881
  "snapdragon": "^0.8.1",
2882
  "to-regex": "^3.0.1"
 
 
 
 
 
 
 
 
2883
  }
2884
  },
2885
  "napi-build-utils": {
2890
  "optional": true
2891
  },
2892
  "node-abi": {
2893
+ "version": "2.19.3",
2894
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz",
2895
+ "integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==",
2896
  "dev": true,
2897
  "optional": true,
2898
  "requires": {
2919
  "which": "1"
2920
  },
2921
  "dependencies": {
2922
+ "mkdirp": {
2923
+ "version": "0.5.5",
2924
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
2925
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
2926
+ "dev": true,
2927
+ "requires": {
2928
+ "minimist": "^1.2.5"
2929
+ }
2930
+ },
2931
+ "rimraf": {
2932
+ "version": "2.7.1",
2933
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
2934
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
2935
+ "dev": true,
2936
+ "requires": {
2937
+ "glob": "^7.1.3"
2938
+ }
2939
+ },
2940
  "semver": {
2941
  "version": "5.3.0",
2942
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
2943
  "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
2944
  "dev": true
2945
  }
2989
  "supports-color": "^2.0.0"
2990
  }
2991
  },
2992
+ "mkdirp": {
2993
+ "version": "0.5.5",
2994
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
2995
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
2996
+ "dev": true,
2997
+ "requires": {
2998
+ "minimist": "^1.2.5"
2999
+ }
3000
  },
3001
  "supports-color": {
3002
  "version": "2.0.0",
3023
  }
3024
  },
3025
  "normalize-package-data": {
3026
+ "version": "2.5.0",
3027
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
3028
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
3029
  "dev": true,
3030
  "requires": {
3031
  "hosted-git-info": "^2.1.4",
3032
+ "resolve": "^1.10.0",
3033
  "semver": "2 || 3 || 4 || 5",
3034
  "validate-npm-package-license": "^3.0.1"
3035
  }
3092
  "requires": {
3093
  "is-descriptor": "^0.1.0"
3094
  }
3095
+ },
3096
+ "kind-of": {
3097
+ "version": "3.2.2",
3098
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3099
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3100
+ "dev": true,
3101
+ "requires": {
3102
+ "is-buffer": "^1.1.5"
3103
+ }
3104
  }
3105
  }
3106
  },
3120
  }
3121
  },
3122
  "object.assign": {
3123
+ "version": "4.1.2",
3124
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
3125
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
3126
  "dev": true,
3127
  "requires": {
3128
+ "call-bind": "^1.0.0",
3129
+ "define-properties": "^1.1.3",
3130
+ "has-symbols": "^1.0.1",
3131
+ "object-keys": "^1.1.1"
3132
  }
3133
  },
3134
  "object.defaults": {
3179
  },
3180
  "os-homedir": {
3181
  "version": "1.0.2",
3182
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
3183
  "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
3184
  "dev": true
3185
  },
3186
  "os-tmpdir": {
3187
  "version": "1.0.2",
3188
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
3189
  "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
3190
  "dev": true
3191
  },
3225
  },
3226
  "pako": {
3227
  "version": "0.2.9",
3228
+ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
3229
  "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=",
3230
  "dev": true
3231
  },
3272
  },
3273
  "path-is-absolute": {
3274
  "version": "1.0.1",
3275
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
3276
  "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
3277
  "dev": true
3278
  },
3316
  },
3317
  "pify": {
3318
  "version": "2.3.0",
3319
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
3320
  "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
3321
  "dev": true
3322
  },
3351
  "dev": true
3352
  },
3353
  "prebuild-install": {
3354
+ "version": "5.3.6",
3355
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.6.tgz",
3356
+ "integrity": "sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg==",
3357
  "dev": true,
3358
  "optional": true,
3359
  "requires": {
3361
  "expand-template": "^2.0.3",
3362
  "github-from-package": "0.0.0",
3363
  "minimist": "^1.2.3",
3364
+ "mkdirp-classic": "^0.5.3",
3365
  "napi-build-utils": "^1.0.1",
3366
  "node-abi": "^2.7.0",
3367
  "noop-logger": "^0.1.1",
3372
  "tar-fs": "^2.0.0",
3373
  "tunnel-agent": "^0.6.0",
3374
  "which-pm-runs": "^1.0.0"
 
 
 
 
 
 
 
 
 
3375
  }
3376
  },
3377
  "pretty-bytes": {
3378
  "version": "4.0.2",
3379
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-4.0.2.tgz",
3380
  "integrity": "sha1-sr+C5zUNZcbDOqlaqlpPYyf2HNk=",
3381
  "dev": true
3382
  },
3383
  "process-nextick-args": {
3384
+ "version": "2.0.1",
3385
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
3386
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
3387
  "dev": true
3388
  },
3389
  "pseudomap": {
3393
  "dev": true
3394
  },
3395
  "psl": {
3396
+ "version": "1.8.0",
3397
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
3398
+ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
3399
  "dev": true
3400
  },
3401
  "pump": {
3416
  "dev": true
3417
  },
3418
  "qs": {
3419
+ "version": "6.9.6",
3420
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
3421
+ "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==",
3422
  "dev": true
3423
  },
3424
  "raw-body": {
3433
  "dependencies": {
3434
  "string_decoder": {
3435
  "version": "0.10.31",
3436
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
3437
  "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
3438
  "dev": true
3439
  }
3474
  }
3475
  },
3476
  "readable-stream": {
3477
+ "version": "2.3.7",
3478
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
3479
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
3480
  "dev": true,
3481
  "requires": {
3482
  "core-util-is": "~1.0.0",
3545
  }
3546
  },
3547
  "request": {
3548
+ "version": "2.88.2",
3549
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
3550
+ "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
3551
  "dev": true,
3552
  "requires": {
3553
  "aws-sign2": "~0.7.0",
3557
  "extend": "~3.0.2",
3558
  "forever-agent": "~0.6.1",
3559
  "form-data": "~2.3.2",
3560
+ "har-validator": "~5.1.3",
3561
  "http-signature": "~1.2.0",
3562
  "is-typedarray": "~1.0.0",
3563
  "isstream": "~0.1.2",
3567
  "performance-now": "^2.1.0",
3568
  "qs": "~6.5.2",
3569
  "safe-buffer": "^5.1.2",
3570
+ "tough-cookie": "~2.5.0",
3571
  "tunnel-agent": "^0.6.0",
3572
  "uuid": "^3.3.2"
3573
+ },
3574
+ "dependencies": {
3575
+ "qs": {
3576
+ "version": "6.5.2",
3577
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
3578
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
3579
+ "dev": true
3580
+ }
3581
  }
3582
  },
3583
  "require-directory": {
3593
  "dev": true
3594
  },
3595
  "resolve": {
3596
+ "version": "1.19.0",
3597
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
3598
+ "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
3599
  "dev": true,
3600
  "requires": {
3601
+ "is-core-module": "^2.1.0",
3602
  "path-parse": "^1.0.6"
3603
  }
3604
  },
3649
  }
3650
  },
3651
  "rimraf": {
3652
+ "version": "3.0.2",
3653
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
3654
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
3655
  "dev": true,
3656
  "requires": {
3657
+ "glob": "^7.1.3"
3658
  }
3659
  },
3660
  "safe-buffer": {
3776
  "requires": {
3777
  "js-base64": "^2.1.8",
3778
  "source-map": "^0.4.2"
3779
+ },
3780
+ "dependencies": {
3781
+ "source-map": {
3782
+ "version": "0.4.4",
3783
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
3784
+ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
3785
+ "dev": true,
3786
+ "requires": {
3787
+ "amdefine": ">=0.0.4"
3788
+ }
3789
+ }
3790
  }
3791
  },
3792
  "semver": {
3793
+ "version": "5.7.1",
3794
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
3795
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
3796
  "dev": true
3797
  },
3798
  "set-blocking": {
3832
  },
3833
  "shelljs": {
3834
  "version": "0.3.0",
3835
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
3836
  "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=",
3837
  "dev": true
3838
  },
3839
  "signal-exit": {
3840
+ "version": "3.0.3",
3841
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
3842
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
3843
  "dev": true
3844
  },
3845
  "simple-concat": {
3877
  "use": "^3.1.0"
3878
  },
3879
  "dependencies": {
 
 
 
 
 
 
 
 
 
3880
  "define-property": {
3881
  "version": "0.2.5",
3882
  "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
3894
  "requires": {
3895
  "is-extendable": "^0.1.0"
3896
  }
 
 
 
 
 
 
 
 
 
 
 
 
3897
  }
3898
  }
3899
  },
3945
  "is-data-descriptor": "^1.0.0",
3946
  "kind-of": "^6.0.2"
3947
  }
 
 
 
 
 
 
3948
  }
3949
  }
3950
  },
3955
  "dev": true,
3956
  "requires": {
3957
  "kind-of": "^3.2.0"
3958
+ },
3959
+ "dependencies": {
3960
+ "kind-of": {
3961
+ "version": "3.2.2",
3962
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
3963
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
3964
+ "dev": true,
3965
+ "requires": {
3966
+ "is-buffer": "^1.1.5"
3967
+ }
3968
+ }
3969
  }
3970
  },
3971
  "source-map": {
3972
+ "version": "0.5.7",
3973
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
3974
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
3975
+ "dev": true
 
 
 
3976
  },
3977
  "source-map-resolve": {
3978
  "version": "0.5.3",
3994
  "dev": true
3995
  },
3996
  "spdx-correct": {
3997
+ "version": "3.1.1",
3998
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
3999
+ "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
4000
  "dev": true,
4001
  "requires": {
4002
  "spdx-expression-parse": "^3.0.0",
4004
  }
4005
  },
4006
  "spdx-exceptions": {
4007
+ "version": "2.3.0",
4008
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
4009
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
4010
  "dev": true
4011
  },
4012
  "spdx-expression-parse": {
4013
+ "version": "3.0.1",
4014
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
4015
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
4016
  "dev": true,
4017
  "requires": {
4018
  "spdx-exceptions": "^2.1.0",
4020
  }
4021
  },
4022
  "spdx-license-ids": {
4023
+ "version": "3.0.7",
4024
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz",
4025
+ "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==",
4026
  "dev": true
4027
  },
4028
  "split-string": {
4041
  "dev": true
4042
  },
4043
  "sshpk": {
4044
+ "version": "1.16.1",
4045
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
4046
+ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
4047
  "dev": true,
4048
  "requires": {
4049
  "asn1": "~0.2.3",
4112
  },
4113
  "string_decoder": {
4114
  "version": "1.1.1",
4115
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
4116
  "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
4117
  "dev": true,
4118
  "requires": {
4121
  },
4122
  "strip-ansi": {
4123
  "version": "3.0.1",
4124
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
4125
  "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
4126
  "dev": true,
4127
  "requires": {
4174
  }
4175
  },
4176
  "tar-fs": {
4177
+ "version": "2.1.1",
4178
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
4179
+ "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
4180
  "dev": true,
4181
  "optional": true,
4182
  "requires": {
4183
  "chownr": "^1.1.1",
4184
  "mkdirp-classic": "^0.5.2",
4185
  "pump": "^3.0.0",
4186
+ "tar-stream": "^2.1.4"
4187
  },
4188
  "dependencies": {
4189
  "bl": {
4196
  "buffer": "^5.5.0",
4197
  "inherits": "^2.0.4",
4198
  "readable-stream": "^3.4.0"
 
 
 
 
 
 
 
 
 
4199
  }
4200
  },
4201
  "readable-stream": {
4211
  }
4212
  },
4213
  "tar-stream": {
4214
+ "version": "2.2.0",
4215
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
4216
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
4217
  "dev": true,
4218
  "optional": true,
4219
  "requires": {
4259
  "livereload-js": "^2.3.0",
4260
  "object-assign": "^4.1.0",
4261
  "qs": "^6.4.0"
4262
+ },
4263
+ "dependencies": {
4264
+ "debug": {
4265
+ "version": "3.2.7",
4266
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
4267
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
4268
+ "dev": true,
4269
+ "requires": {
4270
+ "ms": "^2.1.1"
4271
+ }
4272
+ },
4273
+ "ms": {
4274
+ "version": "2.1.3",
4275
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
4276
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
4277
+ "dev": true
4278
+ }
4279
  }
4280
  },
4281
  "to-buffer": {
4291
  "dev": true,
4292
  "requires": {
4293
  "kind-of": "^3.0.2"
4294
+ },
4295
+ "dependencies": {
4296
+ "kind-of": {
4297
+ "version": "3.2.2",
4298
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
4299
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
4300
+ "dev": true,
4301
+ "requires": {
4302
+ "is-buffer": "^1.1.5"
4303
+ }
4304
+ }
4305
  }
4306
  },
4307
  "to-regex": {
4327
  }
4328
  },
4329
  "tough-cookie": {
4330
+ "version": "2.5.0",
4331
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
4332
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
4333
  "dev": true,
4334
  "requires": {
4335
+ "psl": "^1.1.28",
4336
+ "punycode": "^2.1.1"
 
 
 
 
 
 
 
 
4337
  }
4338
  },
4339
  "trim-newlines": {
4349
  "dev": true,
4350
  "requires": {
4351
  "glob": "^7.1.2"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4352
  }
4353
  },
4354
  "tunnel-agent": {
4381
  "source-map": "~0.5.1",
4382
  "uglify-to-browserify": "~1.0.0",
4383
  "yargs": "~3.10.0"
 
 
 
 
 
 
 
 
4384
  }
4385
  },
4386
  "uglify-to-browserify": {
4459
  }
4460
  },
4461
  "uri-js": {
4462
+ "version": "4.4.1",
4463
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
4464
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
4465
  "dev": true,
4466
  "requires": {
4467
  "punycode": "^2.1.0"
4492
  "dev": true
4493
  },
4494
  "uuid": {
4495
+ "version": "3.4.0",
4496
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
4497
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
4498
  "dev": true
4499
  },
4500
  "v8flags": {
4534
  "dev": true
4535
  },
4536
  "websocket-driver": {
4537
+ "version": "0.7.4",
4538
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
4539
+ "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
4540
  "dev": true,
4541
  "requires": {
4542
+ "http-parser-js": ">=0.5.1",
4543
+ "safe-buffer": ">=5.1.0",
4544
  "websocket-extensions": ">=0.1.1"
4545
  }
4546
  },
4610
  "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
4611
  "dev": true
4612
  },
4613
+ "ansi-styles": {
4614
+ "version": "3.2.1",
4615
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
4616
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
4617
+ "dev": true,
4618
+ "requires": {
4619
+ "color-convert": "^1.9.0"
4620
+ }
4621
+ },
4622
+ "color-convert": {
4623
+ "version": "1.9.3",
4624
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
4625
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
4626
+ "dev": true,
4627
+ "requires": {
4628
+ "color-name": "1.1.3"
4629
+ }
4630
+ },
4631
+ "color-name": {
4632
+ "version": "1.1.3",
4633
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
4634
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
4635
+ "dev": true
4636
+ },
4637
  "is-fullwidth-code-point": {
4638
  "version": "2.0.0",
4639
  "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
4669
  "dev": true
4670
  },
4671
  "xtend": {
4672
+ "version": "4.0.2",
4673
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
4674
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
4675
  "dev": true
4676
  },
4677
  "y18n": {
4678
+ "version": "4.0.1",
4679
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
4680
+ "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
4681
  "dev": true
4682
  },
4683
  "yallist": {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: google calendar, calendar, calendars, google, event calendar, custom calen
4
  Requires at least: 4.2
5
  Requires PHP: 7.3
6
  Tested up to: 5.6
7
- Stable tag: 3.1.35
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,9 @@ We'd love your help! Here's a few things you can do:
97
 
98
  == Changelog ==
99
 
 
 
 
100
  = 3.1.35 =
101
  * Fix: Get rid of empty needle PHP warning
102
 
4
  Requires at least: 4.2
5
  Requires PHP: 7.3
6
  Tested up to: 5.6
7
+ Stable tag: 3.1.36
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 3.1.36 =
101
+ * Fix: Namspace conflicts with other plugins and composer libraries. Huge shoutout to @mickwall001 on github for this.
102
+
103
  = 3.1.35 =
104
  * Fix: Get rid of empty needle PHP warning
105
 
scoper.inc.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PHP-Scoper configuration file.
4
+ *
5
+ * @package Google\Site_Kit
6
+ * @copyright 2019 Google LLC
7
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
8
+ * @link https://sitekit.withgoogle.com
9
+ */
10
+
11
+ use Isolated\Symfony\Component\Finder\Finder;
12
+ $patch1="";
13
+ $patch2="";
14
+ $patch3="";
15
+
16
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
17
+ global $patch1;
18
+ global $patch2;
19
+ global $patch3;
20
+ $patch1="vendor\\google\\apiclient\\";
21
+ $patch2="vendor\\google\\auth\\";
22
+ $patch3="vendor\\google\\apiclient-services\\";
23
+
24
+ } else {
25
+ global $patch1;
26
+ global $patch2;
27
+ global $patch3;
28
+ $patch1="vendor/google/apiclient/";
29
+ $patch2="vendor/google/auth/";
30
+ $patch3="vendor/google/apiclient-services/";}
31
+
32
+ // Google API services to include classes for.
33
+ $google_services = implode(
34
+ '|',
35
+ array_map(
36
+ function( $service ) {
37
+ return preg_quote( $service, '#' );
38
+ },
39
+ array(
40
+ 'Calendar',
41
+ 'Drive',
42
+ )
43
+ )
44
+ );
45
+
46
+ return array(
47
+ 'prefix' => 'SimpleCalendar\plugin_deps',
48
+ 'finders' => array(
49
+
50
+ // General dependencies, except Google API services.
51
+ Finder::create()
52
+ ->files()
53
+ ->ignoreVCS( true )
54
+ ->notName( '/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/' )
55
+ ->exclude(
56
+ array(
57
+ 'doc',
58
+ 'test',
59
+ 'test_old',
60
+ 'tests',
61
+ 'Tests',
62
+ 'vendor-bin',
63
+ )
64
+ )
65
+ ->path( '#^firebase/#' )
66
+ ->path( '#^google/apiclient/#' )
67
+ ->path( '#^google/auth/#' )
68
+ ->path( '#^guzzlehttp/#' )
69
+ ->path( '#^monolog/#' )
70
+ ->path( '#^psr/#' )
71
+ ->path( '#^ralouphie/#' )
72
+ ->path( '#^react/#' )
73
+ ->path( '#^nesbot/#' )
74
+ ->path( '#^symfony/#' )
75
+ ->path( '#^mexitek/#' )
76
+ ->in( 'vendor' ),
77
+
78
+ // Google API service infrastructure classes.
79
+ Finder::create()
80
+ ->files()
81
+ ->ignoreVCS( true )
82
+ ->notName( '/LICENSE|.*\\.md|.*\\.dist|Makefile|composer\\.json|composer\\.lock/' )
83
+ ->exclude(
84
+ array(
85
+ 'doc',
86
+ 'test',
87
+ 'test_old',
88
+ 'tests',
89
+ 'Tests',
90
+ 'vendor-bin',
91
+ )
92
+ )
93
+ ->path( "#^google/apiclient-services/src/Google/Service/($google_services)/#" )
94
+ ->in( 'vendor' ),
95
+
96
+ // Google API service entry classes.
97
+ Finder::create()
98
+ ->files()
99
+ ->ignoreVCS( true )
100
+ ->name( "#($google_services)\.php#" )
101
+ ->in( 'vendor/google/apiclient-services/src/Google/Service' ),
102
+ ),
103
+ 'files-whitelist' => array(
104
+
105
+ // This dependency is a global function which should remain global.
106
+ 'vendor\\ralouphie\\getallheaders\\src\\getallheaders.php',
107
+ ),
108
+ 'patchers' => array(
109
+ function( $file_path, $prefix, $contents ) {
110
+ global $patch1;
111
+ global $patch2;
112
+ global $patch3;
113
+
114
+ if ( false !== strpos( $file_path, $patch1 ) || false !== strpos( $file_path, $patch2 ) ) {
115
+ $prefix = str_replace( '\\', '\\\\', $prefix );
116
+ $contents = str_replace( "'\\\\GuzzleHttp\\\\ClientInterface", "'\\\\" . $prefix . '\\\\GuzzleHttp\\\\ClientInterface', $contents );
117
+ $contents = str_replace( '"\\\\GuzzleHttp\\\\ClientInterface', '"\\\\' . $prefix . '\\\\GuzzleHttp\\\\ClientInterface', $contents );
118
+ $contents = str_replace( "'GuzzleHttp\\\\ClientInterface", "'" . $prefix . '\\\\GuzzleHttp\\\\ClientInterface', $contents );
119
+ $contents = str_replace( '"GuzzleHttp\\\\ClientInterface', '"' . $prefix . '\\\\GuzzleHttp\\\\ClientInterface', $contents );
120
+
121
+ }
122
+ if ( false !== strpos( $file_path, $patch1 ) ) {
123
+ $contents = str_replace( "'Google_", "'" . $prefix . '\Google_', $contents );
124
+ $contents = str_replace( '\"Google_', '\"' . $prefix . '\Google_', $contents );
125
+ }
126
+ if ( false !== strpos( $file_path, $patch3 ) ) {
127
+ $contents = str_replace( "'Google_Service_", "'" . $prefix . '\Google_Service_', $contents );
128
+ $contents = str_replace( '"Google_Service_', '"' . $prefix . '\Google_Service_', $contents );
129
+ }
130
+
131
+ return $contents;
132
+ },
133
+ ),
134
+ 'whitelist' => array(),
135
+ 'whitelist-global-constants' => false,
136
+ 'whitelist-global-classes' => false,
137
+ 'whitelist-global-functions' => false,
138
+ );
139
+
third-party/firebase/php-jwt/src/BeforeValidException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Firebase\JWT;
4
+
5
+ class BeforeValidException extends \UnexpectedValueException
6
+ {
7
+ }
third-party/firebase/php-jwt/src/ExpiredException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Firebase\JWT;
4
+
5
+ class ExpiredException extends \UnexpectedValueException
6
+ {
7
+ }
third-party/firebase/php-jwt/src/JWK.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Firebase\JWT;
4
+
5
+ use DomainException;
6
+ use InvalidArgumentException;
7
+ use UnexpectedValueException;
8
+ /**
9
+ * JSON Web Key implementation, based on this spec:
10
+ * https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41
11
+ *
12
+ * PHP version 5
13
+ *
14
+ * @category Authentication
15
+ * @package Authentication_JWT
16
+ * @author Bui Sy Nguyen <nguyenbs@gmail.com>
17
+ * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
18
+ * @link https://github.com/firebase/php-jwt
19
+ */
20
+ class JWK
21
+ {
22
+ /**
23
+ * Parse a set of JWK keys
24
+ *
25
+ * @param array $jwks The JSON Web Key Set as an associative array
26
+ *
27
+ * @return array An associative array that represents the set of keys
28
+ *
29
+ * @throws InvalidArgumentException Provided JWK Set is empty
30
+ * @throws UnexpectedValueException Provided JWK Set was invalid
31
+ * @throws DomainException OpenSSL failure
32
+ *
33
+ * @uses parseKey
34
+ */
35
+ public static function parseKeySet(array $jwks)
36
+ {
37
+ $keys = array();
38
+ if (!isset($jwks['keys'])) {
39
+ throw new UnexpectedValueException('"keys" member must exist in the JWK Set');
40
+ }
41
+ if (empty($jwks['keys'])) {
42
+ throw new InvalidArgumentException('JWK Set did not contain any keys');
43
+ }
44
+ foreach ($jwks['keys'] as $k => $v) {
45
+ $kid = isset($v['kid']) ? $v['kid'] : $k;
46
+ if ($key = self::parseKey($v)) {
47
+ $keys[$kid] = $key;
48
+ }
49
+ }
50
+ if (0 === \count($keys)) {
51
+ throw new UnexpectedValueException('No supported algorithms found in JWK Set');
52
+ }
53
+ return $keys;
54
+ }
55
+ /**
56
+ * Parse a JWK key
57
+ *
58
+ * @param array $jwk An individual JWK
59
+ *
60
+ * @return resource|array An associative array that represents the key
61
+ *
62
+ * @throws InvalidArgumentException Provided JWK is empty
63
+ * @throws UnexpectedValueException Provided JWK was invalid
64
+ * @throws DomainException OpenSSL failure
65
+ *
66
+ * @uses createPemFromModulusAndExponent
67
+ */
68
+ private static function parseKey(array $jwk)
69
+ {
70
+ if (empty($jwk)) {
71
+ throw new InvalidArgumentException('JWK must not be empty');
72
+ }
73
+ if (!isset($jwk['kty'])) {
74
+ throw new UnexpectedValueException('JWK must contain a "kty" parameter');
75
+ }
76
+ switch ($jwk['kty']) {
77
+ case 'RSA':
78
+ if (\array_key_exists('d', $jwk)) {
79
+ throw new UnexpectedValueException('RSA private keys are not supported');
80
+ }
81
+ if (!isset($jwk['n']) || !isset($jwk['e'])) {
82
+ throw new UnexpectedValueException('RSA keys must contain values for both "n" and "e"');
83
+ }
84
+ $pem = self::createPemFromModulusAndExponent($jwk['n'], $jwk['e']);
85
+ $publicKey = \openssl_pkey_get_public($pem);
86
+ if (\false === $publicKey) {
87
+ throw new DomainException('OpenSSL error: ' . \openssl_error_string());
88
+ }
89
+ return $publicKey;
90
+ default:
91
+ // Currently only RSA is supported
92
+ break;
93
+ }
94
+ }
95
+ /**
96
+ * Create a public key represented in PEM format from RSA modulus and exponent information
97
+ *
98
+ * @param string $n The RSA modulus encoded in Base64
99
+ * @param string $e The RSA exponent encoded in Base64
100
+ *
101
+ * @return string The RSA public key represented in PEM format
102
+ *
103
+ * @uses encodeLength
104
+ */
105
+ private static function createPemFromModulusAndExponent($n, $e)
106
+ {
107
+ $modulus = \SimpleCalendar\plugin_deps\Firebase\JWT\JWT::urlsafeB64Decode($n);
108
+ $publicExponent = \SimpleCalendar\plugin_deps\Firebase\JWT\JWT::urlsafeB64Decode($e);
109
+ $components = array('modulus' => \pack('Ca*a*', 2, self::encodeLength(\strlen($modulus)), $modulus), 'publicExponent' => \pack('Ca*a*', 2, self::encodeLength(\strlen($publicExponent)), $publicExponent));
110
+ $rsaPublicKey = \pack('Ca*a*a*', 48, self::encodeLength(\strlen($components['modulus']) + \strlen($components['publicExponent'])), $components['modulus'], $components['publicExponent']);
111
+ // sequence(oid(1.2.840.113549.1.1.1), null)) = rsaEncryption.
112
+ $rsaOID = \pack('H*', '300d06092a864886f70d0101010500');
113
+ // hex version of MA0GCSqGSIb3DQEBAQUA
114
+ $rsaPublicKey = \chr(0) . $rsaPublicKey;
115
+ $rsaPublicKey = \chr(3) . self::encodeLength(\strlen($rsaPublicKey)) . $rsaPublicKey;
116
+ $rsaPublicKey = \pack('Ca*a*', 48, self::encodeLength(\strlen($rsaOID . $rsaPublicKey)), $rsaOID . $rsaPublicKey);
117
+ $rsaPublicKey = "-----BEGIN PUBLIC KEY-----\r\n" . \chunk_split(\base64_encode($rsaPublicKey), 64) . '-----END PUBLIC KEY-----';
118
+ return $rsaPublicKey;
119
+ }
120
+ /**
121
+ * DER-encode the length
122
+ *
123
+ * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See
124
+ * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
125
+ *
126
+ * @param int $length
127
+ * @return string
128
+ */
129
+ private static function encodeLength($length)
130
+ {
131
+ if ($length <= 0x7f) {
132
+ return \chr($length);
133
+ }
134
+ $temp = \ltrim(\pack('N', $length), \chr(0));
135
+ return \pack('Ca*', 0x80 | \strlen($temp), $temp);
136
+ }
137
+ }
third-party/firebase/php-jwt/src/JWT.php ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Firebase\JWT;
4
+
5
+ use DomainException;
6
+ use InvalidArgumentException;
7
+ use UnexpectedValueException;
8
+ use DateTime;
9
+ /**
10
+ * JSON Web Token implementation, based on this spec:
11
+ * https://tools.ietf.org/html/rfc7519
12
+ *
13
+ * PHP version 5
14
+ *
15
+ * @category Authentication
16
+ * @package Authentication_JWT
17
+ * @author Neuman Vong <neuman@twilio.com>
18
+ * @author Anant Narayanan <anant@php.net>
19
+ * @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
20
+ * @link https://github.com/firebase/php-jwt
21
+ */
22
+ class JWT
23
+ {
24
+ const ASN1_INTEGER = 0x2;
25
+ const ASN1_SEQUENCE = 0x10;
26
+ const ASN1_BIT_STRING = 0x3;
27
+ /**
28
+ * When checking nbf, iat or expiration times,
29
+ * we want to provide some extra leeway time to
30
+ * account for clock skew.
31
+ */
32
+ public static $leeway = 0;
33
+ /**
34
+ * Allow the current timestamp to be specified.
35
+ * Useful for fixing a value within unit testing.
36
+ *
37
+ * Will default to PHP time() value if null.
38
+ */
39
+ public static $timestamp = null;
40
+ public static $supported_algs = array('ES256' => array('openssl', 'SHA256'), 'HS256' => array('hash_hmac', 'SHA256'), 'HS384' => array('hash_hmac', 'SHA384'), 'HS512' => array('hash_hmac', 'SHA512'), 'RS256' => array('openssl', 'SHA256'), 'RS384' => array('openssl', 'SHA384'), 'RS512' => array('openssl', 'SHA512'));
41
+ /**
42
+ * Decodes a JWT string into a PHP object.
43
+ *
44
+ * @param string $jwt The JWT
45
+ * @param string|array|resource $key The key, or map of keys.
46
+ * If the algorithm used is asymmetric, this is the public key
47
+ * @param array $allowed_algs List of supported verification algorithms
48
+ * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
49
+ *
50
+ * @return object The JWT's payload as a PHP object
51
+ *
52
+ * @throws UnexpectedValueException Provided JWT was invalid
53
+ * @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
54
+ * @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
55
+ * @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
56
+ * @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
57
+ *
58
+ * @uses jsonDecode
59
+ * @uses urlsafeB64Decode
60
+ */
61
+ public static function decode($jwt, $key, array $allowed_algs = array())
62
+ {
63
+ $timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp;
64
+ if (empty($key)) {
65
+ throw new InvalidArgumentException('Key may not be empty');
66
+ }
67
+ $tks = \explode('.', $jwt);
68
+ if (\count($tks) != 3) {
69
+ throw new UnexpectedValueException('Wrong number of segments');
70
+ }
71
+ list($headb64, $bodyb64, $cryptob64) = $tks;
72
+ if (null === ($header = static::jsonDecode(static::urlsafeB64Decode($headb64)))) {
73
+ throw new UnexpectedValueException('Invalid header encoding');
74
+ }
75
+ if (null === ($payload = static::jsonDecode(static::urlsafeB64Decode($bodyb64)))) {
76
+ throw new UnexpectedValueException('Invalid claims encoding');
77
+ }
78
+ if (\false === ($sig = static::urlsafeB64Decode($cryptob64))) {
79
+ throw new UnexpectedValueException('Invalid signature encoding');
80
+ }
81
+ if (empty($header->alg)) {
82
+ throw new UnexpectedValueException('Empty algorithm');
83
+ }
84
+ if (empty(static::$supported_algs[$header->alg])) {
85
+ throw new UnexpectedValueException('Algorithm not supported');
86
+ }
87
+ if (!\in_array($header->alg, $allowed_algs)) {
88
+ throw new UnexpectedValueException('Algorithm not allowed');
89
+ }
90
+ if ($header->alg === 'ES256') {
91
+ // OpenSSL expects an ASN.1 DER sequence for ES256 signatures
92
+ $sig = self::signatureToDER($sig);
93
+ }
94
+ if (\is_array($key) || $key instanceof \ArrayAccess) {
95
+ if (isset($header->kid)) {
96
+ if (!isset($key[$header->kid])) {
97
+ throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key');
98
+ }
99
+ $key = $key[$header->kid];
100
+ } else {
101
+ throw new UnexpectedValueException('"kid" empty, unable to lookup correct key');
102
+ }
103
+ }
104
+ // Check the signature
105
+ if (!static::verify("{$headb64}.{$bodyb64}", $sig, $key, $header->alg)) {
106
+ throw new \SimpleCalendar\plugin_deps\Firebase\JWT\SignatureInvalidException('Signature verification failed');
107
+ }
108
+ // Check the nbf if it is defined. This is the time that the
109
+ // token can actually be used. If it's not yet that time, abort.
110
+ if (isset($payload->nbf) && $payload->nbf > $timestamp + static::$leeway) {
111
+ throw new \SimpleCalendar\plugin_deps\Firebase\JWT\BeforeValidException('Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->nbf));
112
+ }
113
+ // Check that this token has been created before 'now'. This prevents
114
+ // using tokens that have been created for later use (and haven't
115
+ // correctly used the nbf claim).
116
+ if (isset($payload->iat) && $payload->iat > $timestamp + static::$leeway) {
117
+ throw new \SimpleCalendar\plugin_deps\Firebase\JWT\BeforeValidException('Cannot handle token prior to ' . \date(DateTime::ISO8601, $payload->iat));
118
+ }
119
+ // Check if this token has expired.
120
+ if (isset($payload->exp) && $timestamp - static::$leeway >= $payload->exp) {
121
+ throw new \SimpleCalendar\plugin_deps\Firebase\JWT\ExpiredException('Expired token');
122
+ }
123
+ return $payload;
124
+ }
125
+ /**
126
+ * Converts and signs a PHP object or array into a JWT string.
127
+ *
128
+ * @param object|array $payload PHP object or array
129
+ * @param string $key The secret key.
130
+ * If the algorithm used is asymmetric, this is the private key
131
+ * @param string $alg The signing algorithm.
132
+ * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
133
+ * @param mixed $keyId
134
+ * @param array $head An array with header elements to attach
135
+ *
136
+ * @return string A signed JWT
137
+ *
138
+ * @uses jsonEncode
139
+ * @uses urlsafeB64Encode
140
+ */
141
+ public static function encode($payload, $key, $alg = 'HS256', $keyId = null, $head = null)
142
+ {
143
+ $header = array('typ' => 'JWT', 'alg' => $alg);
144
+ if ($keyId !== null) {
145
+ $header['kid'] = $keyId;
146
+ }
147
+ if (isset($head) && \is_array($head)) {
148
+ $header = \array_merge($head, $header);
149
+ }
150
+ $segments = array();
151
+ $segments[] = static::urlsafeB64Encode(static::jsonEncode($header));
152
+ $segments[] = static::urlsafeB64Encode(static::jsonEncode($payload));
153
+ $signing_input = \implode('.', $segments);
154
+ $signature = static::sign($signing_input, $key, $alg);
155
+ $segments[] = static::urlsafeB64Encode($signature);
156
+ return \implode('.', $segments);
157
+ }
158
+ /**
159
+ * Sign a string with a given key and algorithm.
160
+ *
161
+ * @param string $msg The message to sign
162
+ * @param string|resource $key The secret key
163
+ * @param string $alg The signing algorithm.
164
+ * Supported algorithms are 'ES256', 'HS256', 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
165
+ *
166
+ * @return string An encrypted message
167
+ *
168
+ * @throws DomainException Unsupported algorithm was specified
169
+ */
170
+ public static function sign($msg, $key, $alg = 'HS256')
171
+ {
172
+ if (empty(static::$supported_algs[$alg])) {
173
+ throw new DomainException('Algorithm not supported');
174
+ }
175
+ list($function, $algorithm) = static::$supported_algs[$alg];
176
+ switch ($function) {
177
+ case 'hash_hmac':
178
+ return \hash_hmac($algorithm, $msg, $key, \true);
179
+ case 'openssl':
180
+ $signature = '';
181
+ $success = \openssl_sign($msg, $signature, $key, $algorithm);
182
+ if (!$success) {
183
+ throw new DomainException("OpenSSL unable to sign data");
184
+ } else {
185
+ if ($alg === 'ES256') {
186
+ $signature = self::signatureFromDER($signature, 256);
187
+ }
188
+ return $signature;
189
+ }
190
+ }
191
+ }
192
+ /**
193
+ * Verify a signature with the message, key and method. Not all methods
194
+ * are symmetric, so we must have a separate verify and sign method.
195
+ *
196
+ * @param string $msg The original message (header and body)
197
+ * @param string $signature The original signature
198
+ * @param string|resource $key For HS*, a string key works. for RS*, must be a resource of an openssl public key
199
+ * @param string $alg The algorithm
200
+ *
201
+ * @return bool
202
+ *
203
+ * @throws DomainException Invalid Algorithm or OpenSSL failure
204
+ */
205
+ private static function verify($msg, $signature, $key, $alg)
206
+ {
207
+ if (empty(static::$supported_algs[$alg])) {
208
+ throw new DomainException('Algorithm not supported');
209
+ }
210
+ list($function, $algorithm) = static::$supported_algs[$alg];
211
+ switch ($function) {
212
+ case 'openssl':
213
+ $success = \openssl_verify($msg, $signature, $key, $algorithm);
214
+ if ($success === 1) {
215
+ return \true;
216
+ } elseif ($success === 0) {
217
+ return \false;
218
+ }
219
+ // returns 1 on success, 0 on failure, -1 on error.
220
+ throw new DomainException('OpenSSL error: ' . \openssl_error_string());
221
+ case 'hash_hmac':
222
+ default:
223
+ $hash = \hash_hmac($algorithm, $msg, $key, \true);
224
+ if (\function_exists('hash_equals')) {
225
+ return \hash_equals($signature, $hash);
226
+ }
227
+ $len = \min(static::safeStrlen($signature), static::safeStrlen($hash));
228
+ $status = 0;
229
+ for ($i = 0; $i < $len; $i++) {
230
+ $status |= \ord($signature[$i]) ^ \ord($hash[$i]);
231
+ }
232
+ $status |= static::safeStrlen($signature) ^ static::safeStrlen($hash);
233
+ return $status === 0;
234
+ }
235
+ }
236
+ /**
237
+ * Decode a JSON string into a PHP object.
238
+ *
239
+ * @param string $input JSON string
240
+ *
241
+ * @return object Object representation of JSON string
242
+ *
243
+ * @throws DomainException Provided string was invalid JSON
244
+ */
245
+ public static function jsonDecode($input)
246
+ {
247
+ if (\version_compare(\PHP_VERSION, '5.4.0', '>=') && !(\defined('SimpleCalendar\\plugin_deps\\JSON_C_VERSION') && \PHP_INT_SIZE > 4)) {
248
+ /** In PHP >=5.4.0, json_decode() accepts an options parameter, that allows you
249
+ * to specify that large ints (like Steam Transaction IDs) should be treated as
250
+ * strings, rather than the PHP default behaviour of converting them to floats.
251
+ */
252
+ $obj = \json_decode($input, \false, 512, \JSON_BIGINT_AS_STRING);
253
+ } else {
254
+ /** Not all servers will support that, however, so for older versions we must
255
+ * manually detect large ints in the JSON string and quote them (thus converting
256
+ *them to strings) before decoding, hence the preg_replace() call.
257
+ */
258
+ $max_int_length = \strlen((string) \PHP_INT_MAX) - 1;
259
+ $json_without_bigints = \preg_replace('/:\\s*(-?\\d{' . $max_int_length . ',})/', ': "$1"', $input);
260
+ $obj = \json_decode($json_without_bigints);
261
+ }
262
+ if ($errno = \json_last_error()) {
263
+ static::handleJsonError($errno);
264
+ } elseif ($obj === null && $input !== 'null') {
265
+ throw new DomainException('Null result with non-null input');
266
+ }
267
+ return $obj;
268
+ }
269
+ /**
270
+ * Encode a PHP object into a JSON string.
271
+ *
272
+ * @param object|array $input A PHP object or array
273
+ *
274
+ * @return string JSON representation of the PHP object or array
275
+ *
276
+ * @throws DomainException Provided object could not be encoded to valid JSON
277
+ */
278
+ public static function jsonEncode($input)
279
+ {
280
+ $json = \json_encode($input);
281
+ if ($errno = \json_last_error()) {
282
+ static::handleJsonError($errno);
283
+ } elseif ($json === 'null' && $input !== null) {
284
+ throw new DomainException('Null result with non-null input');
285
+ }
286
+ return $json;
287
+ }
288
+ /**
289
+ * Decode a string with URL-safe Base64.
290
+ *
291
+ * @param string $input A Base64 encoded string
292
+ *
293
+ * @return string A decoded string
294
+ */
295
+ public static function urlsafeB64Decode($input)
296
+ {
297
+ $remainder = \strlen($input) % 4;
298
+ if ($remainder) {
299
+ $padlen = 4 - $remainder;
300
+ $input .= \str_repeat('=', $padlen);
301
+ }
302
+ return \base64_decode(\strtr($input, '-_', '+/'));
303
+ }
304
+ /**
305
+ * Encode a string with URL-safe Base64.
306
+ *
307
+ * @param string $input The string you want encoded
308
+ *
309
+ * @return string The base64 encode of what you passed in
310
+ */
311
+ public static function urlsafeB64Encode($input)
312
+ {
313
+ return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_'));
314
+ }
315
+ /**
316
+ * Helper method to create a JSON error.
317
+ *
318
+ * @param int $errno An error number from json_last_error()
319
+ *
320
+ * @return void
321
+ */
322
+ private static function handleJsonError($errno)
323
+ {
324
+ $messages = array(\JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', \JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', \JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', \JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', \JSON_ERROR_UTF8 => 'Malformed UTF-8 characters');
325
+ throw new DomainException(isset($messages[$errno]) ? $messages[$errno] : 'Unknown JSON error: ' . $errno);
326
+ }
327
+ /**
328
+ * Get the number of bytes in cryptographic strings.
329
+ *
330
+ * @param string $str
331
+ *
332
+ * @return int
333
+ */
334
+ private static function safeStrlen($str)
335
+ {
336
+ if (\function_exists('mb_strlen')) {
337
+ return \mb_strlen($str, '8bit');
338
+ }
339
+ return \strlen($str);
340
+ }
341
+ /**
342
+ * Convert an ECDSA signature to an ASN.1 DER sequence
343
+ *
344
+ * @param string $sig The ECDSA signature to convert
345
+ * @return string The encoded DER object
346
+ */
347
+ private static function signatureToDER($sig)
348
+ {
349
+ // Separate the signature into r-value and s-value
350
+ list($r, $s) = \str_split($sig, (int) (\strlen($sig) / 2));
351
+ // Trim leading zeros
352
+ $r = \ltrim($r, "\0");
353
+ $s = \ltrim($s, "\0");
354
+ // Convert r-value and s-value from unsigned big-endian integers to
355
+ // signed two's complement
356
+ if (\ord($r[0]) > 0x7f) {
357
+ $r = "\0" . $r;
358
+ }
359
+ if (\ord($s[0]) > 0x7f) {
360
+ $s = "\0" . $s;
361
+ }
362
+ return self::encodeDER(self::ASN1_SEQUENCE, self::encodeDER(self::ASN1_INTEGER, $r) . self::encodeDER(self::ASN1_INTEGER, $s));
363
+ }
364
+ /**
365
+ * Encodes a value into a DER object.
366
+ *
367
+ * @param int $type DER tag
368
+ * @param string $value the value to encode
369
+ * @return string the encoded object
370
+ */
371
+ private static function encodeDER($type, $value)
372
+ {
373
+ $tag_header = 0;
374
+ if ($type === self::ASN1_SEQUENCE) {
375
+ $tag_header |= 0x20;
376
+ }
377
+ // Type
378
+ $der = \chr($tag_header | $type);
379
+ // Length
380
+ $der .= \chr(\strlen($value));
381
+ return $der . $value;
382
+ }
383
+ /**
384
+ * Encodes signature from a DER object.
385
+ *
386
+ * @param string $der binary signature in DER format
387
+ * @param int $keySize the number of bits in the key
388
+ * @return string the signature
389
+ */
390
+ private static function signatureFromDER($der, $keySize)
391
+ {
392
+ // OpenSSL returns the ECDSA signatures as a binary ASN.1 DER SEQUENCE
393
+ list($offset, $_) = self::readDER($der);
394
+ list($offset, $r) = self::readDER($der, $offset);
395
+ list($offset, $s) = self::readDER($der, $offset);
396
+ // Convert r-value and s-value from signed two's compliment to unsigned
397
+ // big-endian integers
398
+ $r = \ltrim($r, "\0");
399
+ $s = \ltrim($s, "\0");
400
+ // Pad out r and s so that they are $keySize bits long
401
+ $r = \str_pad($r, $keySize / 8, "\0", \STR_PAD_LEFT);
402
+ $s = \str_pad($s, $keySize / 8, "\0", \STR_PAD_LEFT);
403
+ return $r . $s;
404
+ }
405
+ /**
406
+ * Reads binary DER-encoded data and decodes into a single object
407
+ *
408
+ * @param string $der the binary data in DER format
409
+ * @param int $offset the offset of the data stream containing the object
410
+ * to decode
411
+ * @return array [$offset, $data] the new offset and the decoded object
412
+ */
413
+ private static function readDER($der, $offset = 0)
414
+ {
415
+ $pos = $offset;
416
+ $size = \strlen($der);
417
+ $constructed = \ord($der[$pos]) >> 5 & 0x1;
418
+ $type = \ord($der[$pos++]) & 0x1f;
419
+ // Length
420
+ $len = \ord($der[$pos++]);
421
+ if ($len & 0x80) {
422
+ $n = $len & 0x1f;
423
+ $len = 0;
424
+ while ($n-- && $pos < $size) {
425
+ $len = $len << 8 | \ord($der[$pos++]);
426
+ }
427
+ }
428
+ // Value
429
+ if ($type == self::ASN1_BIT_STRING) {
430
+ $pos++;
431
+ // Skip the first contents octet (padding indicator)
432
+ $data = \substr($der, $pos, $len - 1);
433
+ $pos += $len - 1;
434
+ } elseif (!$constructed) {
435
+ $data = \substr($der, $pos, $len);
436
+ $pos += $len;
437
+ } else {
438
+ $data = null;
439
+ }
440
+ return array($pos, $data);
441
+ }
442
+ }
third-party/firebase/php-jwt/src/SignatureInvalidException.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Firebase\JWT;
4
+
5
+ class SignatureInvalidException extends \UnexpectedValueException
6
+ {
7
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * Service definition for Calendar (v3).
22
+ *
23
+ * <p>
24
+ * Manipulates events and other calendar data.</p>
25
+ *
26
+ * <p>
27
+ * For more information about this service, see the API
28
+ * <a href="https://developers.google.com/google-apps/calendar/firstapp" target="_blank">Documentation</a>
29
+ * </p>
30
+ *
31
+ * @author Google, Inc.
32
+ */
33
+ class Google_Service_Calendar extends \SimpleCalendar\plugin_deps\Google_Service
34
+ {
35
+ /** See, edit, share, and permanently delete all the calendars you can access using Google Calendar. */
36
+ const CALENDAR = "https://www.googleapis.com/auth/calendar";
37
+ /** View and edit events on all your calendars. */
38
+ const CALENDAR_EVENTS = "https://www.googleapis.com/auth/calendar.events";
39
+ /** View events on all your calendars. */
40
+ const CALENDAR_EVENTS_READONLY = "https://www.googleapis.com/auth/calendar.events.readonly";
41
+ /** See and download any calendar you can access using your Google Calendar. */
42
+ const CALENDAR_READONLY = "https://www.googleapis.com/auth/calendar.readonly";
43
+ /** View your Calendar settings. */
44
+ const CALENDAR_SETTINGS_READONLY = "https://www.googleapis.com/auth/calendar.settings.readonly";
45
+ public $acl;
46
+ public $calendarList;
47
+ public $calendars;
48
+ public $channels;
49
+ public $colors;
50
+ public $events;
51
+ public $freebusy;
52
+ public $settings;
53
+ /**
54
+ * Constructs the internal representation of the Calendar service.
55
+ *
56
+ * @param Google_Client $client The client used to deliver requests.
57
+ * @param string $rootUrl The root URL used for requests to the service.
58
+ */
59
+ public function __construct(\SimpleCalendar\plugin_deps\Google_Client $client, $rootUrl = null)
60
+ {
61
+ parent::__construct($client);
62
+ $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
63
+ $this->servicePath = 'calendar/v3/';
64
+ $this->batchPath = 'batch/calendar/v3';
65
+ $this->version = 'v3';
66
+ $this->serviceName = 'calendar';
67
+ $this->acl = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Acl($this, $this->serviceName, 'acl', array('methods' => array('delete' => array('path' => 'calendars/{calendarId}/acl/{ruleId}', 'httpMethod' => 'DELETE', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'ruleId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'calendars/{calendarId}/acl/{ruleId}', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'ruleId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'insert' => array('path' => 'calendars/{calendarId}/acl', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'calendars/{calendarId}/acl', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'))), 'patch' => array('path' => 'calendars/{calendarId}/acl/{ruleId}', 'httpMethod' => 'PATCH', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'ruleId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'))), 'update' => array('path' => 'calendars/{calendarId}/acl/{ruleId}', 'httpMethod' => 'PUT', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'ruleId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'))), 'watch' => array('path' => 'calendars/{calendarId}/acl/watch', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'))))));
68
+ $this->calendarList = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_CalendarList($this, $this->serviceName, 'calendarList', array('methods' => array('delete' => array('path' => 'users/me/calendarList/{calendarId}', 'httpMethod' => 'DELETE', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'users/me/calendarList/{calendarId}', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'insert' => array('path' => 'users/me/calendarList', 'httpMethod' => 'POST', 'parameters' => array('colorRgbFormat' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'users/me/calendarList', 'httpMethod' => 'GET', 'parameters' => array('maxResults' => array('location' => 'query', 'type' => 'integer'), 'minAccessRole' => array('location' => 'query', 'type' => 'string'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'showHidden' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'))), 'patch' => array('path' => 'users/me/calendarList/{calendarId}', 'httpMethod' => 'PATCH', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'colorRgbFormat' => array('location' => 'query', 'type' => 'boolean'))), 'update' => array('path' => 'users/me/calendarList/{calendarId}', 'httpMethod' => 'PUT', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'colorRgbFormat' => array('location' => 'query', 'type' => 'boolean'))), 'watch' => array('path' => 'users/me/calendarList/watch', 'httpMethod' => 'POST', 'parameters' => array('maxResults' => array('location' => 'query', 'type' => 'integer'), 'minAccessRole' => array('location' => 'query', 'type' => 'string'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'showHidden' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'))))));
69
+ $this->calendars = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Calendars($this, $this->serviceName, 'calendars', array('methods' => array('clear' => array('path' => 'calendars/{calendarId}/clear', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'delete' => array('path' => 'calendars/{calendarId}', 'httpMethod' => 'DELETE', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'calendars/{calendarId}', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'insert' => array('path' => 'calendars', 'httpMethod' => 'POST', 'parameters' => array()), 'patch' => array('path' => 'calendars/{calendarId}', 'httpMethod' => 'PATCH', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'update' => array('path' => 'calendars/{calendarId}', 'httpMethod' => 'PUT', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true))))));
70
+ $this->channels = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Channels($this, $this->serviceName, 'channels', array('methods' => array('stop' => array('path' => 'channels/stop', 'httpMethod' => 'POST', 'parameters' => array()))));
71
+ $this->colors = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Colors($this, $this->serviceName, 'colors', array('methods' => array('get' => array('path' => 'colors', 'httpMethod' => 'GET', 'parameters' => array()))));
72
+ $this->events = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Events($this, $this->serviceName, 'events', array('methods' => array('delete' => array('path' => 'calendars/{calendarId}/events/{eventId}', 'httpMethod' => 'DELETE', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'))), 'get' => array('path' => 'calendars/{calendarId}/events/{eventId}', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'timeZone' => array('location' => 'query', 'type' => 'string'))), 'import' => array('path' => 'calendars/{calendarId}/events/import', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'conferenceDataVersion' => array('location' => 'query', 'type' => 'integer'), 'supportsAttachments' => array('location' => 'query', 'type' => 'boolean'))), 'insert' => array('path' => 'calendars/{calendarId}/events', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'conferenceDataVersion' => array('location' => 'query', 'type' => 'integer'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'), 'supportsAttachments' => array('location' => 'query', 'type' => 'boolean'))), 'instances' => array('path' => 'calendars/{calendarId}/events/{eventId}/instances', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'originalStart' => array('location' => 'query', 'type' => 'string'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'timeMax' => array('location' => 'query', 'type' => 'string'), 'timeMin' => array('location' => 'query', 'type' => 'string'), 'timeZone' => array('location' => 'query', 'type' => 'string'))), 'list' => array('path' => 'calendars/{calendarId}/events', 'httpMethod' => 'GET', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'iCalUID' => array('location' => 'query', 'type' => 'string'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'orderBy' => array('location' => 'query', 'type' => 'string'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'privateExtendedProperty' => array('location' => 'query', 'type' => 'string', 'repeated' => \true), 'q' => array('location' => 'query', 'type' => 'string'), 'sharedExtendedProperty' => array('location' => 'query', 'type' => 'string', 'repeated' => \true), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'showHiddenInvitations' => array('location' => 'query', 'type' => 'boolean'), 'singleEvents' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'), 'timeMax' => array('location' => 'query', 'type' => 'string'), 'timeMin' => array('location' => 'query', 'type' => 'string'), 'timeZone' => array('location' => 'query', 'type' => 'string'), 'updatedMin' => array('location' => 'query', 'type' => 'string'))), 'move' => array('path' => 'calendars/{calendarId}/events/{eventId}/move', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'destination' => array('location' => 'query', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'))), 'patch' => array('path' => 'calendars/{calendarId}/events/{eventId}', 'httpMethod' => 'PATCH', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'conferenceDataVersion' => array('location' => 'query', 'type' => 'integer'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'), 'supportsAttachments' => array('location' => 'query', 'type' => 'boolean'))), 'quickAdd' => array('path' => 'calendars/{calendarId}/events/quickAdd', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'text' => array('location' => 'query', 'type' => 'string', 'required' => \true), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'))), 'update' => array('path' => 'calendars/{calendarId}/events/{eventId}', 'httpMethod' => 'PUT', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'eventId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'conferenceDataVersion' => array('location' => 'query', 'type' => 'integer'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'sendNotifications' => array('location' => 'query', 'type' => 'boolean'), 'sendUpdates' => array('location' => 'query', 'type' => 'string'), 'supportsAttachments' => array('location' => 'query', 'type' => 'boolean'))), 'watch' => array('path' => 'calendars/{calendarId}/events/watch', 'httpMethod' => 'POST', 'parameters' => array('calendarId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'alwaysIncludeEmail' => array('location' => 'query', 'type' => 'boolean'), 'iCalUID' => array('location' => 'query', 'type' => 'string'), 'maxAttendees' => array('location' => 'query', 'type' => 'integer'), 'maxResults' => array('location' => 'query', 'type' => 'integer'), 'orderBy' => array('location' => 'query', 'type' => 'string'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'privateExtendedProperty' => array('location' => 'query', 'type' => 'string', 'repeated' => \true), 'q' => array('location' => 'query', 'type' => 'string'), 'sharedExtendedProperty' => array('location' => 'query', 'type' => 'string', 'repeated' => \true), 'showDeleted' => array('location' => 'query', 'type' => 'boolean'), 'showHiddenInvitations' => array('location' => 'query', 'type' => 'boolean'), 'singleEvents' => array('location' => 'query', 'type' => 'boolean'), 'syncToken' => array('location' => 'query', 'type' => 'string'), 'timeMax' => array('location' => 'query', 'type' => 'string'), 'timeMin' => array('location' => 'query', 'type' => 'string'), 'timeZone' => array('location' => 'query', 'type' => 'string'), 'updatedMin' => array('location' => 'query', 'type' => 'string'))))));
73
+ $this->freebusy = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Freebusy($this, $this->serviceName, 'freebusy', array('methods' => array('query' => array('path' => 'freeBusy', 'httpMethod' => 'POST', 'parameters' => array()))));
74
+ $this->settings = new \SimpleCalendar\plugin_deps\Google_Service_Calendar_Resource_Settings($this, $this->serviceName, 'settings', array('methods' => array('get' => array('path' => 'users/me/settings/{setting}', 'httpMethod' => 'GET', 'parameters' => array('setting' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'list' => array('path' => 'users/me/settings', 'httpMethod' => 'GET', 'parameters' => array('maxResults' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'syncToken' => array('location' => 'query', 'type' => 'string'))), 'watch' => array('path' => 'users/me/settings/watch', 'httpMethod' => 'POST', 'parameters' => array('maxResults' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'syncToken' => array('location' => 'query', 'type' => 'string'))))));
75
+ }
76
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Acl.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Acl extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'items';
23
+ public $etag;
24
+ protected $itemsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule';
25
+ protected $itemsDataType = 'array';
26
+ public $kind;
27
+ public $nextPageToken;
28
+ public $nextSyncToken;
29
+ public function setEtag($etag)
30
+ {
31
+ $this->etag = $etag;
32
+ }
33
+ public function getEtag()
34
+ {
35
+ return $this->etag;
36
+ }
37
+ /**
38
+ * @param Google_Service_Calendar_AclRule[]
39
+ */
40
+ public function setItems($items)
41
+ {
42
+ $this->items = $items;
43
+ }
44
+ /**
45
+ * @return Google_Service_Calendar_AclRule[]
46
+ */
47
+ public function getItems()
48
+ {
49
+ return $this->items;
50
+ }
51
+ public function setKind($kind)
52
+ {
53
+ $this->kind = $kind;
54
+ }
55
+ public function getKind()
56
+ {
57
+ return $this->kind;
58
+ }
59
+ public function setNextPageToken($nextPageToken)
60
+ {
61
+ $this->nextPageToken = $nextPageToken;
62
+ }
63
+ public function getNextPageToken()
64
+ {
65
+ return $this->nextPageToken;
66
+ }
67
+ public function setNextSyncToken($nextSyncToken)
68
+ {
69
+ $this->nextSyncToken = $nextSyncToken;
70
+ }
71
+ public function getNextSyncToken()
72
+ {
73
+ return $this->nextSyncToken;
74
+ }
75
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/AclRule.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_AclRule extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $etag;
23
+ public $id;
24
+ public $kind;
25
+ public $role;
26
+ protected $scopeType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRuleScope';
27
+ protected $scopeDataType = '';
28
+ public function setEtag($etag)
29
+ {
30
+ $this->etag = $etag;
31
+ }
32
+ public function getEtag()
33
+ {
34
+ return $this->etag;
35
+ }
36
+ public function setId($id)
37
+ {
38
+ $this->id = $id;
39
+ }
40
+ public function getId()
41
+ {
42
+ return $this->id;
43
+ }
44
+ public function setKind($kind)
45
+ {
46
+ $this->kind = $kind;
47
+ }
48
+ public function getKind()
49
+ {
50
+ return $this->kind;
51
+ }
52
+ public function setRole($role)
53
+ {
54
+ $this->role = $role;
55
+ }
56
+ public function getRole()
57
+ {
58
+ return $this->role;
59
+ }
60
+ /**
61
+ * @param Google_Service_Calendar_AclRuleScope
62
+ */
63
+ public function setScope(\SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRuleScope $scope)
64
+ {
65
+ $this->scope = $scope;
66
+ }
67
+ /**
68
+ * @return Google_Service_Calendar_AclRuleScope
69
+ */
70
+ public function getScope()
71
+ {
72
+ return $this->scope;
73
+ }
74
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/AclRuleScope.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_AclRuleScope extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $type;
23
+ public $value;
24
+ public function setType($type)
25
+ {
26
+ $this->type = $type;
27
+ }
28
+ public function getType()
29
+ {
30
+ return $this->type;
31
+ }
32
+ public function setValue($value)
33
+ {
34
+ $this->value = $value;
35
+ }
36
+ public function getValue()
37
+ {
38
+ return $this->value;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Calendar.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Calendar extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $conferencePropertiesType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceProperties';
23
+ protected $conferencePropertiesDataType = '';
24
+ public $description;
25
+ public $etag;
26
+ public $id;
27
+ public $kind;
28
+ public $location;
29
+ public $summary;
30
+ public $timeZone;
31
+ /**
32
+ * @param Google_Service_Calendar_ConferenceProperties
33
+ */
34
+ public function setConferenceProperties(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceProperties $conferenceProperties)
35
+ {
36
+ $this->conferenceProperties = $conferenceProperties;
37
+ }
38
+ /**
39
+ * @return Google_Service_Calendar_ConferenceProperties
40
+ */
41
+ public function getConferenceProperties()
42
+ {
43
+ return $this->conferenceProperties;
44
+ }
45
+ public function setDescription($description)
46
+ {
47
+ $this->description = $description;
48
+ }
49
+ public function getDescription()
50
+ {
51
+ return $this->description;
52
+ }
53
+ public function setEtag($etag)
54
+ {
55
+ $this->etag = $etag;
56
+ }
57
+ public function getEtag()
58
+ {
59
+ return $this->etag;
60
+ }
61
+ public function setId($id)
62
+ {
63
+ $this->id = $id;
64
+ }
65
+ public function getId()
66
+ {
67
+ return $this->id;
68
+ }
69
+ public function setKind($kind)
70
+ {
71
+ $this->kind = $kind;
72
+ }
73
+ public function getKind()
74
+ {
75
+ return $this->kind;
76
+ }
77
+ public function setLocation($location)
78
+ {
79
+ $this->location = $location;
80
+ }
81
+ public function getLocation()
82
+ {
83
+ return $this->location;
84
+ }
85
+ public function setSummary($summary)
86
+ {
87
+ $this->summary = $summary;
88
+ }
89
+ public function getSummary()
90
+ {
91
+ return $this->summary;
92
+ }
93
+ public function setTimeZone($timeZone)
94
+ {
95
+ $this->timeZone = $timeZone;
96
+ }
97
+ public function getTimeZone()
98
+ {
99
+ return $this->timeZone;
100
+ }
101
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarList.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_CalendarList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'items';
23
+ public $etag;
24
+ protected $itemsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry';
25
+ protected $itemsDataType = 'array';
26
+ public $kind;
27
+ public $nextPageToken;
28
+ public $nextSyncToken;
29
+ public function setEtag($etag)
30
+ {
31
+ $this->etag = $etag;
32
+ }
33
+ public function getEtag()
34
+ {
35
+ return $this->etag;
36
+ }
37
+ /**
38
+ * @param Google_Service_Calendar_CalendarListEntry[]
39
+ */
40
+ public function setItems($items)
41
+ {
42
+ $this->items = $items;
43
+ }
44
+ /**
45
+ * @return Google_Service_Calendar_CalendarListEntry[]
46
+ */
47
+ public function getItems()
48
+ {
49
+ return $this->items;
50
+ }
51
+ public function setKind($kind)
52
+ {
53
+ $this->kind = $kind;
54
+ }
55
+ public function getKind()
56
+ {
57
+ return $this->kind;
58
+ }
59
+ public function setNextPageToken($nextPageToken)
60
+ {
61
+ $this->nextPageToken = $nextPageToken;
62
+ }
63
+ public function getNextPageToken()
64
+ {
65
+ return $this->nextPageToken;
66
+ }
67
+ public function setNextSyncToken($nextSyncToken)
68
+ {
69
+ $this->nextSyncToken = $nextSyncToken;
70
+ }
71
+ public function getNextSyncToken()
72
+ {
73
+ return $this->nextSyncToken;
74
+ }
75
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntry.php ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_CalendarListEntry extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'defaultReminders';
23
+ public $accessRole;
24
+ public $backgroundColor;
25
+ public $colorId;
26
+ protected $conferencePropertiesType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceProperties';
27
+ protected $conferencePropertiesDataType = '';
28
+ protected $defaultRemindersType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventReminder';
29
+ protected $defaultRemindersDataType = 'array';
30
+ public $deleted;
31
+ public $description;
32
+ public $etag;
33
+ public $foregroundColor;
34
+ public $hidden;
35
+ public $id;
36
+ public $kind;
37
+ public $location;
38
+ protected $notificationSettingsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntryNotificationSettings';
39
+ protected $notificationSettingsDataType = '';
40
+ public $primary;
41
+ public $selected;
42
+ public $summary;
43
+ public $summaryOverride;
44
+ public $timeZone;
45
+ public function setAccessRole($accessRole)
46
+ {
47
+ $this->accessRole = $accessRole;
48
+ }
49
+ public function getAccessRole()
50
+ {
51
+ return $this->accessRole;
52
+ }
53
+ public function setBackgroundColor($backgroundColor)
54
+ {
55
+ $this->backgroundColor = $backgroundColor;
56
+ }
57
+ public function getBackgroundColor()
58
+ {
59
+ return $this->backgroundColor;
60
+ }
61
+ public function setColorId($colorId)
62
+ {
63
+ $this->colorId = $colorId;
64
+ }
65
+ public function getColorId()
66
+ {
67
+ return $this->colorId;
68
+ }
69
+ /**
70
+ * @param Google_Service_Calendar_ConferenceProperties
71
+ */
72
+ public function setConferenceProperties(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceProperties $conferenceProperties)
73
+ {
74
+ $this->conferenceProperties = $conferenceProperties;
75
+ }
76
+ /**
77
+ * @return Google_Service_Calendar_ConferenceProperties
78
+ */
79
+ public function getConferenceProperties()
80
+ {
81
+ return $this->conferenceProperties;
82
+ }
83
+ /**
84
+ * @param Google_Service_Calendar_EventReminder[]
85
+ */
86
+ public function setDefaultReminders($defaultReminders)
87
+ {
88
+ $this->defaultReminders = $defaultReminders;
89
+ }
90
+ /**
91
+ * @return Google_Service_Calendar_EventReminder[]
92
+ */
93
+ public function getDefaultReminders()
94
+ {
95
+ return $this->defaultReminders;
96
+ }
97
+ public function setDeleted($deleted)
98
+ {
99
+ $this->deleted = $deleted;
100
+ }
101
+ public function getDeleted()
102
+ {
103
+ return $this->deleted;
104
+ }
105
+ public function setDescription($description)
106
+ {
107
+ $this->description = $description;
108
+ }
109
+ public function getDescription()
110
+ {
111
+ return $this->description;
112
+ }
113
+ public function setEtag($etag)
114
+ {
115
+ $this->etag = $etag;
116
+ }
117
+ public function getEtag()
118
+ {
119
+ return $this->etag;
120
+ }
121
+ public function setForegroundColor($foregroundColor)
122
+ {
123
+ $this->foregroundColor = $foregroundColor;
124
+ }
125
+ public function getForegroundColor()
126
+ {
127
+ return $this->foregroundColor;
128
+ }
129
+ public function setHidden($hidden)
130
+ {
131
+ $this->hidden = $hidden;
132
+ }
133
+ public function getHidden()
134
+ {
135
+ return $this->hidden;
136
+ }
137
+ public function setId($id)
138
+ {
139
+ $this->id = $id;
140
+ }
141
+ public function getId()
142
+ {
143
+ return $this->id;
144
+ }
145
+ public function setKind($kind)
146
+ {
147
+ $this->kind = $kind;
148
+ }
149
+ public function getKind()
150
+ {
151
+ return $this->kind;
152
+ }
153
+ public function setLocation($location)
154
+ {
155
+ $this->location = $location;
156
+ }
157
+ public function getLocation()
158
+ {
159
+ return $this->location;
160
+ }
161
+ /**
162
+ * @param Google_Service_Calendar_CalendarListEntryNotificationSettings
163
+ */
164
+ public function setNotificationSettings(\SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntryNotificationSettings $notificationSettings)
165
+ {
166
+ $this->notificationSettings = $notificationSettings;
167
+ }
168
+ /**
169
+ * @return Google_Service_Calendar_CalendarListEntryNotificationSettings
170
+ */
171
+ public function getNotificationSettings()
172
+ {
173
+ return $this->notificationSettings;
174
+ }
175
+ public function setPrimary($primary)
176
+ {
177
+ $this->primary = $primary;
178
+ }
179
+ public function getPrimary()
180
+ {
181
+ return $this->primary;
182
+ }
183
+ public function setSelected($selected)
184
+ {
185
+ $this->selected = $selected;
186
+ }
187
+ public function getSelected()
188
+ {
189
+ return $this->selected;
190
+ }
191
+ public function setSummary($summary)
192
+ {
193
+ $this->summary = $summary;
194
+ }
195
+ public function getSummary()
196
+ {
197
+ return $this->summary;
198
+ }
199
+ public function setSummaryOverride($summaryOverride)
200
+ {
201
+ $this->summaryOverride = $summaryOverride;
202
+ }
203
+ public function getSummaryOverride()
204
+ {
205
+ return $this->summaryOverride;
206
+ }
207
+ public function setTimeZone($timeZone)
208
+ {
209
+ $this->timeZone = $timeZone;
210
+ }
211
+ public function getTimeZone()
212
+ {
213
+ return $this->timeZone;
214
+ }
215
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarListEntryNotificationSettings.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_CalendarListEntryNotificationSettings extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'notifications';
23
+ protected $notificationsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarNotification';
24
+ protected $notificationsDataType = 'array';
25
+ /**
26
+ * @param Google_Service_Calendar_CalendarNotification[]
27
+ */
28
+ public function setNotifications($notifications)
29
+ {
30
+ $this->notifications = $notifications;
31
+ }
32
+ /**
33
+ * @return Google_Service_Calendar_CalendarNotification[]
34
+ */
35
+ public function getNotifications()
36
+ {
37
+ return $this->notifications;
38
+ }
39
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/CalendarNotification.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_CalendarNotification extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $method;
23
+ public $type;
24
+ public function setMethod($method)
25
+ {
26
+ $this->method = $method;
27
+ }
28
+ public function getMethod()
29
+ {
30
+ return $this->method;
31
+ }
32
+ public function setType($type)
33
+ {
34
+ $this->type = $type;
35
+ }
36
+ public function getType()
37
+ {
38
+ return $this->type;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Channel.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Channel extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $address;
23
+ public $expiration;
24
+ public $id;
25
+ public $kind;
26
+ public $params;
27
+ public $payload;
28
+ public $resourceId;
29
+ public $resourceUri;
30
+ public $token;
31
+ public $type;
32
+ public function setAddress($address)
33
+ {
34
+ $this->address = $address;
35
+ }
36
+ public function getAddress()
37
+ {
38
+ return $this->address;
39
+ }
40
+ public function setExpiration($expiration)
41
+ {
42
+ $this->expiration = $expiration;
43
+ }
44
+ public function getExpiration()
45
+ {
46
+ return $this->expiration;
47
+ }
48
+ public function setId($id)
49
+ {
50
+ $this->id = $id;
51
+ }
52
+ public function getId()
53
+ {
54
+ return $this->id;
55
+ }
56
+ public function setKind($kind)
57
+ {
58
+ $this->kind = $kind;
59
+ }
60
+ public function getKind()
61
+ {
62
+ return $this->kind;
63
+ }
64
+ public function setParams($params)
65
+ {
66
+ $this->params = $params;
67
+ }
68
+ public function getParams()
69
+ {
70
+ return $this->params;
71
+ }
72
+ public function setPayload($payload)
73
+ {
74
+ $this->payload = $payload;
75
+ }
76
+ public function getPayload()
77
+ {
78
+ return $this->payload;
79
+ }
80
+ public function setResourceId($resourceId)
81
+ {
82
+ $this->resourceId = $resourceId;
83
+ }
84
+ public function getResourceId()
85
+ {
86
+ return $this->resourceId;
87
+ }
88
+ public function setResourceUri($resourceUri)
89
+ {
90
+ $this->resourceUri = $resourceUri;
91
+ }
92
+ public function getResourceUri()
93
+ {
94
+ return $this->resourceUri;
95
+ }
96
+ public function setToken($token)
97
+ {
98
+ $this->token = $token;
99
+ }
100
+ public function getToken()
101
+ {
102
+ return $this->token;
103
+ }
104
+ public function setType($type)
105
+ {
106
+ $this->type = $type;
107
+ }
108
+ public function getType()
109
+ {
110
+ return $this->type;
111
+ }
112
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ColorDefinition.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ColorDefinition extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $background;
23
+ public $foreground;
24
+ public function setBackground($background)
25
+ {
26
+ $this->background = $background;
27
+ }
28
+ public function getBackground()
29
+ {
30
+ return $this->background;
31
+ }
32
+ public function setForeground($foreground)
33
+ {
34
+ $this->foreground = $foreground;
35
+ }
36
+ public function getForeground()
37
+ {
38
+ return $this->foreground;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Colors.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Colors extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $calendarType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ColorDefinition';
23
+ protected $calendarDataType = 'map';
24
+ protected $eventType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ColorDefinition';
25
+ protected $eventDataType = 'map';
26
+ public $kind;
27
+ public $updated;
28
+ /**
29
+ * @param Google_Service_Calendar_ColorDefinition[]
30
+ */
31
+ public function setCalendar($calendar)
32
+ {
33
+ $this->calendar = $calendar;
34
+ }
35
+ /**
36
+ * @return Google_Service_Calendar_ColorDefinition[]
37
+ */
38
+ public function getCalendar()
39
+ {
40
+ return $this->calendar;
41
+ }
42
+ /**
43
+ * @param Google_Service_Calendar_ColorDefinition[]
44
+ */
45
+ public function setEvent($event)
46
+ {
47
+ $this->event = $event;
48
+ }
49
+ /**
50
+ * @return Google_Service_Calendar_ColorDefinition[]
51
+ */
52
+ public function getEvent()
53
+ {
54
+ return $this->event;
55
+ }
56
+ public function setKind($kind)
57
+ {
58
+ $this->kind = $kind;
59
+ }
60
+ public function getKind()
61
+ {
62
+ return $this->kind;
63
+ }
64
+ public function setUpdated($updated)
65
+ {
66
+ $this->updated = $updated;
67
+ }
68
+ public function getUpdated()
69
+ {
70
+ return $this->updated;
71
+ }
72
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceData.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceData extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'entryPoints';
23
+ public $conferenceId;
24
+ protected $conferenceSolutionType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolution';
25
+ protected $conferenceSolutionDataType = '';
26
+ protected $createRequestType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_CreateConferenceRequest';
27
+ protected $createRequestDataType = '';
28
+ protected $entryPointsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EntryPoint';
29
+ protected $entryPointsDataType = 'array';
30
+ public $notes;
31
+ protected $parametersType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceParameters';
32
+ protected $parametersDataType = '';
33
+ public $signature;
34
+ public function setConferenceId($conferenceId)
35
+ {
36
+ $this->conferenceId = $conferenceId;
37
+ }
38
+ public function getConferenceId()
39
+ {
40
+ return $this->conferenceId;
41
+ }
42
+ /**
43
+ * @param Google_Service_Calendar_ConferenceSolution
44
+ */
45
+ public function setConferenceSolution(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolution $conferenceSolution)
46
+ {
47
+ $this->conferenceSolution = $conferenceSolution;
48
+ }
49
+ /**
50
+ * @return Google_Service_Calendar_ConferenceSolution
51
+ */
52
+ public function getConferenceSolution()
53
+ {
54
+ return $this->conferenceSolution;
55
+ }
56
+ /**
57
+ * @param Google_Service_Calendar_CreateConferenceRequest
58
+ */
59
+ public function setCreateRequest(\SimpleCalendar\plugin_deps\Google_Service_Calendar_CreateConferenceRequest $createRequest)
60
+ {
61
+ $this->createRequest = $createRequest;
62
+ }
63
+ /**
64
+ * @return Google_Service_Calendar_CreateConferenceRequest
65
+ */
66
+ public function getCreateRequest()
67
+ {
68
+ return $this->createRequest;
69
+ }
70
+ /**
71
+ * @param Google_Service_Calendar_EntryPoint[]
72
+ */
73
+ public function setEntryPoints($entryPoints)
74
+ {
75
+ $this->entryPoints = $entryPoints;
76
+ }
77
+ /**
78
+ * @return Google_Service_Calendar_EntryPoint[]
79
+ */
80
+ public function getEntryPoints()
81
+ {
82
+ return $this->entryPoints;
83
+ }
84
+ public function setNotes($notes)
85
+ {
86
+ $this->notes = $notes;
87
+ }
88
+ public function getNotes()
89
+ {
90
+ return $this->notes;
91
+ }
92
+ /**
93
+ * @param Google_Service_Calendar_ConferenceParameters
94
+ */
95
+ public function setParameters(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceParameters $parameters)
96
+ {
97
+ $this->parameters = $parameters;
98
+ }
99
+ /**
100
+ * @return Google_Service_Calendar_ConferenceParameters
101
+ */
102
+ public function getParameters()
103
+ {
104
+ return $this->parameters;
105
+ }
106
+ public function setSignature($signature)
107
+ {
108
+ $this->signature = $signature;
109
+ }
110
+ public function getSignature()
111
+ {
112
+ return $this->signature;
113
+ }
114
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceParameters.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceParameters extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $addOnParametersType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceParametersAddOnParameters';
23
+ protected $addOnParametersDataType = '';
24
+ /**
25
+ * @param Google_Service_Calendar_ConferenceParametersAddOnParameters
26
+ */
27
+ public function setAddOnParameters(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceParametersAddOnParameters $addOnParameters)
28
+ {
29
+ $this->addOnParameters = $addOnParameters;
30
+ }
31
+ /**
32
+ * @return Google_Service_Calendar_ConferenceParametersAddOnParameters
33
+ */
34
+ public function getAddOnParameters()
35
+ {
36
+ return $this->addOnParameters;
37
+ }
38
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceParametersAddOnParameters.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceParametersAddOnParameters extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $parameters;
23
+ public function setParameters($parameters)
24
+ {
25
+ $this->parameters = $parameters;
26
+ }
27
+ public function getParameters()
28
+ {
29
+ return $this->parameters;
30
+ }
31
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceProperties.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceProperties extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'allowedConferenceSolutionTypes';
23
+ public $allowedConferenceSolutionTypes;
24
+ public function setAllowedConferenceSolutionTypes($allowedConferenceSolutionTypes)
25
+ {
26
+ $this->allowedConferenceSolutionTypes = $allowedConferenceSolutionTypes;
27
+ }
28
+ public function getAllowedConferenceSolutionTypes()
29
+ {
30
+ return $this->allowedConferenceSolutionTypes;
31
+ }
32
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceRequestStatus.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceRequestStatus extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $statusCode;
23
+ public function setStatusCode($statusCode)
24
+ {
25
+ $this->statusCode = $statusCode;
26
+ }
27
+ public function getStatusCode()
28
+ {
29
+ return $this->statusCode;
30
+ }
31
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceSolution.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceSolution extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $iconUri;
23
+ protected $keyType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolutionKey';
24
+ protected $keyDataType = '';
25
+ public $name;
26
+ public function setIconUri($iconUri)
27
+ {
28
+ $this->iconUri = $iconUri;
29
+ }
30
+ public function getIconUri()
31
+ {
32
+ return $this->iconUri;
33
+ }
34
+ /**
35
+ * @param Google_Service_Calendar_ConferenceSolutionKey
36
+ */
37
+ public function setKey(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolutionKey $key)
38
+ {
39
+ $this->key = $key;
40
+ }
41
+ /**
42
+ * @return Google_Service_Calendar_ConferenceSolutionKey
43
+ */
44
+ public function getKey()
45
+ {
46
+ return $this->key;
47
+ }
48
+ public function setName($name)
49
+ {
50
+ $this->name = $name;
51
+ }
52
+ public function getName()
53
+ {
54
+ return $this->name;
55
+ }
56
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/ConferenceSolutionKey.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_ConferenceSolutionKey extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $type;
23
+ public function setType($type)
24
+ {
25
+ $this->type = $type;
26
+ }
27
+ public function getType()
28
+ {
29
+ return $this->type;
30
+ }
31
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/CreateConferenceRequest.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_CreateConferenceRequest extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $conferenceSolutionKeyType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolutionKey';
23
+ protected $conferenceSolutionKeyDataType = '';
24
+ public $requestId;
25
+ protected $statusType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceRequestStatus';
26
+ protected $statusDataType = '';
27
+ /**
28
+ * @param Google_Service_Calendar_ConferenceSolutionKey
29
+ */
30
+ public function setConferenceSolutionKey(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceSolutionKey $conferenceSolutionKey)
31
+ {
32
+ $this->conferenceSolutionKey = $conferenceSolutionKey;
33
+ }
34
+ /**
35
+ * @return Google_Service_Calendar_ConferenceSolutionKey
36
+ */
37
+ public function getConferenceSolutionKey()
38
+ {
39
+ return $this->conferenceSolutionKey;
40
+ }
41
+ public function setRequestId($requestId)
42
+ {
43
+ $this->requestId = $requestId;
44
+ }
45
+ public function getRequestId()
46
+ {
47
+ return $this->requestId;
48
+ }
49
+ /**
50
+ * @param Google_Service_Calendar_ConferenceRequestStatus
51
+ */
52
+ public function setStatus(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceRequestStatus $status)
53
+ {
54
+ $this->status = $status;
55
+ }
56
+ /**
57
+ * @return Google_Service_Calendar_ConferenceRequestStatus
58
+ */
59
+ public function getStatus()
60
+ {
61
+ return $this->status;
62
+ }
63
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EntryPoint.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EntryPoint extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'entryPointFeatures';
23
+ public $accessCode;
24
+ public $entryPointFeatures;
25
+ public $entryPointType;
26
+ public $label;
27
+ public $meetingCode;
28
+ public $passcode;
29
+ public $password;
30
+ public $pin;
31
+ public $regionCode;
32
+ public $uri;
33
+ public function setAccessCode($accessCode)
34
+ {
35
+ $this->accessCode = $accessCode;
36
+ }
37
+ public function getAccessCode()
38
+ {
39
+ return $this->accessCode;
40
+ }
41
+ public function setEntryPointFeatures($entryPointFeatures)
42
+ {
43
+ $this->entryPointFeatures = $entryPointFeatures;
44
+ }
45
+ public function getEntryPointFeatures()
46
+ {
47
+ return $this->entryPointFeatures;
48
+ }
49
+ public function setEntryPointType($entryPointType)
50
+ {
51
+ $this->entryPointType = $entryPointType;
52
+ }
53
+ public function getEntryPointType()
54
+ {
55
+ return $this->entryPointType;
56
+ }
57
+ public function setLabel($label)
58
+ {
59
+ $this->label = $label;
60
+ }
61
+ public function getLabel()
62
+ {
63
+ return $this->label;
64
+ }
65
+ public function setMeetingCode($meetingCode)
66
+ {
67
+ $this->meetingCode = $meetingCode;
68
+ }
69
+ public function getMeetingCode()
70
+ {
71
+ return $this->meetingCode;
72
+ }
73
+ public function setPasscode($passcode)
74
+ {
75
+ $this->passcode = $passcode;
76
+ }
77
+ public function getPasscode()
78
+ {
79
+ return $this->passcode;
80
+ }
81
+ public function setPassword($password)
82
+ {
83
+ $this->password = $password;
84
+ }
85
+ public function getPassword()
86
+ {
87
+ return $this->password;
88
+ }
89
+ public function setPin($pin)
90
+ {
91
+ $this->pin = $pin;
92
+ }
93
+ public function getPin()
94
+ {
95
+ return $this->pin;
96
+ }
97
+ public function setRegionCode($regionCode)
98
+ {
99
+ $this->regionCode = $regionCode;
100
+ }
101
+ public function getRegionCode()
102
+ {
103
+ return $this->regionCode;
104
+ }
105
+ public function setUri($uri)
106
+ {
107
+ $this->uri = $uri;
108
+ }
109
+ public function getUri()
110
+ {
111
+ return $this->uri;
112
+ }
113
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Error.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Error extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $domain;
23
+ public $reason;
24
+ public function setDomain($domain)
25
+ {
26
+ $this->domain = $domain;
27
+ }
28
+ public function getDomain()
29
+ {
30
+ return $this->domain;
31
+ }
32
+ public function setReason($reason)
33
+ {
34
+ $this->reason = $reason;
35
+ }
36
+ public function getReason()
37
+ {
38
+ return $this->reason;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Event.php ADDED
@@ -0,0 +1,458 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Event extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'recurrence';
23
+ public $anyoneCanAddSelf;
24
+ protected $attachmentsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventAttachment';
25
+ protected $attachmentsDataType = 'array';
26
+ protected $attendeesType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventAttendee';
27
+ protected $attendeesDataType = 'array';
28
+ public $attendeesOmitted;
29
+ public $colorId;
30
+ protected $conferenceDataType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceData';
31
+ protected $conferenceDataDataType = '';
32
+ public $created;
33
+ protected $creatorType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventCreator';
34
+ protected $creatorDataType = '';
35
+ public $description;
36
+ protected $endType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime';
37
+ protected $endDataType = '';
38
+ public $endTimeUnspecified;
39
+ public $etag;
40
+ public $eventType;
41
+ protected $extendedPropertiesType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventExtendedProperties';
42
+ protected $extendedPropertiesDataType = '';
43
+ protected $gadgetType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventGadget';
44
+ protected $gadgetDataType = '';
45
+ public $guestsCanInviteOthers;
46
+ public $guestsCanModify;
47
+ public $guestsCanSeeOtherGuests;
48
+ public $hangoutLink;
49
+ public $htmlLink;
50
+ public $iCalUID;
51
+ public $id;
52
+ public $kind;
53
+ public $location;
54
+ public $locked;
55
+ protected $organizerType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventOrganizer';
56
+ protected $organizerDataType = '';
57
+ protected $originalStartTimeType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime';
58
+ protected $originalStartTimeDataType = '';
59
+ public $privateCopy;
60
+ public $recurrence;
61
+ public $recurringEventId;
62
+ protected $remindersType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventReminders';
63
+ protected $remindersDataType = '';
64
+ public $sequence;
65
+ protected $sourceType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventSource';
66
+ protected $sourceDataType = '';
67
+ protected $startType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime';
68
+ protected $startDataType = '';
69
+ public $status;
70
+ public $summary;
71
+ public $transparency;
72
+ public $updated;
73
+ public $visibility;
74
+ public function setAnyoneCanAddSelf($anyoneCanAddSelf)
75
+ {
76
+ $this->anyoneCanAddSelf = $anyoneCanAddSelf;
77
+ }
78
+ public function getAnyoneCanAddSelf()
79
+ {
80
+ return $this->anyoneCanAddSelf;
81
+ }
82
+ /**
83
+ * @param Google_Service_Calendar_EventAttachment[]
84
+ */
85
+ public function setAttachments($attachments)
86
+ {
87
+ $this->attachments = $attachments;
88
+ }
89
+ /**
90
+ * @return Google_Service_Calendar_EventAttachment[]
91
+ */
92
+ public function getAttachments()
93
+ {
94
+ return $this->attachments;
95
+ }
96
+ /**
97
+ * @param Google_Service_Calendar_EventAttendee[]
98
+ */
99
+ public function setAttendees($attendees)
100
+ {
101
+ $this->attendees = $attendees;
102
+ }
103
+ /**
104
+ * @return Google_Service_Calendar_EventAttendee[]
105
+ */
106
+ public function getAttendees()
107
+ {
108
+ return $this->attendees;
109
+ }
110
+ public function setAttendeesOmitted($attendeesOmitted)
111
+ {
112
+ $this->attendeesOmitted = $attendeesOmitted;
113
+ }
114
+ public function getAttendeesOmitted()
115
+ {
116
+ return $this->attendeesOmitted;
117
+ }
118
+ public function setColorId($colorId)
119
+ {
120
+ $this->colorId = $colorId;
121
+ }
122
+ public function getColorId()
123
+ {
124
+ return $this->colorId;
125
+ }
126
+ /**
127
+ * @param Google_Service_Calendar_ConferenceData
128
+ */
129
+ public function setConferenceData(\SimpleCalendar\plugin_deps\Google_Service_Calendar_ConferenceData $conferenceData)
130
+ {
131
+ $this->conferenceData = $conferenceData;
132
+ }
133
+ /**
134
+ * @return Google_Service_Calendar_ConferenceData
135
+ */
136
+ public function getConferenceData()
137
+ {
138
+ return $this->conferenceData;
139
+ }
140
+ public function setCreated($created)
141
+ {
142
+ $this->created = $created;
143
+ }
144
+ public function getCreated()
145
+ {
146
+ return $this->created;
147
+ }
148
+ /**
149
+ * @param Google_Service_Calendar_EventCreator
150
+ */
151
+ public function setCreator(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventCreator $creator)
152
+ {
153
+ $this->creator = $creator;
154
+ }
155
+ /**
156
+ * @return Google_Service_Calendar_EventCreator
157
+ */
158
+ public function getCreator()
159
+ {
160
+ return $this->creator;
161
+ }
162
+ public function setDescription($description)
163
+ {
164
+ $this->description = $description;
165
+ }
166
+ public function getDescription()
167
+ {
168
+ return $this->description;
169
+ }
170
+ /**
171
+ * @param Google_Service_Calendar_EventDateTime
172
+ */
173
+ public function setEnd(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime $end)
174
+ {
175
+ $this->end = $end;
176
+ }
177
+ /**
178
+ * @return Google_Service_Calendar_EventDateTime
179
+ */
180
+ public function getEnd()
181
+ {
182
+ return $this->end;
183
+ }
184
+ public function setEndTimeUnspecified($endTimeUnspecified)
185
+ {
186
+ $this->endTimeUnspecified = $endTimeUnspecified;
187
+ }
188
+ public function getEndTimeUnspecified()
189
+ {
190
+ return $this->endTimeUnspecified;
191
+ }
192
+ public function setEtag($etag)
193
+ {
194
+ $this->etag = $etag;
195
+ }
196
+ public function getEtag()
197
+ {
198
+ return $this->etag;
199
+ }
200
+ public function setEventType($eventType)
201
+ {
202
+ $this->eventType = $eventType;
203
+ }
204
+ public function getEventType()
205
+ {
206
+ return $this->eventType;
207
+ }
208
+ /**
209
+ * @param Google_Service_Calendar_EventExtendedProperties
210
+ */
211
+ public function setExtendedProperties(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventExtendedProperties $extendedProperties)
212
+ {
213
+ $this->extendedProperties = $extendedProperties;
214
+ }
215
+ /**
216
+ * @return Google_Service_Calendar_EventExtendedProperties
217
+ */
218
+ public function getExtendedProperties()
219
+ {
220
+ return $this->extendedProperties;
221
+ }
222
+ /**
223
+ * @param Google_Service_Calendar_EventGadget
224
+ */
225
+ public function setGadget(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventGadget $gadget)
226
+ {
227
+ $this->gadget = $gadget;
228
+ }
229
+ /**
230
+ * @return Google_Service_Calendar_EventGadget
231
+ */
232
+ public function getGadget()
233
+ {
234
+ return $this->gadget;
235
+ }
236
+ public function setGuestsCanInviteOthers($guestsCanInviteOthers)
237
+ {
238
+ $this->guestsCanInviteOthers = $guestsCanInviteOthers;
239
+ }
240
+ public function getGuestsCanInviteOthers()
241
+ {
242
+ return $this->guestsCanInviteOthers;
243
+ }
244
+ public function setGuestsCanModify($guestsCanModify)
245
+ {
246
+ $this->guestsCanModify = $guestsCanModify;
247
+ }
248
+ public function getGuestsCanModify()
249
+ {
250
+ return $this->guestsCanModify;
251
+ }
252
+ public function setGuestsCanSeeOtherGuests($guestsCanSeeOtherGuests)
253
+ {
254
+ $this->guestsCanSeeOtherGuests = $guestsCanSeeOtherGuests;
255
+ }
256
+ public function getGuestsCanSeeOtherGuests()
257
+ {
258
+ return $this->guestsCanSeeOtherGuests;
259
+ }
260
+ public function setHangoutLink($hangoutLink)
261
+ {
262
+ $this->hangoutLink = $hangoutLink;
263
+ }
264
+ public function getHangoutLink()
265
+ {
266
+ return $this->hangoutLink;
267
+ }
268
+ public function setHtmlLink($htmlLink)
269
+ {
270
+ $this->htmlLink = $htmlLink;
271
+ }
272
+ public function getHtmlLink()
273
+ {
274
+ return $this->htmlLink;
275
+ }
276
+ public function setICalUID($iCalUID)
277
+ {
278
+ $this->iCalUID = $iCalUID;
279
+ }
280
+ public function getICalUID()
281
+ {
282
+ return $this->iCalUID;
283
+ }
284
+ public function setId($id)
285
+ {
286
+ $this->id = $id;
287
+ }
288
+ public function getId()
289
+ {
290
+ return $this->id;
291
+ }
292
+ public function setKind($kind)
293
+ {
294
+ $this->kind = $kind;
295
+ }
296
+ public function getKind()
297
+ {
298
+ return $this->kind;
299
+ }
300
+ public function setLocation($location)
301
+ {
302
+ $this->location = $location;
303
+ }
304
+ public function getLocation()
305
+ {
306
+ return $this->location;
307
+ }
308
+ public function setLocked($locked)
309
+ {
310
+ $this->locked = $locked;
311
+ }
312
+ public function getLocked()
313
+ {
314
+ return $this->locked;
315
+ }
316
+ /**
317
+ * @param Google_Service_Calendar_EventOrganizer
318
+ */
319
+ public function setOrganizer(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventOrganizer $organizer)
320
+ {
321
+ $this->organizer = $organizer;
322
+ }
323
+ /**
324
+ * @return Google_Service_Calendar_EventOrganizer
325
+ */
326
+ public function getOrganizer()
327
+ {
328
+ return $this->organizer;
329
+ }
330
+ /**
331
+ * @param Google_Service_Calendar_EventDateTime
332
+ */
333
+ public function setOriginalStartTime(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime $originalStartTime)
334
+ {
335
+ $this->originalStartTime = $originalStartTime;
336
+ }
337
+ /**
338
+ * @return Google_Service_Calendar_EventDateTime
339
+ */
340
+ public function getOriginalStartTime()
341
+ {
342
+ return $this->originalStartTime;
343
+ }
344
+ public function setPrivateCopy($privateCopy)
345
+ {
346
+ $this->privateCopy = $privateCopy;
347
+ }
348
+ public function getPrivateCopy()
349
+ {
350
+ return $this->privateCopy;
351
+ }
352
+ public function setRecurrence($recurrence)
353
+ {
354
+ $this->recurrence = $recurrence;
355
+ }
356
+ public function getRecurrence()
357
+ {
358
+ return $this->recurrence;
359
+ }
360
+ public function setRecurringEventId($recurringEventId)
361
+ {
362
+ $this->recurringEventId = $recurringEventId;
363
+ }
364
+ public function getRecurringEventId()
365
+ {
366
+ return $this->recurringEventId;
367
+ }
368
+ /**
369
+ * @param Google_Service_Calendar_EventReminders
370
+ */
371
+ public function setReminders(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventReminders $reminders)
372
+ {
373
+ $this->reminders = $reminders;
374
+ }
375
+ /**
376
+ * @return Google_Service_Calendar_EventReminders
377
+ */
378
+ public function getReminders()
379
+ {
380
+ return $this->reminders;
381
+ }
382
+ public function setSequence($sequence)
383
+ {
384
+ $this->sequence = $sequence;
385
+ }
386
+ public function getSequence()
387
+ {
388
+ return $this->sequence;
389
+ }
390
+ /**
391
+ * @param Google_Service_Calendar_EventSource
392
+ */
393
+ public function setSource(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventSource $source)
394
+ {
395
+ $this->source = $source;
396
+ }
397
+ /**
398
+ * @return Google_Service_Calendar_EventSource
399
+ */
400
+ public function getSource()
401
+ {
402
+ return $this->source;
403
+ }
404
+ /**
405
+ * @param Google_Service_Calendar_EventDateTime
406
+ */
407
+ public function setStart(\SimpleCalendar\plugin_deps\Google_Service_Calendar_EventDateTime $start)
408
+ {
409
+ $this->start = $start;
410
+ }
411
+ /**
412
+ * @return Google_Service_Calendar_EventDateTime
413
+ */
414
+ public function getStart()
415
+ {
416
+ return $this->start;
417
+ }
418
+ public function setStatus($status)
419
+ {
420
+ $this->status = $status;
421
+ }
422
+ public function getStatus()
423
+ {
424
+ return $this->status;
425
+ }
426
+ public function setSummary($summary)
427
+ {
428
+ $this->summary = $summary;
429
+ }
430
+ public function getSummary()
431
+ {
432
+ return $this->summary;
433
+ }
434
+ public function setTransparency($transparency)
435
+ {
436
+ $this->transparency = $transparency;
437
+ }
438
+ public function getTransparency()
439
+ {
440
+ return $this->transparency;
441
+ }
442
+ public function setUpdated($updated)
443
+ {
444
+ $this->updated = $updated;
445
+ }
446
+ public function getUpdated()
447
+ {
448
+ return $this->updated;
449
+ }
450
+ public function setVisibility($visibility)
451
+ {
452
+ $this->visibility = $visibility;
453
+ }
454
+ public function getVisibility()
455
+ {
456
+ return $this->visibility;
457
+ }
458
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventAttachment.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventAttachment extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $fileId;
23
+ public $fileUrl;
24
+ public $iconLink;
25
+ public $mimeType;
26
+ public $title;
27
+ public function setFileId($fileId)
28
+ {
29
+ $this->fileId = $fileId;
30
+ }
31
+ public function getFileId()
32
+ {
33
+ return $this->fileId;
34
+ }
35
+ public function setFileUrl($fileUrl)
36
+ {
37
+ $this->fileUrl = $fileUrl;
38
+ }
39
+ public function getFileUrl()
40
+ {
41
+ return $this->fileUrl;
42
+ }
43
+ public function setIconLink($iconLink)
44
+ {
45
+ $this->iconLink = $iconLink;
46
+ }
47
+ public function getIconLink()
48
+ {
49
+ return $this->iconLink;
50
+ }
51
+ public function setMimeType($mimeType)
52
+ {
53
+ $this->mimeType = $mimeType;
54
+ }
55
+ public function getMimeType()
56
+ {
57
+ return $this->mimeType;
58
+ }
59
+ public function setTitle($title)
60
+ {
61
+ $this->title = $title;
62
+ }
63
+ public function getTitle()
64
+ {
65
+ return $this->title;
66
+ }
67
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventAttendee.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventAttendee extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $additionalGuests;
23
+ public $comment;
24
+ public $displayName;
25
+ public $email;
26
+ public $id;
27
+ public $optional;
28
+ public $organizer;
29
+ public $resource;
30
+ public $responseStatus;
31
+ public $self;
32
+ public function setAdditionalGuests($additionalGuests)
33
+ {
34
+ $this->additionalGuests = $additionalGuests;
35
+ }
36
+ public function getAdditionalGuests()
37
+ {
38
+ return $this->additionalGuests;
39
+ }
40
+ public function setComment($comment)
41
+ {
42
+ $this->comment = $comment;
43
+ }
44
+ public function getComment()
45
+ {
46
+ return $this->comment;
47
+ }
48
+ public function setDisplayName($displayName)
49
+ {
50
+ $this->displayName = $displayName;
51
+ }
52
+ public function getDisplayName()
53
+ {
54
+ return $this->displayName;
55
+ }
56
+ public function setEmail($email)
57
+ {
58
+ $this->email = $email;
59
+ }
60
+ public function getEmail()
61
+ {
62
+ return $this->email;
63
+ }
64
+ public function setId($id)
65
+ {
66
+ $this->id = $id;
67
+ }
68
+ public function getId()
69
+ {
70
+ return $this->id;
71
+ }
72
+ public function setOptional($optional)
73
+ {
74
+ $this->optional = $optional;
75
+ }
76
+ public function getOptional()
77
+ {
78
+ return $this->optional;
79
+ }
80
+ public function setOrganizer($organizer)
81
+ {
82
+ $this->organizer = $organizer;
83
+ }
84
+ public function getOrganizer()
85
+ {
86
+ return $this->organizer;
87
+ }
88
+ public function setResource($resource)
89
+ {
90
+ $this->resource = $resource;
91
+ }
92
+ public function getResource()
93
+ {
94
+ return $this->resource;
95
+ }
96
+ public function setResponseStatus($responseStatus)
97
+ {
98
+ $this->responseStatus = $responseStatus;
99
+ }
100
+ public function getResponseStatus()
101
+ {
102
+ return $this->responseStatus;
103
+ }
104
+ public function setSelf($self)
105
+ {
106
+ $this->self = $self;
107
+ }
108
+ public function getSelf()
109
+ {
110
+ return $this->self;
111
+ }
112
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventCreator.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventCreator extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $displayName;
23
+ public $email;
24
+ public $id;
25
+ public $self;
26
+ public function setDisplayName($displayName)
27
+ {
28
+ $this->displayName = $displayName;
29
+ }
30
+ public function getDisplayName()
31
+ {
32
+ return $this->displayName;
33
+ }
34
+ public function setEmail($email)
35
+ {
36
+ $this->email = $email;
37
+ }
38
+ public function getEmail()
39
+ {
40
+ return $this->email;
41
+ }
42
+ public function setId($id)
43
+ {
44
+ $this->id = $id;
45
+ }
46
+ public function getId()
47
+ {
48
+ return $this->id;
49
+ }
50
+ public function setSelf($self)
51
+ {
52
+ $this->self = $self;
53
+ }
54
+ public function getSelf()
55
+ {
56
+ return $this->self;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventDateTime.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventDateTime extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $date;
23
+ public $dateTime;
24
+ public $timeZone;
25
+ public function setDate($date)
26
+ {
27
+ $this->date = $date;
28
+ }
29
+ public function getDate()
30
+ {
31
+ return $this->date;
32
+ }
33
+ public function setDateTime($dateTime)
34
+ {
35
+ $this->dateTime = $dateTime;
36
+ }
37
+ public function getDateTime()
38
+ {
39
+ return $this->dateTime;
40
+ }
41
+ public function setTimeZone($timeZone)
42
+ {
43
+ $this->timeZone = $timeZone;
44
+ }
45
+ public function getTimeZone()
46
+ {
47
+ return $this->timeZone;
48
+ }
49
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventExtendedProperties.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventExtendedProperties extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $private;
23
+ public $shared;
24
+ public function setPrivate($private)
25
+ {
26
+ $this->private = $private;
27
+ }
28
+ public function getPrivate()
29
+ {
30
+ return $this->private;
31
+ }
32
+ public function setShared($shared)
33
+ {
34
+ $this->shared = $shared;
35
+ }
36
+ public function getShared()
37
+ {
38
+ return $this->shared;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventGadget.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventGadget extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $display;
23
+ public $height;
24
+ public $iconLink;
25
+ public $link;
26
+ public $preferences;
27
+ public $title;
28
+ public $type;
29
+ public $width;
30
+ public function setDisplay($display)
31
+ {
32
+ $this->display = $display;
33
+ }
34
+ public function getDisplay()
35
+ {
36
+ return $this->display;
37
+ }
38
+ public function setHeight($height)
39
+ {
40
+ $this->height = $height;
41
+ }
42
+ public function getHeight()
43
+ {
44
+ return $this->height;
45
+ }
46
+ public function setIconLink($iconLink)
47
+ {
48
+ $this->iconLink = $iconLink;
49
+ }
50
+ public function getIconLink()
51
+ {
52
+ return $this->iconLink;
53
+ }
54
+ public function setLink($link)
55
+ {
56
+ $this->link = $link;
57
+ }
58
+ public function getLink()
59
+ {
60
+ return $this->link;
61
+ }
62
+ public function setPreferences($preferences)
63
+ {
64
+ $this->preferences = $preferences;
65
+ }
66
+ public function getPreferences()
67
+ {
68
+ return $this->preferences;
69
+ }
70
+ public function setTitle($title)
71
+ {
72
+ $this->title = $title;
73
+ }
74
+ public function getTitle()
75
+ {
76
+ return $this->title;
77
+ }
78
+ public function setType($type)
79
+ {
80
+ $this->type = $type;
81
+ }
82
+ public function getType()
83
+ {
84
+ return $this->type;
85
+ }
86
+ public function setWidth($width)
87
+ {
88
+ $this->width = $width;
89
+ }
90
+ public function getWidth()
91
+ {
92
+ return $this->width;
93
+ }
94
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventOrganizer.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventOrganizer extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $displayName;
23
+ public $email;
24
+ public $id;
25
+ public $self;
26
+ public function setDisplayName($displayName)
27
+ {
28
+ $this->displayName = $displayName;
29
+ }
30
+ public function getDisplayName()
31
+ {
32
+ return $this->displayName;
33
+ }
34
+ public function setEmail($email)
35
+ {
36
+ $this->email = $email;
37
+ }
38
+ public function getEmail()
39
+ {
40
+ return $this->email;
41
+ }
42
+ public function setId($id)
43
+ {
44
+ $this->id = $id;
45
+ }
46
+ public function getId()
47
+ {
48
+ return $this->id;
49
+ }
50
+ public function setSelf($self)
51
+ {
52
+ $this->self = $self;
53
+ }
54
+ public function getSelf()
55
+ {
56
+ return $this->self;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventReminder.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventReminder extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $method;
23
+ public $minutes;
24
+ public function setMethod($method)
25
+ {
26
+ $this->method = $method;
27
+ }
28
+ public function getMethod()
29
+ {
30
+ return $this->method;
31
+ }
32
+ public function setMinutes($minutes)
33
+ {
34
+ $this->minutes = $minutes;
35
+ }
36
+ public function getMinutes()
37
+ {
38
+ return $this->minutes;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventReminders.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventReminders extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'overrides';
23
+ protected $overridesType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventReminder';
24
+ protected $overridesDataType = 'array';
25
+ public $useDefault;
26
+ /**
27
+ * @param Google_Service_Calendar_EventReminder[]
28
+ */
29
+ public function setOverrides($overrides)
30
+ {
31
+ $this->overrides = $overrides;
32
+ }
33
+ /**
34
+ * @return Google_Service_Calendar_EventReminder[]
35
+ */
36
+ public function getOverrides()
37
+ {
38
+ return $this->overrides;
39
+ }
40
+ public function setUseDefault($useDefault)
41
+ {
42
+ $this->useDefault = $useDefault;
43
+ }
44
+ public function getUseDefault()
45
+ {
46
+ return $this->useDefault;
47
+ }
48
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/EventSource.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_EventSource extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $title;
23
+ public $url;
24
+ public function setTitle($title)
25
+ {
26
+ $this->title = $title;
27
+ }
28
+ public function getTitle()
29
+ {
30
+ return $this->title;
31
+ }
32
+ public function setUrl($url)
33
+ {
34
+ $this->url = $url;
35
+ }
36
+ public function getUrl()
37
+ {
38
+ return $this->url;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Events.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Events extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'items';
23
+ public $accessRole;
24
+ protected $defaultRemindersType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_EventReminder';
25
+ protected $defaultRemindersDataType = 'array';
26
+ public $description;
27
+ public $etag;
28
+ protected $itemsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_Event';
29
+ protected $itemsDataType = 'array';
30
+ public $kind;
31
+ public $nextPageToken;
32
+ public $nextSyncToken;
33
+ public $summary;
34
+ public $timeZone;
35
+ public $updated;
36
+ public function setAccessRole($accessRole)
37
+ {
38
+ $this->accessRole = $accessRole;
39
+ }
40
+ public function getAccessRole()
41
+ {
42
+ return $this->accessRole;
43
+ }
44
+ /**
45
+ * @param Google_Service_Calendar_EventReminder[]
46
+ */
47
+ public function setDefaultReminders($defaultReminders)
48
+ {
49
+ $this->defaultReminders = $defaultReminders;
50
+ }
51
+ /**
52
+ * @return Google_Service_Calendar_EventReminder[]
53
+ */
54
+ public function getDefaultReminders()
55
+ {
56
+ return $this->defaultReminders;
57
+ }
58
+ public function setDescription($description)
59
+ {
60
+ $this->description = $description;
61
+ }
62
+ public function getDescription()
63
+ {
64
+ return $this->description;
65
+ }
66
+ public function setEtag($etag)
67
+ {
68
+ $this->etag = $etag;
69
+ }
70
+ public function getEtag()
71
+ {
72
+ return $this->etag;
73
+ }
74
+ /**
75
+ * @param Google_Service_Calendar_Event[]
76
+ */
77
+ public function setItems($items)
78
+ {
79
+ $this->items = $items;
80
+ }
81
+ /**
82
+ * @return Google_Service_Calendar_Event[]
83
+ */
84
+ public function getItems()
85
+ {
86
+ return $this->items;
87
+ }
88
+ public function setKind($kind)
89
+ {
90
+ $this->kind = $kind;
91
+ }
92
+ public function getKind()
93
+ {
94
+ return $this->kind;
95
+ }
96
+ public function setNextPageToken($nextPageToken)
97
+ {
98
+ $this->nextPageToken = $nextPageToken;
99
+ }
100
+ public function getNextPageToken()
101
+ {
102
+ return $this->nextPageToken;
103
+ }
104
+ public function setNextSyncToken($nextSyncToken)
105
+ {
106
+ $this->nextSyncToken = $nextSyncToken;
107
+ }
108
+ public function getNextSyncToken()
109
+ {
110
+ return $this->nextSyncToken;
111
+ }
112
+ public function setSummary($summary)
113
+ {
114
+ $this->summary = $summary;
115
+ }
116
+ public function getSummary()
117
+ {
118
+ return $this->summary;
119
+ }
120
+ public function setTimeZone($timeZone)
121
+ {
122
+ $this->timeZone = $timeZone;
123
+ }
124
+ public function getTimeZone()
125
+ {
126
+ return $this->timeZone;
127
+ }
128
+ public function setUpdated($updated)
129
+ {
130
+ $this->updated = $updated;
131
+ }
132
+ public function getUpdated()
133
+ {
134
+ return $this->updated;
135
+ }
136
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyCalendar.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_FreeBusyCalendar extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'errors';
23
+ protected $busyType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_TimePeriod';
24
+ protected $busyDataType = 'array';
25
+ protected $errorsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_Error';
26
+ protected $errorsDataType = 'array';
27
+ /**
28
+ * @param Google_Service_Calendar_TimePeriod[]
29
+ */
30
+ public function setBusy($busy)
31
+ {
32
+ $this->busy = $busy;
33
+ }
34
+ /**
35
+ * @return Google_Service_Calendar_TimePeriod[]
36
+ */
37
+ public function getBusy()
38
+ {
39
+ return $this->busy;
40
+ }
41
+ /**
42
+ * @param Google_Service_Calendar_Error[]
43
+ */
44
+ public function setErrors($errors)
45
+ {
46
+ $this->errors = $errors;
47
+ }
48
+ /**
49
+ * @return Google_Service_Calendar_Error[]
50
+ */
51
+ public function getErrors()
52
+ {
53
+ return $this->errors;
54
+ }
55
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyGroup.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_FreeBusyGroup extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'errors';
23
+ public $calendars;
24
+ protected $errorsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_Error';
25
+ protected $errorsDataType = 'array';
26
+ public function setCalendars($calendars)
27
+ {
28
+ $this->calendars = $calendars;
29
+ }
30
+ public function getCalendars()
31
+ {
32
+ return $this->calendars;
33
+ }
34
+ /**
35
+ * @param Google_Service_Calendar_Error[]
36
+ */
37
+ public function setErrors($errors)
38
+ {
39
+ $this->errors = $errors;
40
+ }
41
+ /**
42
+ * @return Google_Service_Calendar_Error[]
43
+ */
44
+ public function getErrors()
45
+ {
46
+ return $this->errors;
47
+ }
48
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequest.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_FreeBusyRequest extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'items';
23
+ public $calendarExpansionMax;
24
+ public $groupExpansionMax;
25
+ protected $itemsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_FreeBusyRequestItem';
26
+ protected $itemsDataType = 'array';
27
+ public $timeMax;
28
+ public $timeMin;
29
+ public $timeZone;
30
+ public function setCalendarExpansionMax($calendarExpansionMax)
31
+ {
32
+ $this->calendarExpansionMax = $calendarExpansionMax;
33
+ }
34
+ public function getCalendarExpansionMax()
35
+ {
36
+ return $this->calendarExpansionMax;
37
+ }
38
+ public function setGroupExpansionMax($groupExpansionMax)
39
+ {
40
+ $this->groupExpansionMax = $groupExpansionMax;
41
+ }
42
+ public function getGroupExpansionMax()
43
+ {
44
+ return $this->groupExpansionMax;
45
+ }
46
+ /**
47
+ * @param Google_Service_Calendar_FreeBusyRequestItem[]
48
+ */
49
+ public function setItems($items)
50
+ {
51
+ $this->items = $items;
52
+ }
53
+ /**
54
+ * @return Google_Service_Calendar_FreeBusyRequestItem[]
55
+ */
56
+ public function getItems()
57
+ {
58
+ return $this->items;
59
+ }
60
+ public function setTimeMax($timeMax)
61
+ {
62
+ $this->timeMax = $timeMax;
63
+ }
64
+ public function getTimeMax()
65
+ {
66
+ return $this->timeMax;
67
+ }
68
+ public function setTimeMin($timeMin)
69
+ {
70
+ $this->timeMin = $timeMin;
71
+ }
72
+ public function getTimeMin()
73
+ {
74
+ return $this->timeMin;
75
+ }
76
+ public function setTimeZone($timeZone)
77
+ {
78
+ $this->timeZone = $timeZone;
79
+ }
80
+ public function getTimeZone()
81
+ {
82
+ return $this->timeZone;
83
+ }
84
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyRequestItem.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_FreeBusyRequestItem extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $id;
23
+ public function setId($id)
24
+ {
25
+ $this->id = $id;
26
+ }
27
+ public function getId()
28
+ {
29
+ return $this->id;
30
+ }
31
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/FreeBusyResponse.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_FreeBusyResponse extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $calendarsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_FreeBusyCalendar';
23
+ protected $calendarsDataType = 'map';
24
+ protected $groupsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_FreeBusyGroup';
25
+ protected $groupsDataType = 'map';
26
+ public $kind;
27
+ public $timeMax;
28
+ public $timeMin;
29
+ /**
30
+ * @param Google_Service_Calendar_FreeBusyCalendar[]
31
+ */
32
+ public function setCalendars($calendars)
33
+ {
34
+ $this->calendars = $calendars;
35
+ }
36
+ /**
37
+ * @return Google_Service_Calendar_FreeBusyCalendar[]
38
+ */
39
+ public function getCalendars()
40
+ {
41
+ return $this->calendars;
42
+ }
43
+ /**
44
+ * @param Google_Service_Calendar_FreeBusyGroup[]
45
+ */
46
+ public function setGroups($groups)
47
+ {
48
+ $this->groups = $groups;
49
+ }
50
+ /**
51
+ * @return Google_Service_Calendar_FreeBusyGroup[]
52
+ */
53
+ public function getGroups()
54
+ {
55
+ return $this->groups;
56
+ }
57
+ public function setKind($kind)
58
+ {
59
+ $this->kind = $kind;
60
+ }
61
+ public function getKind()
62
+ {
63
+ return $this->kind;
64
+ }
65
+ public function setTimeMax($timeMax)
66
+ {
67
+ $this->timeMax = $timeMax;
68
+ }
69
+ public function getTimeMax()
70
+ {
71
+ return $this->timeMax;
72
+ }
73
+ public function setTimeMin($timeMin)
74
+ {
75
+ $this->timeMin = $timeMin;
76
+ }
77
+ public function getTimeMin()
78
+ {
79
+ return $this->timeMin;
80
+ }
81
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Acl.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "acl" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $acl = $calendarService->acl;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Acl extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Deletes an access control rule. (acl.delete)
32
+ *
33
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
34
+ * the calendarList.list method. If you want to access the primary calendar of
35
+ * the currently logged in user, use the "primary" keyword.
36
+ * @param string $ruleId ACL rule identifier.
37
+ * @param array $optParams Optional parameters.
38
+ */
39
+ public function delete($calendarId, $ruleId, $optParams = array())
40
+ {
41
+ $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId);
42
+ $params = \array_merge($params, $optParams);
43
+ return $this->call('delete', array($params));
44
+ }
45
+ /**
46
+ * Returns an access control rule. (acl.get)
47
+ *
48
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
49
+ * the calendarList.list method. If you want to access the primary calendar of
50
+ * the currently logged in user, use the "primary" keyword.
51
+ * @param string $ruleId ACL rule identifier.
52
+ * @param array $optParams Optional parameters.
53
+ * @return Google_Service_Calendar_AclRule
54
+ */
55
+ public function get($calendarId, $ruleId, $optParams = array())
56
+ {
57
+ $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId);
58
+ $params = \array_merge($params, $optParams);
59
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule");
60
+ }
61
+ /**
62
+ * Creates an access control rule. (acl.insert)
63
+ *
64
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
65
+ * the calendarList.list method. If you want to access the primary calendar of
66
+ * the currently logged in user, use the "primary" keyword.
67
+ * @param Google_Service_Calendar_AclRule $postBody
68
+ * @param array $optParams Optional parameters.
69
+ *
70
+ * @opt_param bool sendNotifications Whether to send notifications about the
71
+ * calendar sharing change. Optional. The default is True.
72
+ * @return Google_Service_Calendar_AclRule
73
+ */
74
+ public function insert($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule $postBody, $optParams = array())
75
+ {
76
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
77
+ $params = \array_merge($params, $optParams);
78
+ return $this->call('insert', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule");
79
+ }
80
+ /**
81
+ * Returns the rules in the access control list for the calendar. (acl.listAcl)
82
+ *
83
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
84
+ * the calendarList.list method. If you want to access the primary calendar of
85
+ * the currently logged in user, use the "primary" keyword.
86
+ * @param array $optParams Optional parameters.
87
+ *
88
+ * @opt_param int maxResults Maximum number of entries returned on one result
89
+ * page. By default the value is 100 entries. The page size can never be larger
90
+ * than 250 entries. Optional.
91
+ * @opt_param string pageToken Token specifying which result page to return.
92
+ * Optional.
93
+ * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
94
+ * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
95
+ * always be included if syncToken is provided. Optional. The default is False.
96
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
97
+ * returned on the last page of results from the previous list request. It makes
98
+ * the result of this list request contain only entries that have changed since
99
+ * then. All entries deleted since the previous list request will always be in
100
+ * the result set and it is not allowed to set showDeleted to False. If the
101
+ * syncToken expires, the server will respond with a 410 GONE response code and
102
+ * the client should clear its storage and perform a full synchronization
103
+ * without any syncToken. Learn more about incremental synchronization.
104
+ * Optional. The default is to return all entries.
105
+ * @return Google_Service_Calendar_Acl
106
+ */
107
+ public function listAcl($calendarId, $optParams = array())
108
+ {
109
+ $params = array('calendarId' => $calendarId);
110
+ $params = \array_merge($params, $optParams);
111
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Acl");
112
+ }
113
+ /**
114
+ * Updates an access control rule. This method supports patch semantics.
115
+ * (acl.patch)
116
+ *
117
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
118
+ * the calendarList.list method. If you want to access the primary calendar of
119
+ * the currently logged in user, use the "primary" keyword.
120
+ * @param string $ruleId ACL rule identifier.
121
+ * @param Google_Service_Calendar_AclRule $postBody
122
+ * @param array $optParams Optional parameters.
123
+ *
124
+ * @opt_param bool sendNotifications Whether to send notifications about the
125
+ * calendar sharing change. Note that there are no notifications on access
126
+ * removal. Optional. The default is True.
127
+ * @return Google_Service_Calendar_AclRule
128
+ */
129
+ public function patch($calendarId, $ruleId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule $postBody, $optParams = array())
130
+ {
131
+ $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody);
132
+ $params = \array_merge($params, $optParams);
133
+ return $this->call('patch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule");
134
+ }
135
+ /**
136
+ * Updates an access control rule. (acl.update)
137
+ *
138
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
139
+ * the calendarList.list method. If you want to access the primary calendar of
140
+ * the currently logged in user, use the "primary" keyword.
141
+ * @param string $ruleId ACL rule identifier.
142
+ * @param Google_Service_Calendar_AclRule $postBody
143
+ * @param array $optParams Optional parameters.
144
+ *
145
+ * @opt_param bool sendNotifications Whether to send notifications about the
146
+ * calendar sharing change. Note that there are no notifications on access
147
+ * removal. Optional. The default is True.
148
+ * @return Google_Service_Calendar_AclRule
149
+ */
150
+ public function update($calendarId, $ruleId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule $postBody, $optParams = array())
151
+ {
152
+ $params = array('calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody);
153
+ $params = \array_merge($params, $optParams);
154
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_AclRule");
155
+ }
156
+ /**
157
+ * Watch for changes to ACL resources. (acl.watch)
158
+ *
159
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
160
+ * the calendarList.list method. If you want to access the primary calendar of
161
+ * the currently logged in user, use the "primary" keyword.
162
+ * @param Google_Service_Calendar_Channel $postBody
163
+ * @param array $optParams Optional parameters.
164
+ *
165
+ * @opt_param int maxResults Maximum number of entries returned on one result
166
+ * page. By default the value is 100 entries. The page size can never be larger
167
+ * than 250 entries. Optional.
168
+ * @opt_param string pageToken Token specifying which result page to return.
169
+ * Optional.
170
+ * @opt_param bool showDeleted Whether to include deleted ACLs in the result.
171
+ * Deleted ACLs are represented by role equal to "none". Deleted ACLs will
172
+ * always be included if syncToken is provided. Optional. The default is False.
173
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
174
+ * returned on the last page of results from the previous list request. It makes
175
+ * the result of this list request contain only entries that have changed since
176
+ * then. All entries deleted since the previous list request will always be in
177
+ * the result set and it is not allowed to set showDeleted to False. If the
178
+ * syncToken expires, the server will respond with a 410 GONE response code and
179
+ * the client should clear its storage and perform a full synchronization
180
+ * without any syncToken. Learn more about incremental synchronization.
181
+ * Optional. The default is to return all entries.
182
+ * @return Google_Service_Calendar_Channel
183
+ */
184
+ public function watch($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel $postBody, $optParams = array())
185
+ {
186
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
187
+ $params = \array_merge($params, $optParams);
188
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel");
189
+ }
190
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/CalendarList.php ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "calendarList" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $calendarList = $calendarService->calendarList;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_CalendarList extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Removes a calendar from the user's calendar list. (calendarList.delete)
32
+ *
33
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
34
+ * the calendarList.list method. If you want to access the primary calendar of
35
+ * the currently logged in user, use the "primary" keyword.
36
+ * @param array $optParams Optional parameters.
37
+ */
38
+ public function delete($calendarId, $optParams = array())
39
+ {
40
+ $params = array('calendarId' => $calendarId);
41
+ $params = \array_merge($params, $optParams);
42
+ return $this->call('delete', array($params));
43
+ }
44
+ /**
45
+ * Returns a calendar from the user's calendar list. (calendarList.get)
46
+ *
47
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
48
+ * the calendarList.list method. If you want to access the primary calendar of
49
+ * the currently logged in user, use the "primary" keyword.
50
+ * @param array $optParams Optional parameters.
51
+ * @return Google_Service_Calendar_CalendarListEntry
52
+ */
53
+ public function get($calendarId, $optParams = array())
54
+ {
55
+ $params = array('calendarId' => $calendarId);
56
+ $params = \array_merge($params, $optParams);
57
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry");
58
+ }
59
+ /**
60
+ * Inserts an existing calendar into the user's calendar list.
61
+ * (calendarList.insert)
62
+ *
63
+ * @param Google_Service_Calendar_CalendarListEntry $postBody
64
+ * @param array $optParams Optional parameters.
65
+ *
66
+ * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
67
+ * backgroundColor fields to write the calendar colors (RGB). If this feature is
68
+ * used, the index-based colorId field will be set to the best matching option
69
+ * automatically. Optional. The default is False.
70
+ * @return Google_Service_Calendar_CalendarListEntry
71
+ */
72
+ public function insert(\SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
73
+ {
74
+ $params = array('postBody' => $postBody);
75
+ $params = \array_merge($params, $optParams);
76
+ return $this->call('insert', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry");
77
+ }
78
+ /**
79
+ * Returns the calendars on the user's calendar list.
80
+ * (calendarList.listCalendarList)
81
+ *
82
+ * @param array $optParams Optional parameters.
83
+ *
84
+ * @opt_param int maxResults Maximum number of entries returned on one result
85
+ * page. By default the value is 100 entries. The page size can never be larger
86
+ * than 250 entries. Optional.
87
+ * @opt_param string minAccessRole The minimum access role for the user in the
88
+ * returned entries. Optional. The default is no restriction.
89
+ * @opt_param string pageToken Token specifying which result page to return.
90
+ * Optional.
91
+ * @opt_param bool showDeleted Whether to include deleted calendar list entries
92
+ * in the result. Optional. The default is False.
93
+ * @opt_param bool showHidden Whether to show hidden entries. Optional. The
94
+ * default is False.
95
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
96
+ * returned on the last page of results from the previous list request. It makes
97
+ * the result of this list request contain only entries that have changed since
98
+ * then. If only read-only fields such as calendar properties or ACLs have
99
+ * changed, the entry won't be returned. All entries deleted and hidden since
100
+ * the previous list request will always be in the result set and it is not
101
+ * allowed to set showDeleted neither showHidden to False. To ensure client
102
+ * state consistency minAccessRole query parameter cannot be specified together
103
+ * with nextSyncToken. If the syncToken expires, the server will respond with a
104
+ * 410 GONE response code and the client should clear its storage and perform a
105
+ * full synchronization without any syncToken. Learn more about incremental
106
+ * synchronization. Optional. The default is to return all entries.
107
+ * @return Google_Service_Calendar_CalendarList
108
+ */
109
+ public function listCalendarList($optParams = array())
110
+ {
111
+ $params = array();
112
+ $params = \array_merge($params, $optParams);
113
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarList");
114
+ }
115
+ /**
116
+ * Updates an existing calendar on the user's calendar list. This method
117
+ * supports patch semantics. (calendarList.patch)
118
+ *
119
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
120
+ * the calendarList.list method. If you want to access the primary calendar of
121
+ * the currently logged in user, use the "primary" keyword.
122
+ * @param Google_Service_Calendar_CalendarListEntry $postBody
123
+ * @param array $optParams Optional parameters.
124
+ *
125
+ * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
126
+ * backgroundColor fields to write the calendar colors (RGB). If this feature is
127
+ * used, the index-based colorId field will be set to the best matching option
128
+ * automatically. Optional. The default is False.
129
+ * @return Google_Service_Calendar_CalendarListEntry
130
+ */
131
+ public function patch($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
132
+ {
133
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
134
+ $params = \array_merge($params, $optParams);
135
+ return $this->call('patch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry");
136
+ }
137
+ /**
138
+ * Updates an existing calendar on the user's calendar list.
139
+ * (calendarList.update)
140
+ *
141
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
142
+ * the calendarList.list method. If you want to access the primary calendar of
143
+ * the currently logged in user, use the "primary" keyword.
144
+ * @param Google_Service_Calendar_CalendarListEntry $postBody
145
+ * @param array $optParams Optional parameters.
146
+ *
147
+ * @opt_param bool colorRgbFormat Whether to use the foregroundColor and
148
+ * backgroundColor fields to write the calendar colors (RGB). If this feature is
149
+ * used, the index-based colorId field will be set to the best matching option
150
+ * automatically. Optional. The default is False.
151
+ * @return Google_Service_Calendar_CalendarListEntry
152
+ */
153
+ public function update($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry $postBody, $optParams = array())
154
+ {
155
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
156
+ $params = \array_merge($params, $optParams);
157
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_CalendarListEntry");
158
+ }
159
+ /**
160
+ * Watch for changes to CalendarList resources. (calendarList.watch)
161
+ *
162
+ * @param Google_Service_Calendar_Channel $postBody
163
+ * @param array $optParams Optional parameters.
164
+ *
165
+ * @opt_param int maxResults Maximum number of entries returned on one result
166
+ * page. By default the value is 100 entries. The page size can never be larger
167
+ * than 250 entries. Optional.
168
+ * @opt_param string minAccessRole The minimum access role for the user in the
169
+ * returned entries. Optional. The default is no restriction.
170
+ * @opt_param string pageToken Token specifying which result page to return.
171
+ * Optional.
172
+ * @opt_param bool showDeleted Whether to include deleted calendar list entries
173
+ * in the result. Optional. The default is False.
174
+ * @opt_param bool showHidden Whether to show hidden entries. Optional. The
175
+ * default is False.
176
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
177
+ * returned on the last page of results from the previous list request. It makes
178
+ * the result of this list request contain only entries that have changed since
179
+ * then. If only read-only fields such as calendar properties or ACLs have
180
+ * changed, the entry won't be returned. All entries deleted and hidden since
181
+ * the previous list request will always be in the result set and it is not
182
+ * allowed to set showDeleted neither showHidden to False. To ensure client
183
+ * state consistency minAccessRole query parameter cannot be specified together
184
+ * with nextSyncToken. If the syncToken expires, the server will respond with a
185
+ * 410 GONE response code and the client should clear its storage and perform a
186
+ * full synchronization without any syncToken. Learn more about incremental
187
+ * synchronization. Optional. The default is to return all entries.
188
+ * @return Google_Service_Calendar_Channel
189
+ */
190
+ public function watch(\SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel $postBody, $optParams = array())
191
+ {
192
+ $params = array('postBody' => $postBody);
193
+ $params = \array_merge($params, $optParams);
194
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel");
195
+ }
196
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Calendars.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "calendars" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $calendars = $calendarService->calendars;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Calendars extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Clears a primary calendar. This operation deletes all events associated with
32
+ * the primary calendar of an account. (calendars.clear)
33
+ *
34
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
35
+ * the calendarList.list method. If you want to access the primary calendar of
36
+ * the currently logged in user, use the "primary" keyword.
37
+ * @param array $optParams Optional parameters.
38
+ */
39
+ public function clear($calendarId, $optParams = array())
40
+ {
41
+ $params = array('calendarId' => $calendarId);
42
+ $params = \array_merge($params, $optParams);
43
+ return $this->call('clear', array($params));
44
+ }
45
+ /**
46
+ * Deletes a secondary calendar. Use calendars.clear for clearing all events on
47
+ * primary calendars. (calendars.delete)
48
+ *
49
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
50
+ * the calendarList.list method. If you want to access the primary calendar of
51
+ * the currently logged in user, use the "primary" keyword.
52
+ * @param array $optParams Optional parameters.
53
+ */
54
+ public function delete($calendarId, $optParams = array())
55
+ {
56
+ $params = array('calendarId' => $calendarId);
57
+ $params = \array_merge($params, $optParams);
58
+ return $this->call('delete', array($params));
59
+ }
60
+ /**
61
+ * Returns metadata for a calendar. (calendars.get)
62
+ *
63
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
64
+ * the calendarList.list method. If you want to access the primary calendar of
65
+ * the currently logged in user, use the "primary" keyword.
66
+ * @param array $optParams Optional parameters.
67
+ * @return Google_Service_Calendar_Calendar
68
+ */
69
+ public function get($calendarId, $optParams = array())
70
+ {
71
+ $params = array('calendarId' => $calendarId);
72
+ $params = \array_merge($params, $optParams);
73
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar");
74
+ }
75
+ /**
76
+ * Creates a secondary calendar. (calendars.insert)
77
+ *
78
+ * @param Google_Service_Calendar_Calendar $postBody
79
+ * @param array $optParams Optional parameters.
80
+ * @return Google_Service_Calendar_Calendar
81
+ */
82
+ public function insert(\SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar $postBody, $optParams = array())
83
+ {
84
+ $params = array('postBody' => $postBody);
85
+ $params = \array_merge($params, $optParams);
86
+ return $this->call('insert', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar");
87
+ }
88
+ /**
89
+ * Updates metadata for a calendar. This method supports patch semantics.
90
+ * (calendars.patch)
91
+ *
92
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
93
+ * the calendarList.list method. If you want to access the primary calendar of
94
+ * the currently logged in user, use the "primary" keyword.
95
+ * @param Google_Service_Calendar_Calendar $postBody
96
+ * @param array $optParams Optional parameters.
97
+ * @return Google_Service_Calendar_Calendar
98
+ */
99
+ public function patch($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar $postBody, $optParams = array())
100
+ {
101
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
102
+ $params = \array_merge($params, $optParams);
103
+ return $this->call('patch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar");
104
+ }
105
+ /**
106
+ * Updates metadata for a calendar. (calendars.update)
107
+ *
108
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
109
+ * the calendarList.list method. If you want to access the primary calendar of
110
+ * the currently logged in user, use the "primary" keyword.
111
+ * @param Google_Service_Calendar_Calendar $postBody
112
+ * @param array $optParams Optional parameters.
113
+ * @return Google_Service_Calendar_Calendar
114
+ */
115
+ public function update($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar $postBody, $optParams = array())
116
+ {
117
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
118
+ $params = \array_merge($params, $optParams);
119
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Calendar");
120
+ }
121
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Channels.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "channels" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $channels = $calendarService->channels;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Channels extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Stop watching resources through this channel (channels.stop)
32
+ *
33
+ * @param Google_Service_Calendar_Channel $postBody
34
+ * @param array $optParams Optional parameters.
35
+ */
36
+ public function stop(\SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel $postBody, $optParams = array())
37
+ {
38
+ $params = array('postBody' => $postBody);
39
+ $params = \array_merge($params, $optParams);
40
+ return $this->call('stop', array($params));
41
+ }
42
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Colors.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "colors" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $colors = $calendarService->colors;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Colors extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Returns the color definitions for calendars and events. (colors.get)
32
+ *
33
+ * @param array $optParams Optional parameters.
34
+ * @return Google_Service_Calendar_Colors
35
+ */
36
+ public function get($optParams = array())
37
+ {
38
+ $params = array();
39
+ $params = \array_merge($params, $optParams);
40
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Colors");
41
+ }
42
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Events.php ADDED
@@ -0,0 +1,485 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "events" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $events = $calendarService->events;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Events extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Deletes an event. (events.delete)
32
+ *
33
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
34
+ * the calendarList.list method. If you want to access the primary calendar of
35
+ * the currently logged in user, use the "primary" keyword.
36
+ * @param string $eventId Event identifier.
37
+ * @param array $optParams Optional parameters.
38
+ *
39
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
40
+ *
41
+ * Whether to send notifications about the deletion of the event. Note that some
42
+ * emails might still be sent even if you set the value to false. The default is
43
+ * false.
44
+ * @opt_param string sendUpdates Guests who should receive notifications about
45
+ * the deletion of the event.
46
+ */
47
+ public function delete($calendarId, $eventId, $optParams = array())
48
+ {
49
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
50
+ $params = \array_merge($params, $optParams);
51
+ return $this->call('delete', array($params));
52
+ }
53
+ /**
54
+ * Returns an event. (events.get)
55
+ *
56
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
57
+ * the calendarList.list method. If you want to access the primary calendar of
58
+ * the currently logged in user, use the "primary" keyword.
59
+ * @param string $eventId Event identifier.
60
+ * @param array $optParams Optional parameters.
61
+ *
62
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
63
+ * always be returned in the email field for the organizer, creator and
64
+ * attendees, even if no real email address is available (i.e. a generated, non-
65
+ * working value will be provided).
66
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
67
+ * response. If there are more than the specified number of attendees, only the
68
+ * participant is returned. Optional.
69
+ * @opt_param string timeZone Time zone used in the response. Optional. The
70
+ * default is the time zone of the calendar.
71
+ * @return Google_Service_Calendar_Event
72
+ */
73
+ public function get($calendarId, $eventId, $optParams = array())
74
+ {
75
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
76
+ $params = \array_merge($params, $optParams);
77
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
78
+ }
79
+ /**
80
+ * Imports an event. This operation is used to add a private copy of an existing
81
+ * event to a calendar. (events.import)
82
+ *
83
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
84
+ * the calendarList.list method. If you want to access the primary calendar of
85
+ * the currently logged in user, use the "primary" keyword.
86
+ * @param Google_Service_Calendar_Event $postBody
87
+ * @param array $optParams Optional parameters.
88
+ *
89
+ * @opt_param int conferenceDataVersion Version number of conference data
90
+ * supported by the API client. Version 0 assumes no conference data support and
91
+ * ignores conference data in the event's body. Version 1 enables support for
92
+ * copying of ConferenceData as well as for creating new conferences using the
93
+ * createRequest field of conferenceData. The default is 0.
94
+ * @opt_param bool supportsAttachments Whether API client performing operation
95
+ * supports event attachments. Optional. The default is False.
96
+ * @return Google_Service_Calendar_Event
97
+ */
98
+ public function import($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Event $postBody, $optParams = array())
99
+ {
100
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
101
+ $params = \array_merge($params, $optParams);
102
+ return $this->call('import', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
103
+ }
104
+ /**
105
+ * Creates an event. (events.insert)
106
+ *
107
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
108
+ * the calendarList.list method. If you want to access the primary calendar of
109
+ * the currently logged in user, use the "primary" keyword.
110
+ * @param Google_Service_Calendar_Event $postBody
111
+ * @param array $optParams Optional parameters.
112
+ *
113
+ * @opt_param int conferenceDataVersion Version number of conference data
114
+ * supported by the API client. Version 0 assumes no conference data support and
115
+ * ignores conference data in the event's body. Version 1 enables support for
116
+ * copying of ConferenceData as well as for creating new conferences using the
117
+ * createRequest field of conferenceData. The default is 0.
118
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
119
+ * response. If there are more than the specified number of attendees, only the
120
+ * participant is returned. Optional.
121
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
122
+ *
123
+ * Whether to send notifications about the creation of the new event. Note that
124
+ * some emails might still be sent even if you set the value to false. The
125
+ * default is false.
126
+ * @opt_param string sendUpdates Whether to send notifications about the
127
+ * creation of the new event. Note that some emails might still be sent. The
128
+ * default is false.
129
+ * @opt_param bool supportsAttachments Whether API client performing operation
130
+ * supports event attachments. Optional. The default is False.
131
+ * @return Google_Service_Calendar_Event
132
+ */
133
+ public function insert($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Event $postBody, $optParams = array())
134
+ {
135
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
136
+ $params = \array_merge($params, $optParams);
137
+ return $this->call('insert', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
138
+ }
139
+ /**
140
+ * Returns instances of the specified recurring event. (events.instances)
141
+ *
142
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
143
+ * the calendarList.list method. If you want to access the primary calendar of
144
+ * the currently logged in user, use the "primary" keyword.
145
+ * @param string $eventId Recurring event identifier.
146
+ * @param array $optParams Optional parameters.
147
+ *
148
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
149
+ * always be returned in the email field for the organizer, creator and
150
+ * attendees, even if no real email address is available (i.e. a generated, non-
151
+ * working value will be provided).
152
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
153
+ * response. If there are more than the specified number of attendees, only the
154
+ * participant is returned. Optional.
155
+ * @opt_param int maxResults Maximum number of events returned on one result
156
+ * page. By default the value is 250 events. The page size can never be larger
157
+ * than 2500 events. Optional.
158
+ * @opt_param string originalStart The original start time of the instance in
159
+ * the result. Optional.
160
+ * @opt_param string pageToken Token specifying which result page to return.
161
+ * Optional.
162
+ * @opt_param bool showDeleted Whether to include deleted events (with status
163
+ * equals "cancelled") in the result. Cancelled instances of recurring events
164
+ * will still be included if singleEvents is False. Optional. The default is
165
+ * False.
166
+ * @opt_param string timeMax Upper bound (exclusive) for an event's start time
167
+ * to filter by. Optional. The default is not to filter by start time. Must be
168
+ * an RFC3339 timestamp with mandatory time zone offset.
169
+ * @opt_param string timeMin Lower bound (inclusive) for an event's end time to
170
+ * filter by. Optional. The default is not to filter by end time. Must be an
171
+ * RFC3339 timestamp with mandatory time zone offset.
172
+ * @opt_param string timeZone Time zone used in the response. Optional. The
173
+ * default is the time zone of the calendar.
174
+ * @return Google_Service_Calendar_Events
175
+ */
176
+ public function instances($calendarId, $eventId, $optParams = array())
177
+ {
178
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId);
179
+ $params = \array_merge($params, $optParams);
180
+ return $this->call('instances', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Events");
181
+ }
182
+ /**
183
+ * Returns events on the specified calendar. (events.listEvents)
184
+ *
185
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
186
+ * the calendarList.list method. If you want to access the primary calendar of
187
+ * the currently logged in user, use the "primary" keyword.
188
+ * @param array $optParams Optional parameters.
189
+ *
190
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
191
+ * always be returned in the email field for the organizer, creator and
192
+ * attendees, even if no real email address is available (i.e. a generated, non-
193
+ * working value will be provided).
194
+ * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
195
+ * included in the response. Optional.
196
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
197
+ * response. If there are more than the specified number of attendees, only the
198
+ * participant is returned. Optional.
199
+ * @opt_param int maxResults Maximum number of events returned on one result
200
+ * page. The number of events in the resulting page may be less than this value,
201
+ * or none at all, even if there are more events matching the query. Incomplete
202
+ * pages can be detected by a non-empty nextPageToken field in the response. By
203
+ * default the value is 250 events. The page size can never be larger than 2500
204
+ * events. Optional.
205
+ * @opt_param string orderBy The order of the events returned in the result.
206
+ * Optional. The default is an unspecified, stable order.
207
+ * @opt_param string pageToken Token specifying which result page to return.
208
+ * Optional.
209
+ * @opt_param string privateExtendedProperty Extended properties constraint
210
+ * specified as propertyName=value. Matches only private properties. This
211
+ * parameter might be repeated multiple times to return events that match all
212
+ * given constraints.
213
+ * @opt_param string q Free text search terms to find events that match these
214
+ * terms in any field, except for extended properties. Optional.
215
+ * @opt_param string sharedExtendedProperty Extended properties constraint
216
+ * specified as propertyName=value. Matches only shared properties. This
217
+ * parameter might be repeated multiple times to return events that match all
218
+ * given constraints.
219
+ * @opt_param bool showDeleted Whether to include deleted events (with status
220
+ * equals "cancelled") in the result. Cancelled instances of recurring events
221
+ * (but not the underlying recurring event) will still be included if
222
+ * showDeleted and singleEvents are both False. If showDeleted and singleEvents
223
+ * are both True, only single instances of deleted events (but not the
224
+ * underlying recurring events) are returned. Optional. The default is False.
225
+ * @opt_param bool showHiddenInvitations Whether to include hidden invitations
226
+ * in the result. Optional. The default is False.
227
+ * @opt_param bool singleEvents Whether to expand recurring events into
228
+ * instances and only return single one-off events and instances of recurring
229
+ * events, but not the underlying recurring events themselves. Optional. The
230
+ * default is False.
231
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
232
+ * returned on the last page of results from the previous list request. It makes
233
+ * the result of this list request contain only entries that have changed since
234
+ * then. All events deleted since the previous list request will always be in
235
+ * the result set and it is not allowed to set showDeleted to False. There are
236
+ * several query parameters that cannot be specified together with nextSyncToken
237
+ * to ensure consistency of the client state.
238
+ *
239
+ * These are: - iCalUID - orderBy - privateExtendedProperty - q -
240
+ * sharedExtendedProperty - timeMin - timeMax - updatedMin If the syncToken
241
+ * expires, the server will respond with a 410 GONE response code and the client
242
+ * should clear its storage and perform a full synchronization without any
243
+ * syncToken. Learn more about incremental synchronization. Optional. The
244
+ * default is to return all entries.
245
+ * @opt_param string timeMax Upper bound (exclusive) for an event's start time
246
+ * to filter by. Optional. The default is not to filter by start time. Must be
247
+ * an RFC3339 timestamp with mandatory time zone offset, for example,
248
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
249
+ * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
250
+ * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
251
+ * filter by. Optional. The default is not to filter by end time. Must be an
252
+ * RFC3339 timestamp with mandatory time zone offset, for example,
253
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
254
+ * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
255
+ * @opt_param string timeZone Time zone used in the response. Optional. The
256
+ * default is the time zone of the calendar.
257
+ * @opt_param string updatedMin Lower bound for an event's last modification
258
+ * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
259
+ * since this time will always be included regardless of showDeleted. Optional.
260
+ * The default is not to filter by last modification time.
261
+ * @return Google_Service_Calendar_Events
262
+ */
263
+ public function listEvents($calendarId, $optParams = array())
264
+ {
265
+ $params = array('calendarId' => $calendarId);
266
+ $params = \array_merge($params, $optParams);
267
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Events");
268
+ }
269
+ /**
270
+ * Moves an event to another calendar, i.e. changes an event's organizer.
271
+ * (events.move)
272
+ *
273
+ * @param string $calendarId Calendar identifier of the source calendar where
274
+ * the event currently is on.
275
+ * @param string $eventId Event identifier.
276
+ * @param string $destination Calendar identifier of the target calendar where
277
+ * the event is to be moved to.
278
+ * @param array $optParams Optional parameters.
279
+ *
280
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
281
+ *
282
+ * Whether to send notifications about the change of the event's organizer. Note
283
+ * that some emails might still be sent even if you set the value to false. The
284
+ * default is false.
285
+ * @opt_param string sendUpdates Guests who should receive notifications about
286
+ * the change of the event's organizer.
287
+ * @return Google_Service_Calendar_Event
288
+ */
289
+ public function move($calendarId, $eventId, $destination, $optParams = array())
290
+ {
291
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId, 'destination' => $destination);
292
+ $params = \array_merge($params, $optParams);
293
+ return $this->call('move', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
294
+ }
295
+ /**
296
+ * Updates an event. This method supports patch semantics. (events.patch)
297
+ *
298
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
299
+ * the calendarList.list method. If you want to access the primary calendar of
300
+ * the currently logged in user, use the "primary" keyword.
301
+ * @param string $eventId Event identifier.
302
+ * @param Google_Service_Calendar_Event $postBody
303
+ * @param array $optParams Optional parameters.
304
+ *
305
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
306
+ * always be returned in the email field for the organizer, creator and
307
+ * attendees, even if no real email address is available (i.e. a generated, non-
308
+ * working value will be provided).
309
+ * @opt_param int conferenceDataVersion Version number of conference data
310
+ * supported by the API client. Version 0 assumes no conference data support and
311
+ * ignores conference data in the event's body. Version 1 enables support for
312
+ * copying of ConferenceData as well as for creating new conferences using the
313
+ * createRequest field of conferenceData. The default is 0.
314
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
315
+ * response. If there are more than the specified number of attendees, only the
316
+ * participant is returned. Optional.
317
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
318
+ *
319
+ * Whether to send notifications about the event update (for example,
320
+ * description changes, etc.). Note that some emails might still be sent even if
321
+ * you set the value to false. The default is false.
322
+ * @opt_param string sendUpdates Guests who should receive notifications about
323
+ * the event update (for example, title changes, etc.).
324
+ * @opt_param bool supportsAttachments Whether API client performing operation
325
+ * supports event attachments. Optional. The default is False.
326
+ * @return Google_Service_Calendar_Event
327
+ */
328
+ public function patch($calendarId, $eventId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Event $postBody, $optParams = array())
329
+ {
330
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId, 'postBody' => $postBody);
331
+ $params = \array_merge($params, $optParams);
332
+ return $this->call('patch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
333
+ }
334
+ /**
335
+ * Creates an event based on a simple text string. (events.quickAdd)
336
+ *
337
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
338
+ * the calendarList.list method. If you want to access the primary calendar of
339
+ * the currently logged in user, use the "primary" keyword.
340
+ * @param string $text The text describing the event to be created.
341
+ * @param array $optParams Optional parameters.
342
+ *
343
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
344
+ *
345
+ * Whether to send notifications about the creation of the event. Note that some
346
+ * emails might still be sent even if you set the value to false. The default is
347
+ * false.
348
+ * @opt_param string sendUpdates Guests who should receive notifications about
349
+ * the creation of the new event.
350
+ * @return Google_Service_Calendar_Event
351
+ */
352
+ public function quickAdd($calendarId, $text, $optParams = array())
353
+ {
354
+ $params = array('calendarId' => $calendarId, 'text' => $text);
355
+ $params = \array_merge($params, $optParams);
356
+ return $this->call('quickAdd', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
357
+ }
358
+ /**
359
+ * Updates an event. (events.update)
360
+ *
361
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
362
+ * the calendarList.list method. If you want to access the primary calendar of
363
+ * the currently logged in user, use the "primary" keyword.
364
+ * @param string $eventId Event identifier.
365
+ * @param Google_Service_Calendar_Event $postBody
366
+ * @param array $optParams Optional parameters.
367
+ *
368
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
369
+ * always be returned in the email field for the organizer, creator and
370
+ * attendees, even if no real email address is available (i.e. a generated, non-
371
+ * working value will be provided).
372
+ * @opt_param int conferenceDataVersion Version number of conference data
373
+ * supported by the API client. Version 0 assumes no conference data support and
374
+ * ignores conference data in the event's body. Version 1 enables support for
375
+ * copying of ConferenceData as well as for creating new conferences using the
376
+ * createRequest field of conferenceData. The default is 0.
377
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
378
+ * response. If there are more than the specified number of attendees, only the
379
+ * participant is returned. Optional.
380
+ * @opt_param bool sendNotifications Deprecated. Please use sendUpdates instead.
381
+ *
382
+ * Whether to send notifications about the event update (for example,
383
+ * description changes, etc.). Note that some emails might still be sent even if
384
+ * you set the value to false. The default is false.
385
+ * @opt_param string sendUpdates Guests who should receive notifications about
386
+ * the event update (for example, title changes, etc.).
387
+ * @opt_param bool supportsAttachments Whether API client performing operation
388
+ * supports event attachments. Optional. The default is False.
389
+ * @return Google_Service_Calendar_Event
390
+ */
391
+ public function update($calendarId, $eventId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Event $postBody, $optParams = array())
392
+ {
393
+ $params = array('calendarId' => $calendarId, 'eventId' => $eventId, 'postBody' => $postBody);
394
+ $params = \array_merge($params, $optParams);
395
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Event");
396
+ }
397
+ /**
398
+ * Watch for changes to Events resources. (events.watch)
399
+ *
400
+ * @param string $calendarId Calendar identifier. To retrieve calendar IDs call
401
+ * the calendarList.list method. If you want to access the primary calendar of
402
+ * the currently logged in user, use the "primary" keyword.
403
+ * @param Google_Service_Calendar_Channel $postBody
404
+ * @param array $optParams Optional parameters.
405
+ *
406
+ * @opt_param bool alwaysIncludeEmail Deprecated and ignored. A value will
407
+ * always be returned in the email field for the organizer, creator and
408
+ * attendees, even if no real email address is available (i.e. a generated, non-
409
+ * working value will be provided).
410
+ * @opt_param string iCalUID Specifies event ID in the iCalendar format to be
411
+ * included in the response. Optional.
412
+ * @opt_param int maxAttendees The maximum number of attendees to include in the
413
+ * response. If there are more than the specified number of attendees, only the
414
+ * participant is returned. Optional.
415
+ * @opt_param int maxResults Maximum number of events returned on one result
416
+ * page. The number of events in the resulting page may be less than this value,
417
+ * or none at all, even if there are more events matching the query. Incomplete
418
+ * pages can be detected by a non-empty nextPageToken field in the response. By
419
+ * default the value is 250 events. The page size can never be larger than 2500
420
+ * events. Optional.
421
+ * @opt_param string orderBy The order of the events returned in the result.
422
+ * Optional. The default is an unspecified, stable order.
423
+ * @opt_param string pageToken Token specifying which result page to return.
424
+ * Optional.
425
+ * @opt_param string privateExtendedProperty Extended properties constraint
426
+ * specified as propertyName=value. Matches only private properties. This
427
+ * parameter might be repeated multiple times to return events that match all
428
+ * given constraints.
429
+ * @opt_param string q Free text search terms to find events that match these
430
+ * terms in any field, except for extended properties. Optional.
431
+ * @opt_param string sharedExtendedProperty Extended properties constraint
432
+ * specified as propertyName=value. Matches only shared properties. This
433
+ * parameter might be repeated multiple times to return events that match all
434
+ * given constraints.
435
+ * @opt_param bool showDeleted Whether to include deleted events (with status
436
+ * equals "cancelled") in the result. Cancelled instances of recurring events
437
+ * (but not the underlying recurring event) will still be included if
438
+ * showDeleted and singleEvents are both False. If showDeleted and singleEvents
439
+ * are both True, only single instances of deleted events (but not the
440
+ * underlying recurring events) are returned. Optional. The default is False.
441
+ * @opt_param bool showHiddenInvitations Whether to include hidden invitations
442
+ * in the result. Optional. The default is False.
443
+ * @opt_param bool singleEvents Whether to expand recurring events into
444
+ * instances and only return single one-off events and instances of recurring
445
+ * events, but not the underlying recurring events themselves. Optional. The
446
+ * default is False.
447
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
448
+ * returned on the last page of results from the previous list request. It makes
449
+ * the result of this list request contain only entries that have changed since
450
+ * then. All events deleted since the previous list request will always be in
451
+ * the result set and it is not allowed to set showDeleted to False. There are
452
+ * several query parameters that cannot be specified together with nextSyncToken
453
+ * to ensure consistency of the client state.
454
+ *
455
+ * These are: - iCalUID - orderBy - privateExtendedProperty - q -
456
+ * sharedExtendedProperty - timeMin - timeMax - updatedMin If the syncToken
457
+ * expires, the server will respond with a 410 GONE response code and the client
458
+ * should clear its storage and perform a full synchronization without any
459
+ * syncToken. Learn more about incremental synchronization. Optional. The
460
+ * default is to return all entries.
461
+ * @opt_param string timeMax Upper bound (exclusive) for an event's start time
462
+ * to filter by. Optional. The default is not to filter by start time. Must be
463
+ * an RFC3339 timestamp with mandatory time zone offset, for example,
464
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
465
+ * but are ignored. If timeMin is set, timeMax must be greater than timeMin.
466
+ * @opt_param string timeMin Lower bound (exclusive) for an event's end time to
467
+ * filter by. Optional. The default is not to filter by end time. Must be an
468
+ * RFC3339 timestamp with mandatory time zone offset, for example,
469
+ * 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. Milliseconds may be provided
470
+ * but are ignored. If timeMax is set, timeMin must be smaller than timeMax.
471
+ * @opt_param string timeZone Time zone used in the response. Optional. The
472
+ * default is the time zone of the calendar.
473
+ * @opt_param string updatedMin Lower bound for an event's last modification
474
+ * time (as a RFC3339 timestamp) to filter by. When specified, entries deleted
475
+ * since this time will always be included regardless of showDeleted. Optional.
476
+ * The default is not to filter by last modification time.
477
+ * @return Google_Service_Calendar_Channel
478
+ */
479
+ public function watch($calendarId, \SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel $postBody, $optParams = array())
480
+ {
481
+ $params = array('calendarId' => $calendarId, 'postBody' => $postBody);
482
+ $params = \array_merge($params, $optParams);
483
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel");
484
+ }
485
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Freebusy.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "freebusy" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $freebusy = $calendarService->freebusy;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Freebusy extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Returns free/busy information for a set of calendars. (freebusy.query)
32
+ *
33
+ * @param Google_Service_Calendar_FreeBusyRequest $postBody
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_Calendar_FreeBusyResponse
36
+ */
37
+ public function query(\SimpleCalendar\plugin_deps\Google_Service_Calendar_FreeBusyRequest $postBody, $optParams = array())
38
+ {
39
+ $params = array('postBody' => $postBody);
40
+ $params = \array_merge($params, $optParams);
41
+ return $this->call('query', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_FreeBusyResponse");
42
+ }
43
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Resource/Settings.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "settings" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $calendarService = new Google_Service_Calendar(...);
25
+ * $settings = $calendarService->settings;
26
+ * </code>
27
+ */
28
+ class Google_Service_Calendar_Resource_Settings extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Returns a single user setting. (settings.get)
32
+ *
33
+ * @param string $setting The id of the user setting.
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_Calendar_Setting
36
+ */
37
+ public function get($setting, $optParams = array())
38
+ {
39
+ $params = array('setting' => $setting);
40
+ $params = \array_merge($params, $optParams);
41
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Setting");
42
+ }
43
+ /**
44
+ * Returns all user settings for the authenticated user. (settings.listSettings)
45
+ *
46
+ * @param array $optParams Optional parameters.
47
+ *
48
+ * @opt_param int maxResults Maximum number of entries returned on one result
49
+ * page. By default the value is 100 entries. The page size can never be larger
50
+ * than 250 entries. Optional.
51
+ * @opt_param string pageToken Token specifying which result page to return.
52
+ * Optional.
53
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
54
+ * returned on the last page of results from the previous list request. It makes
55
+ * the result of this list request contain only entries that have changed since
56
+ * then. If the syncToken expires, the server will respond with a 410 GONE
57
+ * response code and the client should clear its storage and perform a full
58
+ * synchronization without any syncToken. Learn more about incremental
59
+ * synchronization. Optional. The default is to return all entries.
60
+ * @return Google_Service_Calendar_Settings
61
+ */
62
+ public function listSettings($optParams = array())
63
+ {
64
+ $params = array();
65
+ $params = \array_merge($params, $optParams);
66
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Settings");
67
+ }
68
+ /**
69
+ * Watch for changes to Settings resources. (settings.watch)
70
+ *
71
+ * @param Google_Service_Calendar_Channel $postBody
72
+ * @param array $optParams Optional parameters.
73
+ *
74
+ * @opt_param int maxResults Maximum number of entries returned on one result
75
+ * page. By default the value is 100 entries. The page size can never be larger
76
+ * than 250 entries. Optional.
77
+ * @opt_param string pageToken Token specifying which result page to return.
78
+ * Optional.
79
+ * @opt_param string syncToken Token obtained from the nextSyncToken field
80
+ * returned on the last page of results from the previous list request. It makes
81
+ * the result of this list request contain only entries that have changed since
82
+ * then. If the syncToken expires, the server will respond with a 410 GONE
83
+ * response code and the client should clear its storage and perform a full
84
+ * synchronization without any syncToken. Learn more about incremental
85
+ * synchronization. Optional. The default is to return all entries.
86
+ * @return Google_Service_Calendar_Channel
87
+ */
88
+ public function watch(\SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel $postBody, $optParams = array())
89
+ {
90
+ $params = array('postBody' => $postBody);
91
+ $params = \array_merge($params, $optParams);
92
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Calendar_Channel");
93
+ }
94
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Setting.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Setting extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $etag;
23
+ public $id;
24
+ public $kind;
25
+ public $value;
26
+ public function setEtag($etag)
27
+ {
28
+ $this->etag = $etag;
29
+ }
30
+ public function getEtag()
31
+ {
32
+ return $this->etag;
33
+ }
34
+ public function setId($id)
35
+ {
36
+ $this->id = $id;
37
+ }
38
+ public function getId()
39
+ {
40
+ return $this->id;
41
+ }
42
+ public function setKind($kind)
43
+ {
44
+ $this->kind = $kind;
45
+ }
46
+ public function getKind()
47
+ {
48
+ return $this->kind;
49
+ }
50
+ public function setValue($value)
51
+ {
52
+ $this->value = $value;
53
+ }
54
+ public function getValue()
55
+ {
56
+ return $this->value;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/Settings.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_Settings extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'items';
23
+ public $etag;
24
+ protected $itemsType = 'SimpleCalendar\plugin_deps\Google_Service_Calendar_Setting';
25
+ protected $itemsDataType = 'array';
26
+ public $kind;
27
+ public $nextPageToken;
28
+ public $nextSyncToken;
29
+ public function setEtag($etag)
30
+ {
31
+ $this->etag = $etag;
32
+ }
33
+ public function getEtag()
34
+ {
35
+ return $this->etag;
36
+ }
37
+ /**
38
+ * @param Google_Service_Calendar_Setting[]
39
+ */
40
+ public function setItems($items)
41
+ {
42
+ $this->items = $items;
43
+ }
44
+ /**
45
+ * @return Google_Service_Calendar_Setting[]
46
+ */
47
+ public function getItems()
48
+ {
49
+ return $this->items;
50
+ }
51
+ public function setKind($kind)
52
+ {
53
+ $this->kind = $kind;
54
+ }
55
+ public function getKind()
56
+ {
57
+ return $this->kind;
58
+ }
59
+ public function setNextPageToken($nextPageToken)
60
+ {
61
+ $this->nextPageToken = $nextPageToken;
62
+ }
63
+ public function getNextPageToken()
64
+ {
65
+ return $this->nextPageToken;
66
+ }
67
+ public function setNextSyncToken($nextSyncToken)
68
+ {
69
+ $this->nextSyncToken = $nextSyncToken;
70
+ }
71
+ public function getNextSyncToken()
72
+ {
73
+ return $this->nextSyncToken;
74
+ }
75
+ }
third-party/google/apiclient-services/src/Google/Service/Calendar/TimePeriod.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Calendar_TimePeriod extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $end;
23
+ public $start;
24
+ public function setEnd($end)
25
+ {
26
+ $this->end = $end;
27
+ }
28
+ public function getEnd()
29
+ {
30
+ return $this->end;
31
+ }
32
+ public function setStart($start)
33
+ {
34
+ $this->start = $start;
35
+ }
36
+ public function getStart()
37
+ {
38
+ return $this->start;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Drive.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * Service definition for Drive (v3).
22
+ *
23
+ * <p>
24
+ * Manages files in Drive including uploading, downloading, searching, detecting
25
+ * changes, and updating sharing permissions.</p>
26
+ *
27
+ * <p>
28
+ * For more information about this service, see the API
29
+ * <a href="https://developers.google.com/drive/" target="_blank">Documentation</a>
30
+ * </p>
31
+ *
32
+ * @author Google, Inc.
33
+ */
34
+ class Google_Service_Drive extends \SimpleCalendar\plugin_deps\Google_Service
35
+ {
36
+ /** See, edit, create, and delete all of your Google Drive files. */
37
+ const DRIVE = "https://www.googleapis.com/auth/drive";
38
+ /** See, create, and delete its own configuration data in your Google Drive. */
39
+ const DRIVE_APPDATA = "https://www.googleapis.com/auth/drive.appdata";
40
+ /** See, edit, create, and delete only the specific Google Drive files you use with this app. */
41
+ const DRIVE_FILE = "https://www.googleapis.com/auth/drive.file";
42
+ /** View and manage metadata of files in your Google Drive. */
43
+ const DRIVE_METADATA = "https://www.googleapis.com/auth/drive.metadata";
44
+ /** See information about your Google Drive files. */
45
+ const DRIVE_METADATA_READONLY = "https://www.googleapis.com/auth/drive.metadata.readonly";
46
+ /** View the photos, videos and albums in your Google Photos. */
47
+ const DRIVE_PHOTOS_READONLY = "https://www.googleapis.com/auth/drive.photos.readonly";
48
+ /** See and download all your Google Drive files. */
49
+ const DRIVE_READONLY = "https://www.googleapis.com/auth/drive.readonly";
50
+ /** Modify your Google Apps Script scripts' behavior. */
51
+ const DRIVE_SCRIPTS = "https://www.googleapis.com/auth/drive.scripts";
52
+ public $about;
53
+ public $changes;
54
+ public $channels;
55
+ public $comments;
56
+ public $drives;
57
+ public $files;
58
+ public $permissions;
59
+ public $replies;
60
+ public $revisions;
61
+ public $teamdrives;
62
+ /**
63
+ * Constructs the internal representation of the Drive service.
64
+ *
65
+ * @param Google_Client $client The client used to deliver requests.
66
+ * @param string $rootUrl The root URL used for requests to the service.
67
+ */
68
+ public function __construct(\SimpleCalendar\plugin_deps\Google_Client $client, $rootUrl = null)
69
+ {
70
+ parent::__construct($client);
71
+ $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
72
+ $this->servicePath = 'drive/v3/';
73
+ $this->batchPath = 'batch/drive/v3';
74
+ $this->version = 'v3';
75
+ $this->serviceName = 'drive';
76
+ $this->about = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_About($this, $this->serviceName, 'about', array('methods' => array('get' => array('path' => 'about', 'httpMethod' => 'GET', 'parameters' => array()))));
77
+ $this->changes = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Changes($this, $this->serviceName, 'changes', array('methods' => array('getStartPageToken' => array('path' => 'changes/startPageToken', 'httpMethod' => 'GET', 'parameters' => array('driveId' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'teamDriveId' => array('location' => 'query', 'type' => 'string'))), 'list' => array('path' => 'changes', 'httpMethod' => 'GET', 'parameters' => array('pageToken' => array('location' => 'query', 'type' => 'string', 'required' => \true), 'driveId' => array('location' => 'query', 'type' => 'string'), 'includeCorpusRemovals' => array('location' => 'query', 'type' => 'boolean'), 'includeItemsFromAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'includeRemoved' => array('location' => 'query', 'type' => 'boolean'), 'includeTeamDriveItems' => array('location' => 'query', 'type' => 'boolean'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'restrictToMyDrive' => array('location' => 'query', 'type' => 'boolean'), 'spaces' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'teamDriveId' => array('location' => 'query', 'type' => 'string'))), 'watch' => array('path' => 'changes/watch', 'httpMethod' => 'POST', 'parameters' => array('pageToken' => array('location' => 'query', 'type' => 'string', 'required' => \true), 'driveId' => array('location' => 'query', 'type' => 'string'), 'includeCorpusRemovals' => array('location' => 'query', 'type' => 'boolean'), 'includeItemsFromAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'includeRemoved' => array('location' => 'query', 'type' => 'boolean'), 'includeTeamDriveItems' => array('location' => 'query', 'type' => 'boolean'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'restrictToMyDrive' => array('location' => 'query', 'type' => 'boolean'), 'spaces' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'teamDriveId' => array('location' => 'query', 'type' => 'string'))))));
78
+ $this->channels = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Channels($this, $this->serviceName, 'channels', array('methods' => array('stop' => array('path' => 'channels/stop', 'httpMethod' => 'POST', 'parameters' => array()))));
79
+ $this->comments = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Comments($this, $this->serviceName, 'comments', array('methods' => array('create' => array('path' => 'files/{fileId}/comments', 'httpMethod' => 'POST', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'delete' => array('path' => 'files/{fileId}/comments/{commentId}', 'httpMethod' => 'DELETE', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'files/{fileId}/comments/{commentId}', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'includeDeleted' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'files/{fileId}/comments', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'includeDeleted' => array('location' => 'query', 'type' => 'boolean'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'startModifiedTime' => array('location' => 'query', 'type' => 'string'))), 'update' => array('path' => 'files/{fileId}/comments/{commentId}', 'httpMethod' => 'PATCH', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true))))));
80
+ $this->drives = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Drives($this, $this->serviceName, 'drives', array('methods' => array('create' => array('path' => 'drives', 'httpMethod' => 'POST', 'parameters' => array('requestId' => array('location' => 'query', 'type' => 'string', 'required' => \true))), 'delete' => array('path' => 'drives/{driveId}', 'httpMethod' => 'DELETE', 'parameters' => array('driveId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'drives/{driveId}', 'httpMethod' => 'GET', 'parameters' => array('driveId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'hide' => array('path' => 'drives/{driveId}/hide', 'httpMethod' => 'POST', 'parameters' => array('driveId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'list' => array('path' => 'drives', 'httpMethod' => 'GET', 'parameters' => array('pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'q' => array('location' => 'query', 'type' => 'string'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'unhide' => array('path' => 'drives/{driveId}/unhide', 'httpMethod' => 'POST', 'parameters' => array('driveId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'update' => array('path' => 'drives/{driveId}', 'httpMethod' => 'PATCH', 'parameters' => array('driveId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))))));
81
+ $this->files = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Files($this, $this->serviceName, 'files', array('methods' => array('copy' => array('path' => 'files/{fileId}/copy', 'httpMethod' => 'POST', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'), 'ignoreDefaultVisibility' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'keepRevisionForever' => array('location' => 'query', 'type' => 'boolean'), 'ocrLanguage' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'))), 'create' => array('path' => 'files', 'httpMethod' => 'POST', 'parameters' => array('enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'), 'ignoreDefaultVisibility' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'keepRevisionForever' => array('location' => 'query', 'type' => 'boolean'), 'ocrLanguage' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'useContentAsIndexableText' => array('location' => 'query', 'type' => 'boolean'))), 'delete' => array('path' => 'files/{fileId}', 'httpMethod' => 'DELETE', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'))), 'emptyTrash' => array('path' => 'files/trash', 'httpMethod' => 'DELETE', 'parameters' => array('enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'))), 'export' => array('path' => 'files/{fileId}/export', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'mimeType' => array('location' => 'query', 'type' => 'string', 'required' => \true))), 'generateIds' => array('path' => 'files/generateIds', 'httpMethod' => 'GET', 'parameters' => array('count' => array('location' => 'query', 'type' => 'integer'), 'space' => array('location' => 'query', 'type' => 'string'))), 'get' => array('path' => 'files/{fileId}', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'acknowledgeAbuse' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'files', 'httpMethod' => 'GET', 'parameters' => array('corpora' => array('location' => 'query', 'type' => 'string'), 'corpus' => array('location' => 'query', 'type' => 'string'), 'driveId' => array('location' => 'query', 'type' => 'string'), 'includeItemsFromAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'includeTeamDriveItems' => array('location' => 'query', 'type' => 'boolean'), 'orderBy' => array('location' => 'query', 'type' => 'string'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'q' => array('location' => 'query', 'type' => 'string'), 'spaces' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'teamDriveId' => array('location' => 'query', 'type' => 'string'))), 'update' => array('path' => 'files/{fileId}', 'httpMethod' => 'PATCH', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'addParents' => array('location' => 'query', 'type' => 'string'), 'enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'keepRevisionForever' => array('location' => 'query', 'type' => 'boolean'), 'ocrLanguage' => array('location' => 'query', 'type' => 'string'), 'removeParents' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'useContentAsIndexableText' => array('location' => 'query', 'type' => 'boolean'))), 'watch' => array('path' => 'files/{fileId}/watch', 'httpMethod' => 'POST', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'acknowledgeAbuse' => array('location' => 'query', 'type' => 'boolean'), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'))))));
82
+ $this->permissions = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Permissions($this, $this->serviceName, 'permissions', array('methods' => array('create' => array('path' => 'files/{fileId}/permissions', 'httpMethod' => 'POST', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'emailMessage' => array('location' => 'query', 'type' => 'string'), 'enforceSingleParent' => array('location' => 'query', 'type' => 'boolean'), 'moveToNewOwnersRoot' => array('location' => 'query', 'type' => 'boolean'), 'sendNotificationEmail' => array('location' => 'query', 'type' => 'boolean'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'transferOwnership' => array('location' => 'query', 'type' => 'boolean'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'delete' => array('path' => 'files/{fileId}/permissions/{permissionId}', 'httpMethod' => 'DELETE', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'permissionId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'get' => array('path' => 'files/{fileId}/permissions/{permissionId}', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'permissionId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'files/{fileId}/permissions', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'includePermissionsForView' => array('location' => 'query', 'type' => 'string'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'update' => array('path' => 'files/{fileId}/permissions/{permissionId}', 'httpMethod' => 'PATCH', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'permissionId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'removeExpiration' => array('location' => 'query', 'type' => 'boolean'), 'supportsAllDrives' => array('location' => 'query', 'type' => 'boolean'), 'supportsTeamDrives' => array('location' => 'query', 'type' => 'boolean'), 'transferOwnership' => array('location' => 'query', 'type' => 'boolean'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))))));
83
+ $this->replies = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Replies($this, $this->serviceName, 'replies', array('methods' => array('create' => array('path' => 'files/{fileId}/comments/{commentId}/replies', 'httpMethod' => 'POST', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'delete' => array('path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', 'httpMethod' => 'DELETE', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'replyId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'replyId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'includeDeleted' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'files/{fileId}/comments/{commentId}/replies', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'includeDeleted' => array('location' => 'query', 'type' => 'boolean'), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'))), 'update' => array('path' => 'files/{fileId}/comments/{commentId}/replies/{replyId}', 'httpMethod' => 'PATCH', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'commentId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'replyId' => array('location' => 'path', 'type' => 'string', 'required' => \true))))));
84
+ $this->revisions = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Revisions($this, $this->serviceName, 'revisions', array('methods' => array('delete' => array('path' => 'files/{fileId}/revisions/{revisionId}', 'httpMethod' => 'DELETE', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'revisionId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'files/{fileId}/revisions/{revisionId}', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'revisionId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'acknowledgeAbuse' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'files/{fileId}/revisions', 'httpMethod' => 'GET', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'))), 'update' => array('path' => 'files/{fileId}/revisions/{revisionId}', 'httpMethod' => 'PATCH', 'parameters' => array('fileId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'revisionId' => array('location' => 'path', 'type' => 'string', 'required' => \true))))));
85
+ $this->teamdrives = new \SimpleCalendar\plugin_deps\Google_Service_Drive_Resource_Teamdrives($this, $this->serviceName, 'teamdrives', array('methods' => array('create' => array('path' => 'teamdrives', 'httpMethod' => 'POST', 'parameters' => array('requestId' => array('location' => 'query', 'type' => 'string', 'required' => \true))), 'delete' => array('path' => 'teamdrives/{teamDriveId}', 'httpMethod' => 'DELETE', 'parameters' => array('teamDriveId' => array('location' => 'path', 'type' => 'string', 'required' => \true))), 'get' => array('path' => 'teamdrives/{teamDriveId}', 'httpMethod' => 'GET', 'parameters' => array('teamDriveId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'list' => array('path' => 'teamdrives', 'httpMethod' => 'GET', 'parameters' => array('pageSize' => array('location' => 'query', 'type' => 'integer'), 'pageToken' => array('location' => 'query', 'type' => 'string'), 'q' => array('location' => 'query', 'type' => 'string'), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))), 'update' => array('path' => 'teamdrives/{teamDriveId}', 'httpMethod' => 'PATCH', 'parameters' => array('teamDriveId' => array('location' => 'path', 'type' => 'string', 'required' => \true), 'useDomainAdminAccess' => array('location' => 'query', 'type' => 'boolean'))))));
86
+ }
87
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/About.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_About extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'teamDriveThemes';
23
+ public $appInstalled;
24
+ public $canCreateDrives;
25
+ public $canCreateTeamDrives;
26
+ protected $driveThemesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_AboutDriveThemes';
27
+ protected $driveThemesDataType = 'array';
28
+ public $exportFormats;
29
+ public $folderColorPalette;
30
+ public $importFormats;
31
+ public $kind;
32
+ public $maxImportSizes;
33
+ public $maxUploadSize;
34
+ protected $storageQuotaType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_AboutStorageQuota';
35
+ protected $storageQuotaDataType = '';
36
+ protected $teamDriveThemesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_AboutTeamDriveThemes';
37
+ protected $teamDriveThemesDataType = 'array';
38
+ protected $userType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
39
+ protected $userDataType = '';
40
+ public function setAppInstalled($appInstalled)
41
+ {
42
+ $this->appInstalled = $appInstalled;
43
+ }
44
+ public function getAppInstalled()
45
+ {
46
+ return $this->appInstalled;
47
+ }
48
+ public function setCanCreateDrives($canCreateDrives)
49
+ {
50
+ $this->canCreateDrives = $canCreateDrives;
51
+ }
52
+ public function getCanCreateDrives()
53
+ {
54
+ return $this->canCreateDrives;
55
+ }
56
+ public function setCanCreateTeamDrives($canCreateTeamDrives)
57
+ {
58
+ $this->canCreateTeamDrives = $canCreateTeamDrives;
59
+ }
60
+ public function getCanCreateTeamDrives()
61
+ {
62
+ return $this->canCreateTeamDrives;
63
+ }
64
+ /**
65
+ * @param Google_Service_Drive_AboutDriveThemes[]
66
+ */
67
+ public function setDriveThemes($driveThemes)
68
+ {
69
+ $this->driveThemes = $driveThemes;
70
+ }
71
+ /**
72
+ * @return Google_Service_Drive_AboutDriveThemes[]
73
+ */
74
+ public function getDriveThemes()
75
+ {
76
+ return $this->driveThemes;
77
+ }
78
+ public function setExportFormats($exportFormats)
79
+ {
80
+ $this->exportFormats = $exportFormats;
81
+ }
82
+ public function getExportFormats()
83
+ {
84
+ return $this->exportFormats;
85
+ }
86
+ public function setFolderColorPalette($folderColorPalette)
87
+ {
88
+ $this->folderColorPalette = $folderColorPalette;
89
+ }
90
+ public function getFolderColorPalette()
91
+ {
92
+ return $this->folderColorPalette;
93
+ }
94
+ public function setImportFormats($importFormats)
95
+ {
96
+ $this->importFormats = $importFormats;
97
+ }
98
+ public function getImportFormats()
99
+ {
100
+ return $this->importFormats;
101
+ }
102
+ public function setKind($kind)
103
+ {
104
+ $this->kind = $kind;
105
+ }
106
+ public function getKind()
107
+ {
108
+ return $this->kind;
109
+ }
110
+ public function setMaxImportSizes($maxImportSizes)
111
+ {
112
+ $this->maxImportSizes = $maxImportSizes;
113
+ }
114
+ public function getMaxImportSizes()
115
+ {
116
+ return $this->maxImportSizes;
117
+ }
118
+ public function setMaxUploadSize($maxUploadSize)
119
+ {
120
+ $this->maxUploadSize = $maxUploadSize;
121
+ }
122
+ public function getMaxUploadSize()
123
+ {
124
+ return $this->maxUploadSize;
125
+ }
126
+ /**
127
+ * @param Google_Service_Drive_AboutStorageQuota
128
+ */
129
+ public function setStorageQuota(\SimpleCalendar\plugin_deps\Google_Service_Drive_AboutStorageQuota $storageQuota)
130
+ {
131
+ $this->storageQuota = $storageQuota;
132
+ }
133
+ /**
134
+ * @return Google_Service_Drive_AboutStorageQuota
135
+ */
136
+ public function getStorageQuota()
137
+ {
138
+ return $this->storageQuota;
139
+ }
140
+ /**
141
+ * @param Google_Service_Drive_AboutTeamDriveThemes[]
142
+ */
143
+ public function setTeamDriveThemes($teamDriveThemes)
144
+ {
145
+ $this->teamDriveThemes = $teamDriveThemes;
146
+ }
147
+ /**
148
+ * @return Google_Service_Drive_AboutTeamDriveThemes[]
149
+ */
150
+ public function getTeamDriveThemes()
151
+ {
152
+ return $this->teamDriveThemes;
153
+ }
154
+ /**
155
+ * @param Google_Service_Drive_User
156
+ */
157
+ public function setUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $user)
158
+ {
159
+ $this->user = $user;
160
+ }
161
+ /**
162
+ * @return Google_Service_Drive_User
163
+ */
164
+ public function getUser()
165
+ {
166
+ return $this->user;
167
+ }
168
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/AboutDriveThemes.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_AboutDriveThemes extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $backgroundImageLink;
23
+ public $colorRgb;
24
+ public $id;
25
+ public function setBackgroundImageLink($backgroundImageLink)
26
+ {
27
+ $this->backgroundImageLink = $backgroundImageLink;
28
+ }
29
+ public function getBackgroundImageLink()
30
+ {
31
+ return $this->backgroundImageLink;
32
+ }
33
+ public function setColorRgb($colorRgb)
34
+ {
35
+ $this->colorRgb = $colorRgb;
36
+ }
37
+ public function getColorRgb()
38
+ {
39
+ return $this->colorRgb;
40
+ }
41
+ public function setId($id)
42
+ {
43
+ $this->id = $id;
44
+ }
45
+ public function getId()
46
+ {
47
+ return $this->id;
48
+ }
49
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/AboutStorageQuota.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_AboutStorageQuota extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $limit;
23
+ public $usage;
24
+ public $usageInDrive;
25
+ public $usageInDriveTrash;
26
+ public function setLimit($limit)
27
+ {
28
+ $this->limit = $limit;
29
+ }
30
+ public function getLimit()
31
+ {
32
+ return $this->limit;
33
+ }
34
+ public function setUsage($usage)
35
+ {
36
+ $this->usage = $usage;
37
+ }
38
+ public function getUsage()
39
+ {
40
+ return $this->usage;
41
+ }
42
+ public function setUsageInDrive($usageInDrive)
43
+ {
44
+ $this->usageInDrive = $usageInDrive;
45
+ }
46
+ public function getUsageInDrive()
47
+ {
48
+ return $this->usageInDrive;
49
+ }
50
+ public function setUsageInDriveTrash($usageInDriveTrash)
51
+ {
52
+ $this->usageInDriveTrash = $usageInDriveTrash;
53
+ }
54
+ public function getUsageInDriveTrash()
55
+ {
56
+ return $this->usageInDriveTrash;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/AboutTeamDriveThemes.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_AboutTeamDriveThemes extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $backgroundImageLink;
23
+ public $colorRgb;
24
+ public $id;
25
+ public function setBackgroundImageLink($backgroundImageLink)
26
+ {
27
+ $this->backgroundImageLink = $backgroundImageLink;
28
+ }
29
+ public function getBackgroundImageLink()
30
+ {
31
+ return $this->backgroundImageLink;
32
+ }
33
+ public function setColorRgb($colorRgb)
34
+ {
35
+ $this->colorRgb = $colorRgb;
36
+ }
37
+ public function getColorRgb()
38
+ {
39
+ return $this->colorRgb;
40
+ }
41
+ public function setId($id)
42
+ {
43
+ $this->id = $id;
44
+ }
45
+ public function getId()
46
+ {
47
+ return $this->id;
48
+ }
49
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Change.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Change extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $changeType;
23
+ protected $driveType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Drive';
24
+ protected $driveDataType = '';
25
+ public $driveId;
26
+ protected $fileType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile';
27
+ protected $fileDataType = '';
28
+ public $fileId;
29
+ public $kind;
30
+ public $removed;
31
+ protected $teamDriveType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive';
32
+ protected $teamDriveDataType = '';
33
+ public $teamDriveId;
34
+ public $time;
35
+ public $type;
36
+ public function setChangeType($changeType)
37
+ {
38
+ $this->changeType = $changeType;
39
+ }
40
+ public function getChangeType()
41
+ {
42
+ return $this->changeType;
43
+ }
44
+ /**
45
+ * @param Google_Service_Drive_Drive
46
+ */
47
+ public function setDrive(\SimpleCalendar\plugin_deps\Google_Service_Drive_Drive $drive)
48
+ {
49
+ $this->drive = $drive;
50
+ }
51
+ /**
52
+ * @return Google_Service_Drive_Drive
53
+ */
54
+ public function getDrive()
55
+ {
56
+ return $this->drive;
57
+ }
58
+ public function setDriveId($driveId)
59
+ {
60
+ $this->driveId = $driveId;
61
+ }
62
+ public function getDriveId()
63
+ {
64
+ return $this->driveId;
65
+ }
66
+ /**
67
+ * @param Google_Service_Drive_DriveFile
68
+ */
69
+ public function setFile(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile $file)
70
+ {
71
+ $this->file = $file;
72
+ }
73
+ /**
74
+ * @return Google_Service_Drive_DriveFile
75
+ */
76
+ public function getFile()
77
+ {
78
+ return $this->file;
79
+ }
80
+ public function setFileId($fileId)
81
+ {
82
+ $this->fileId = $fileId;
83
+ }
84
+ public function getFileId()
85
+ {
86
+ return $this->fileId;
87
+ }
88
+ public function setKind($kind)
89
+ {
90
+ $this->kind = $kind;
91
+ }
92
+ public function getKind()
93
+ {
94
+ return $this->kind;
95
+ }
96
+ public function setRemoved($removed)
97
+ {
98
+ $this->removed = $removed;
99
+ }
100
+ public function getRemoved()
101
+ {
102
+ return $this->removed;
103
+ }
104
+ /**
105
+ * @param Google_Service_Drive_TeamDrive
106
+ */
107
+ public function setTeamDrive(\SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive $teamDrive)
108
+ {
109
+ $this->teamDrive = $teamDrive;
110
+ }
111
+ /**
112
+ * @return Google_Service_Drive_TeamDrive
113
+ */
114
+ public function getTeamDrive()
115
+ {
116
+ return $this->teamDrive;
117
+ }
118
+ public function setTeamDriveId($teamDriveId)
119
+ {
120
+ $this->teamDriveId = $teamDriveId;
121
+ }
122
+ public function getTeamDriveId()
123
+ {
124
+ return $this->teamDriveId;
125
+ }
126
+ public function setTime($time)
127
+ {
128
+ $this->time = $time;
129
+ }
130
+ public function getTime()
131
+ {
132
+ return $this->time;
133
+ }
134
+ public function setType($type)
135
+ {
136
+ $this->type = $type;
137
+ }
138
+ public function getType()
139
+ {
140
+ return $this->type;
141
+ }
142
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/ChangeList.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_ChangeList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'changes';
23
+ protected $changesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Change';
24
+ protected $changesDataType = 'array';
25
+ public $kind;
26
+ public $newStartPageToken;
27
+ public $nextPageToken;
28
+ /**
29
+ * @param Google_Service_Drive_Change[]
30
+ */
31
+ public function setChanges($changes)
32
+ {
33
+ $this->changes = $changes;
34
+ }
35
+ /**
36
+ * @return Google_Service_Drive_Change[]
37
+ */
38
+ public function getChanges()
39
+ {
40
+ return $this->changes;
41
+ }
42
+ public function setKind($kind)
43
+ {
44
+ $this->kind = $kind;
45
+ }
46
+ public function getKind()
47
+ {
48
+ return $this->kind;
49
+ }
50
+ public function setNewStartPageToken($newStartPageToken)
51
+ {
52
+ $this->newStartPageToken = $newStartPageToken;
53
+ }
54
+ public function getNewStartPageToken()
55
+ {
56
+ return $this->newStartPageToken;
57
+ }
58
+ public function setNextPageToken($nextPageToken)
59
+ {
60
+ $this->nextPageToken = $nextPageToken;
61
+ }
62
+ public function getNextPageToken()
63
+ {
64
+ return $this->nextPageToken;
65
+ }
66
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Channel.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Channel extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $address;
23
+ public $expiration;
24
+ public $id;
25
+ public $kind;
26
+ public $params;
27
+ public $payload;
28
+ public $resourceId;
29
+ public $resourceUri;
30
+ public $token;
31
+ public $type;
32
+ public function setAddress($address)
33
+ {
34
+ $this->address = $address;
35
+ }
36
+ public function getAddress()
37
+ {
38
+ return $this->address;
39
+ }
40
+ public function setExpiration($expiration)
41
+ {
42
+ $this->expiration = $expiration;
43
+ }
44
+ public function getExpiration()
45
+ {
46
+ return $this->expiration;
47
+ }
48
+ public function setId($id)
49
+ {
50
+ $this->id = $id;
51
+ }
52
+ public function getId()
53
+ {
54
+ return $this->id;
55
+ }
56
+ public function setKind($kind)
57
+ {
58
+ $this->kind = $kind;
59
+ }
60
+ public function getKind()
61
+ {
62
+ return $this->kind;
63
+ }
64
+ public function setParams($params)
65
+ {
66
+ $this->params = $params;
67
+ }
68
+ public function getParams()
69
+ {
70
+ return $this->params;
71
+ }
72
+ public function setPayload($payload)
73
+ {
74
+ $this->payload = $payload;
75
+ }
76
+ public function getPayload()
77
+ {
78
+ return $this->payload;
79
+ }
80
+ public function setResourceId($resourceId)
81
+ {
82
+ $this->resourceId = $resourceId;
83
+ }
84
+ public function getResourceId()
85
+ {
86
+ return $this->resourceId;
87
+ }
88
+ public function setResourceUri($resourceUri)
89
+ {
90
+ $this->resourceUri = $resourceUri;
91
+ }
92
+ public function getResourceUri()
93
+ {
94
+ return $this->resourceUri;
95
+ }
96
+ public function setToken($token)
97
+ {
98
+ $this->token = $token;
99
+ }
100
+ public function getToken()
101
+ {
102
+ return $this->token;
103
+ }
104
+ public function setType($type)
105
+ {
106
+ $this->type = $type;
107
+ }
108
+ public function getType()
109
+ {
110
+ return $this->type;
111
+ }
112
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Comment.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Comment extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'replies';
23
+ public $anchor;
24
+ protected $authorType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
25
+ protected $authorDataType = '';
26
+ public $content;
27
+ public $createdTime;
28
+ public $deleted;
29
+ public $htmlContent;
30
+ public $id;
31
+ public $kind;
32
+ public $modifiedTime;
33
+ protected $quotedFileContentType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_CommentQuotedFileContent';
34
+ protected $quotedFileContentDataType = '';
35
+ protected $repliesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Reply';
36
+ protected $repliesDataType = 'array';
37
+ public $resolved;
38
+ public function setAnchor($anchor)
39
+ {
40
+ $this->anchor = $anchor;
41
+ }
42
+ public function getAnchor()
43
+ {
44
+ return $this->anchor;
45
+ }
46
+ /**
47
+ * @param Google_Service_Drive_User
48
+ */
49
+ public function setAuthor(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $author)
50
+ {
51
+ $this->author = $author;
52
+ }
53
+ /**
54
+ * @return Google_Service_Drive_User
55
+ */
56
+ public function getAuthor()
57
+ {
58
+ return $this->author;
59
+ }
60
+ public function setContent($content)
61
+ {
62
+ $this->content = $content;
63
+ }
64
+ public function getContent()
65
+ {
66
+ return $this->content;
67
+ }
68
+ public function setCreatedTime($createdTime)
69
+ {
70
+ $this->createdTime = $createdTime;
71
+ }
72
+ public function getCreatedTime()
73
+ {
74
+ return $this->createdTime;
75
+ }
76
+ public function setDeleted($deleted)
77
+ {
78
+ $this->deleted = $deleted;
79
+ }
80
+ public function getDeleted()
81
+ {
82
+ return $this->deleted;
83
+ }
84
+ public function setHtmlContent($htmlContent)
85
+ {
86
+ $this->htmlContent = $htmlContent;
87
+ }
88
+ public function getHtmlContent()
89
+ {
90
+ return $this->htmlContent;
91
+ }
92
+ public function setId($id)
93
+ {
94
+ $this->id = $id;
95
+ }
96
+ public function getId()
97
+ {
98
+ return $this->id;
99
+ }
100
+ public function setKind($kind)
101
+ {
102
+ $this->kind = $kind;
103
+ }
104
+ public function getKind()
105
+ {
106
+ return $this->kind;
107
+ }
108
+ public function setModifiedTime($modifiedTime)
109
+ {
110
+ $this->modifiedTime = $modifiedTime;
111
+ }
112
+ public function getModifiedTime()
113
+ {
114
+ return $this->modifiedTime;
115
+ }
116
+ /**
117
+ * @param Google_Service_Drive_CommentQuotedFileContent
118
+ */
119
+ public function setQuotedFileContent(\SimpleCalendar\plugin_deps\Google_Service_Drive_CommentQuotedFileContent $quotedFileContent)
120
+ {
121
+ $this->quotedFileContent = $quotedFileContent;
122
+ }
123
+ /**
124
+ * @return Google_Service_Drive_CommentQuotedFileContent
125
+ */
126
+ public function getQuotedFileContent()
127
+ {
128
+ return $this->quotedFileContent;
129
+ }
130
+ /**
131
+ * @param Google_Service_Drive_Reply[]
132
+ */
133
+ public function setReplies($replies)
134
+ {
135
+ $this->replies = $replies;
136
+ }
137
+ /**
138
+ * @return Google_Service_Drive_Reply[]
139
+ */
140
+ public function getReplies()
141
+ {
142
+ return $this->replies;
143
+ }
144
+ public function setResolved($resolved)
145
+ {
146
+ $this->resolved = $resolved;
147
+ }
148
+ public function getResolved()
149
+ {
150
+ return $this->resolved;
151
+ }
152
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/CommentList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_CommentList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'comments';
23
+ protected $commentsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Comment';
24
+ protected $commentsDataType = 'array';
25
+ public $kind;
26
+ public $nextPageToken;
27
+ /**
28
+ * @param Google_Service_Drive_Comment[]
29
+ */
30
+ public function setComments($comments)
31
+ {
32
+ $this->comments = $comments;
33
+ }
34
+ /**
35
+ * @return Google_Service_Drive_Comment[]
36
+ */
37
+ public function getComments()
38
+ {
39
+ return $this->comments;
40
+ }
41
+ public function setKind($kind)
42
+ {
43
+ $this->kind = $kind;
44
+ }
45
+ public function getKind()
46
+ {
47
+ return $this->kind;
48
+ }
49
+ public function setNextPageToken($nextPageToken)
50
+ {
51
+ $this->nextPageToken = $nextPageToken;
52
+ }
53
+ public function getNextPageToken()
54
+ {
55
+ return $this->nextPageToken;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/CommentQuotedFileContent.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_CommentQuotedFileContent extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $mimeType;
23
+ public $value;
24
+ public function setMimeType($mimeType)
25
+ {
26
+ $this->mimeType = $mimeType;
27
+ }
28
+ public function getMimeType()
29
+ {
30
+ return $this->mimeType;
31
+ }
32
+ public function setValue($value)
33
+ {
34
+ $this->value = $value;
35
+ }
36
+ public function getValue()
37
+ {
38
+ return $this->value;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/ContentRestriction.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_ContentRestriction extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $readOnly;
23
+ public $reason;
24
+ protected $restrictingUserType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
25
+ protected $restrictingUserDataType = '';
26
+ public $restrictionTime;
27
+ public $type;
28
+ public function setReadOnly($readOnly)
29
+ {
30
+ $this->readOnly = $readOnly;
31
+ }
32
+ public function getReadOnly()
33
+ {
34
+ return $this->readOnly;
35
+ }
36
+ public function setReason($reason)
37
+ {
38
+ $this->reason = $reason;
39
+ }
40
+ public function getReason()
41
+ {
42
+ return $this->reason;
43
+ }
44
+ /**
45
+ * @param Google_Service_Drive_User
46
+ */
47
+ public function setRestrictingUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $restrictingUser)
48
+ {
49
+ $this->restrictingUser = $restrictingUser;
50
+ }
51
+ /**
52
+ * @return Google_Service_Drive_User
53
+ */
54
+ public function getRestrictingUser()
55
+ {
56
+ return $this->restrictingUser;
57
+ }
58
+ public function setRestrictionTime($restrictionTime)
59
+ {
60
+ $this->restrictionTime = $restrictionTime;
61
+ }
62
+ public function getRestrictionTime()
63
+ {
64
+ return $this->restrictionTime;
65
+ }
66
+ public function setType($type)
67
+ {
68
+ $this->type = $type;
69
+ }
70
+ public function getType()
71
+ {
72
+ return $this->type;
73
+ }
74
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Drive.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Drive extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $backgroundImageFileType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveBackgroundImageFile';
23
+ protected $backgroundImageFileDataType = '';
24
+ public $backgroundImageLink;
25
+ protected $capabilitiesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveCapabilities';
26
+ protected $capabilitiesDataType = '';
27
+ public $colorRgb;
28
+ public $createdTime;
29
+ public $hidden;
30
+ public $id;
31
+ public $kind;
32
+ public $name;
33
+ protected $restrictionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveRestrictions';
34
+ protected $restrictionsDataType = '';
35
+ public $themeId;
36
+ /**
37
+ * @param Google_Service_Drive_DriveBackgroundImageFile
38
+ */
39
+ public function setBackgroundImageFile(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveBackgroundImageFile $backgroundImageFile)
40
+ {
41
+ $this->backgroundImageFile = $backgroundImageFile;
42
+ }
43
+ /**
44
+ * @return Google_Service_Drive_DriveBackgroundImageFile
45
+ */
46
+ public function getBackgroundImageFile()
47
+ {
48
+ return $this->backgroundImageFile;
49
+ }
50
+ public function setBackgroundImageLink($backgroundImageLink)
51
+ {
52
+ $this->backgroundImageLink = $backgroundImageLink;
53
+ }
54
+ public function getBackgroundImageLink()
55
+ {
56
+ return $this->backgroundImageLink;
57
+ }
58
+ /**
59
+ * @param Google_Service_Drive_DriveCapabilities
60
+ */
61
+ public function setCapabilities(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveCapabilities $capabilities)
62
+ {
63
+ $this->capabilities = $capabilities;
64
+ }
65
+ /**
66
+ * @return Google_Service_Drive_DriveCapabilities
67
+ */
68
+ public function getCapabilities()
69
+ {
70
+ return $this->capabilities;
71
+ }
72
+ public function setColorRgb($colorRgb)
73
+ {
74
+ $this->colorRgb = $colorRgb;
75
+ }
76
+ public function getColorRgb()
77
+ {
78
+ return $this->colorRgb;
79
+ }
80
+ public function setCreatedTime($createdTime)
81
+ {
82
+ $this->createdTime = $createdTime;
83
+ }
84
+ public function getCreatedTime()
85
+ {
86
+ return $this->createdTime;
87
+ }
88
+ public function setHidden($hidden)
89
+ {
90
+ $this->hidden = $hidden;
91
+ }
92
+ public function getHidden()
93
+ {
94
+ return $this->hidden;
95
+ }
96
+ public function setId($id)
97
+ {
98
+ $this->id = $id;
99
+ }
100
+ public function getId()
101
+ {
102
+ return $this->id;
103
+ }
104
+ public function setKind($kind)
105
+ {
106
+ $this->kind = $kind;
107
+ }
108
+ public function getKind()
109
+ {
110
+ return $this->kind;
111
+ }
112
+ public function setName($name)
113
+ {
114
+ $this->name = $name;
115
+ }
116
+ public function getName()
117
+ {
118
+ return $this->name;
119
+ }
120
+ /**
121
+ * @param Google_Service_Drive_DriveRestrictions
122
+ */
123
+ public function setRestrictions(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveRestrictions $restrictions)
124
+ {
125
+ $this->restrictions = $restrictions;
126
+ }
127
+ /**
128
+ * @return Google_Service_Drive_DriveRestrictions
129
+ */
130
+ public function getRestrictions()
131
+ {
132
+ return $this->restrictions;
133
+ }
134
+ public function setThemeId($themeId)
135
+ {
136
+ $this->themeId = $themeId;
137
+ }
138
+ public function getThemeId()
139
+ {
140
+ return $this->themeId;
141
+ }
142
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveBackgroundImageFile.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveBackgroundImageFile extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $id;
23
+ public $width;
24
+ public $xCoordinate;
25
+ public $yCoordinate;
26
+ public function setId($id)
27
+ {
28
+ $this->id = $id;
29
+ }
30
+ public function getId()
31
+ {
32
+ return $this->id;
33
+ }
34
+ public function setWidth($width)
35
+ {
36
+ $this->width = $width;
37
+ }
38
+ public function getWidth()
39
+ {
40
+ return $this->width;
41
+ }
42
+ public function setXCoordinate($xCoordinate)
43
+ {
44
+ $this->xCoordinate = $xCoordinate;
45
+ }
46
+ public function getXCoordinate()
47
+ {
48
+ return $this->xCoordinate;
49
+ }
50
+ public function setYCoordinate($yCoordinate)
51
+ {
52
+ $this->yCoordinate = $yCoordinate;
53
+ }
54
+ public function getYCoordinate()
55
+ {
56
+ return $this->yCoordinate;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveCapabilities.php ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveCapabilities extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $canAddChildren;
23
+ public $canChangeCopyRequiresWriterPermissionRestriction;
24
+ public $canChangeDomainUsersOnlyRestriction;
25
+ public $canChangeDriveBackground;
26
+ public $canChangeDriveMembersOnlyRestriction;
27
+ public $canComment;
28
+ public $canCopy;
29
+ public $canDeleteChildren;
30
+ public $canDeleteDrive;
31
+ public $canDownload;
32
+ public $canEdit;
33
+ public $canListChildren;
34
+ public $canManageMembers;
35
+ public $canReadRevisions;
36
+ public $canRename;
37
+ public $canRenameDrive;
38
+ public $canShare;
39
+ public $canTrashChildren;
40
+ public function setCanAddChildren($canAddChildren)
41
+ {
42
+ $this->canAddChildren = $canAddChildren;
43
+ }
44
+ public function getCanAddChildren()
45
+ {
46
+ return $this->canAddChildren;
47
+ }
48
+ public function setCanChangeCopyRequiresWriterPermissionRestriction($canChangeCopyRequiresWriterPermissionRestriction)
49
+ {
50
+ $this->canChangeCopyRequiresWriterPermissionRestriction = $canChangeCopyRequiresWriterPermissionRestriction;
51
+ }
52
+ public function getCanChangeCopyRequiresWriterPermissionRestriction()
53
+ {
54
+ return $this->canChangeCopyRequiresWriterPermissionRestriction;
55
+ }
56
+ public function setCanChangeDomainUsersOnlyRestriction($canChangeDomainUsersOnlyRestriction)
57
+ {
58
+ $this->canChangeDomainUsersOnlyRestriction = $canChangeDomainUsersOnlyRestriction;
59
+ }
60
+ public function getCanChangeDomainUsersOnlyRestriction()
61
+ {
62
+ return $this->canChangeDomainUsersOnlyRestriction;
63
+ }
64
+ public function setCanChangeDriveBackground($canChangeDriveBackground)
65
+ {
66
+ $this->canChangeDriveBackground = $canChangeDriveBackground;
67
+ }
68
+ public function getCanChangeDriveBackground()
69
+ {
70
+ return $this->canChangeDriveBackground;
71
+ }
72
+ public function setCanChangeDriveMembersOnlyRestriction($canChangeDriveMembersOnlyRestriction)
73
+ {
74
+ $this->canChangeDriveMembersOnlyRestriction = $canChangeDriveMembersOnlyRestriction;
75
+ }
76
+ public function getCanChangeDriveMembersOnlyRestriction()
77
+ {
78
+ return $this->canChangeDriveMembersOnlyRestriction;
79
+ }
80
+ public function setCanComment($canComment)
81
+ {
82
+ $this->canComment = $canComment;
83
+ }
84
+ public function getCanComment()
85
+ {
86
+ return $this->canComment;
87
+ }
88
+ public function setCanCopy($canCopy)
89
+ {
90
+ $this->canCopy = $canCopy;
91
+ }
92
+ public function getCanCopy()
93
+ {
94
+ return $this->canCopy;
95
+ }
96
+ public function setCanDeleteChildren($canDeleteChildren)
97
+ {
98
+ $this->canDeleteChildren = $canDeleteChildren;
99
+ }
100
+ public function getCanDeleteChildren()
101
+ {
102
+ return $this->canDeleteChildren;
103
+ }
104
+ public function setCanDeleteDrive($canDeleteDrive)
105
+ {
106
+ $this->canDeleteDrive = $canDeleteDrive;
107
+ }
108
+ public function getCanDeleteDrive()
109
+ {
110
+ return $this->canDeleteDrive;
111
+ }
112
+ public function setCanDownload($canDownload)
113
+ {
114
+ $this->canDownload = $canDownload;
115
+ }
116
+ public function getCanDownload()
117
+ {
118
+ return $this->canDownload;
119
+ }
120
+ public function setCanEdit($canEdit)
121
+ {
122
+ $this->canEdit = $canEdit;
123
+ }
124
+ public function getCanEdit()
125
+ {
126
+ return $this->canEdit;
127
+ }
128
+ public function setCanListChildren($canListChildren)
129
+ {
130
+ $this->canListChildren = $canListChildren;
131
+ }
132
+ public function getCanListChildren()
133
+ {
134
+ return $this->canListChildren;
135
+ }
136
+ public function setCanManageMembers($canManageMembers)
137
+ {
138
+ $this->canManageMembers = $canManageMembers;
139
+ }
140
+ public function getCanManageMembers()
141
+ {
142
+ return $this->canManageMembers;
143
+ }
144
+ public function setCanReadRevisions($canReadRevisions)
145
+ {
146
+ $this->canReadRevisions = $canReadRevisions;
147
+ }
148
+ public function getCanReadRevisions()
149
+ {
150
+ return $this->canReadRevisions;
151
+ }
152
+ public function setCanRename($canRename)
153
+ {
154
+ $this->canRename = $canRename;
155
+ }
156
+ public function getCanRename()
157
+ {
158
+ return $this->canRename;
159
+ }
160
+ public function setCanRenameDrive($canRenameDrive)
161
+ {
162
+ $this->canRenameDrive = $canRenameDrive;
163
+ }
164
+ public function getCanRenameDrive()
165
+ {
166
+ return $this->canRenameDrive;
167
+ }
168
+ public function setCanShare($canShare)
169
+ {
170
+ $this->canShare = $canShare;
171
+ }
172
+ public function getCanShare()
173
+ {
174
+ return $this->canShare;
175
+ }
176
+ public function setCanTrashChildren($canTrashChildren)
177
+ {
178
+ $this->canTrashChildren = $canTrashChildren;
179
+ }
180
+ public function getCanTrashChildren()
181
+ {
182
+ return $this->canTrashChildren;
183
+ }
184
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFile.php ADDED
@@ -0,0 +1,613 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFile extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'spaces';
23
+ public $appProperties;
24
+ protected $capabilitiesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileCapabilities';
25
+ protected $capabilitiesDataType = '';
26
+ protected $contentHintsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileContentHints';
27
+ protected $contentHintsDataType = '';
28
+ protected $contentRestrictionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_ContentRestriction';
29
+ protected $contentRestrictionsDataType = 'array';
30
+ public $copyRequiresWriterPermission;
31
+ public $createdTime;
32
+ public $description;
33
+ public $driveId;
34
+ public $explicitlyTrashed;
35
+ public $exportLinks;
36
+ public $fileExtension;
37
+ public $folderColorRgb;
38
+ public $fullFileExtension;
39
+ public $hasAugmentedPermissions;
40
+ public $hasThumbnail;
41
+ public $headRevisionId;
42
+ public $iconLink;
43
+ public $id;
44
+ protected $imageMediaMetadataType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileImageMediaMetadata';
45
+ protected $imageMediaMetadataDataType = '';
46
+ public $isAppAuthorized;
47
+ public $kind;
48
+ protected $lastModifyingUserType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
49
+ protected $lastModifyingUserDataType = '';
50
+ public $md5Checksum;
51
+ public $mimeType;
52
+ public $modifiedByMe;
53
+ public $modifiedByMeTime;
54
+ public $modifiedTime;
55
+ public $name;
56
+ public $originalFilename;
57
+ public $ownedByMe;
58
+ protected $ownersType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
59
+ protected $ownersDataType = 'array';
60
+ public $parents;
61
+ public $permissionIds;
62
+ protected $permissionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Permission';
63
+ protected $permissionsDataType = 'array';
64
+ public $properties;
65
+ public $quotaBytesUsed;
66
+ public $shared;
67
+ public $sharedWithMeTime;
68
+ protected $sharingUserType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
69
+ protected $sharingUserDataType = '';
70
+ protected $shortcutDetailsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileShortcutDetails';
71
+ protected $shortcutDetailsDataType = '';
72
+ public $size;
73
+ public $spaces;
74
+ public $starred;
75
+ public $teamDriveId;
76
+ public $thumbnailLink;
77
+ public $thumbnailVersion;
78
+ public $trashed;
79
+ public $trashedTime;
80
+ protected $trashingUserType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
81
+ protected $trashingUserDataType = '';
82
+ public $version;
83
+ protected $videoMediaMetadataType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileVideoMediaMetadata';
84
+ protected $videoMediaMetadataDataType = '';
85
+ public $viewedByMe;
86
+ public $viewedByMeTime;
87
+ public $viewersCanCopyContent;
88
+ public $webContentLink;
89
+ public $webViewLink;
90
+ public $writersCanShare;
91
+ public function setAppProperties($appProperties)
92
+ {
93
+ $this->appProperties = $appProperties;
94
+ }
95
+ public function getAppProperties()
96
+ {
97
+ return $this->appProperties;
98
+ }
99
+ /**
100
+ * @param Google_Service_Drive_DriveFileCapabilities
101
+ */
102
+ public function setCapabilities(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileCapabilities $capabilities)
103
+ {
104
+ $this->capabilities = $capabilities;
105
+ }
106
+ /**
107
+ * @return Google_Service_Drive_DriveFileCapabilities
108
+ */
109
+ public function getCapabilities()
110
+ {
111
+ return $this->capabilities;
112
+ }
113
+ /**
114
+ * @param Google_Service_Drive_DriveFileContentHints
115
+ */
116
+ public function setContentHints(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileContentHints $contentHints)
117
+ {
118
+ $this->contentHints = $contentHints;
119
+ }
120
+ /**
121
+ * @return Google_Service_Drive_DriveFileContentHints
122
+ */
123
+ public function getContentHints()
124
+ {
125
+ return $this->contentHints;
126
+ }
127
+ /**
128
+ * @param Google_Service_Drive_ContentRestriction[]
129
+ */
130
+ public function setContentRestrictions($contentRestrictions)
131
+ {
132
+ $this->contentRestrictions = $contentRestrictions;
133
+ }
134
+ /**
135
+ * @return Google_Service_Drive_ContentRestriction[]
136
+ */
137
+ public function getContentRestrictions()
138
+ {
139
+ return $this->contentRestrictions;
140
+ }
141
+ public function setCopyRequiresWriterPermission($copyRequiresWriterPermission)
142
+ {
143
+ $this->copyRequiresWriterPermission = $copyRequiresWriterPermission;
144
+ }
145
+ public function getCopyRequiresWriterPermission()
146
+ {
147
+ return $this->copyRequiresWriterPermission;
148
+ }
149
+ public function setCreatedTime($createdTime)
150
+ {
151
+ $this->createdTime = $createdTime;
152
+ }
153
+ public function getCreatedTime()
154
+ {
155
+ return $this->createdTime;
156
+ }
157
+ public function setDescription($description)
158
+ {
159
+ $this->description = $description;
160
+ }
161
+ public function getDescription()
162
+ {
163
+ return $this->description;
164
+ }
165
+ public function setDriveId($driveId)
166
+ {
167
+ $this->driveId = $driveId;
168
+ }
169
+ public function getDriveId()
170
+ {
171
+ return $this->driveId;
172
+ }
173
+ public function setExplicitlyTrashed($explicitlyTrashed)
174
+ {
175
+ $this->explicitlyTrashed = $explicitlyTrashed;
176
+ }
177
+ public function getExplicitlyTrashed()
178
+ {
179
+ return $this->explicitlyTrashed;
180
+ }
181
+ public function setExportLinks($exportLinks)
182
+ {
183
+ $this->exportLinks = $exportLinks;
184
+ }
185
+ public function getExportLinks()
186
+ {
187
+ return $this->exportLinks;
188
+ }
189
+ public function setFileExtension($fileExtension)
190
+ {
191
+ $this->fileExtension = $fileExtension;
192
+ }
193
+ public function getFileExtension()
194
+ {
195
+ return $this->fileExtension;
196
+ }
197
+ public function setFolderColorRgb($folderColorRgb)
198
+ {
199
+ $this->folderColorRgb = $folderColorRgb;
200
+ }
201
+ public function getFolderColorRgb()
202
+ {
203
+ return $this->folderColorRgb;
204
+ }
205
+ public function setFullFileExtension($fullFileExtension)
206
+ {
207
+ $this->fullFileExtension = $fullFileExtension;
208
+ }
209
+ public function getFullFileExtension()
210
+ {
211
+ return $this->fullFileExtension;
212
+ }
213
+ public function setHasAugmentedPermissions($hasAugmentedPermissions)
214
+ {
215
+ $this->hasAugmentedPermissions = $hasAugmentedPermissions;
216
+ }
217
+ public function getHasAugmentedPermissions()
218
+ {
219
+ return $this->hasAugmentedPermissions;
220
+ }
221
+ public function setHasThumbnail($hasThumbnail)
222
+ {
223
+ $this->hasThumbnail = $hasThumbnail;
224
+ }
225
+ public function getHasThumbnail()
226
+ {
227
+ return $this->hasThumbnail;
228
+ }
229
+ public function setHeadRevisionId($headRevisionId)
230
+ {
231
+ $this->headRevisionId = $headRevisionId;
232
+ }
233
+ public function getHeadRevisionId()
234
+ {
235
+ return $this->headRevisionId;
236
+ }
237
+ public function setIconLink($iconLink)
238
+ {
239
+ $this->iconLink = $iconLink;
240
+ }
241
+ public function getIconLink()
242
+ {
243
+ return $this->iconLink;
244
+ }
245
+ public function setId($id)
246
+ {
247
+ $this->id = $id;
248
+ }
249
+ public function getId()
250
+ {
251
+ return $this->id;
252
+ }
253
+ /**
254
+ * @param Google_Service_Drive_DriveFileImageMediaMetadata
255
+ */
256
+ public function setImageMediaMetadata(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileImageMediaMetadata $imageMediaMetadata)
257
+ {
258
+ $this->imageMediaMetadata = $imageMediaMetadata;
259
+ }
260
+ /**
261
+ * @return Google_Service_Drive_DriveFileImageMediaMetadata
262
+ */
263
+ public function getImageMediaMetadata()
264
+ {
265
+ return $this->imageMediaMetadata;
266
+ }
267
+ public function setIsAppAuthorized($isAppAuthorized)
268
+ {
269
+ $this->isAppAuthorized = $isAppAuthorized;
270
+ }
271
+ public function getIsAppAuthorized()
272
+ {
273
+ return $this->isAppAuthorized;
274
+ }
275
+ public function setKind($kind)
276
+ {
277
+ $this->kind = $kind;
278
+ }
279
+ public function getKind()
280
+ {
281
+ return $this->kind;
282
+ }
283
+ /**
284
+ * @param Google_Service_Drive_User
285
+ */
286
+ public function setLastModifyingUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $lastModifyingUser)
287
+ {
288
+ $this->lastModifyingUser = $lastModifyingUser;
289
+ }
290
+ /**
291
+ * @return Google_Service_Drive_User
292
+ */
293
+ public function getLastModifyingUser()
294
+ {
295
+ return $this->lastModifyingUser;
296
+ }
297
+ public function setMd5Checksum($md5Checksum)
298
+ {
299
+ $this->md5Checksum = $md5Checksum;
300
+ }
301
+ public function getMd5Checksum()
302
+ {
303
+ return $this->md5Checksum;
304
+ }
305
+ public function setMimeType($mimeType)
306
+ {
307
+ $this->mimeType = $mimeType;
308
+ }
309
+ public function getMimeType()
310
+ {
311
+ return $this->mimeType;
312
+ }
313
+ public function setModifiedByMe($modifiedByMe)
314
+ {
315
+ $this->modifiedByMe = $modifiedByMe;
316
+ }
317
+ public function getModifiedByMe()
318
+ {
319
+ return $this->modifiedByMe;
320
+ }
321
+ public function setModifiedByMeTime($modifiedByMeTime)
322
+ {
323
+ $this->modifiedByMeTime = $modifiedByMeTime;
324
+ }
325
+ public function getModifiedByMeTime()
326
+ {
327
+ return $this->modifiedByMeTime;
328
+ }
329
+ public function setModifiedTime($modifiedTime)
330
+ {
331
+ $this->modifiedTime = $modifiedTime;
332
+ }
333
+ public function getModifiedTime()
334
+ {
335
+ return $this->modifiedTime;
336
+ }
337
+ public function setName($name)
338
+ {
339
+ $this->name = $name;
340
+ }
341
+ public function getName()
342
+ {
343
+ return $this->name;
344
+ }
345
+ public function setOriginalFilename($originalFilename)
346
+ {
347
+ $this->originalFilename = $originalFilename;
348
+ }
349
+ public function getOriginalFilename()
350
+ {
351
+ return $this->originalFilename;
352
+ }
353
+ public function setOwnedByMe($ownedByMe)
354
+ {
355
+ $this->ownedByMe = $ownedByMe;
356
+ }
357
+ public function getOwnedByMe()
358
+ {
359
+ return $this->ownedByMe;
360
+ }
361
+ /**
362
+ * @param Google_Service_Drive_User[]
363
+ */
364
+ public function setOwners($owners)
365
+ {
366
+ $this->owners = $owners;
367
+ }
368
+ /**
369
+ * @return Google_Service_Drive_User[]
370
+ */
371
+ public function getOwners()
372
+ {
373
+ return $this->owners;
374
+ }
375
+ public function setParents($parents)
376
+ {
377
+ $this->parents = $parents;
378
+ }
379
+ public function getParents()
380
+ {
381
+ return $this->parents;
382
+ }
383
+ public function setPermissionIds($permissionIds)
384
+ {
385
+ $this->permissionIds = $permissionIds;
386
+ }
387
+ public function getPermissionIds()
388
+ {
389
+ return $this->permissionIds;
390
+ }
391
+ /**
392
+ * @param Google_Service_Drive_Permission[]
393
+ */
394
+ public function setPermissions($permissions)
395
+ {
396
+ $this->permissions = $permissions;
397
+ }
398
+ /**
399
+ * @return Google_Service_Drive_Permission[]
400
+ */
401
+ public function getPermissions()
402
+ {
403
+ return $this->permissions;
404
+ }
405
+ public function setProperties($properties)
406
+ {
407
+ $this->properties = $properties;
408
+ }
409
+ public function getProperties()
410
+ {
411
+ return $this->properties;
412
+ }
413
+ public function setQuotaBytesUsed($quotaBytesUsed)
414
+ {
415
+ $this->quotaBytesUsed = $quotaBytesUsed;
416
+ }
417
+ public function getQuotaBytesUsed()
418
+ {
419
+ return $this->quotaBytesUsed;
420
+ }
421
+ public function setShared($shared)
422
+ {
423
+ $this->shared = $shared;
424
+ }
425
+ public function getShared()
426
+ {
427
+ return $this->shared;
428
+ }
429
+ public function setSharedWithMeTime($sharedWithMeTime)
430
+ {
431
+ $this->sharedWithMeTime = $sharedWithMeTime;
432
+ }
433
+ public function getSharedWithMeTime()
434
+ {
435
+ return $this->sharedWithMeTime;
436
+ }
437
+ /**
438
+ * @param Google_Service_Drive_User
439
+ */
440
+ public function setSharingUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $sharingUser)
441
+ {
442
+ $this->sharingUser = $sharingUser;
443
+ }
444
+ /**
445
+ * @return Google_Service_Drive_User
446
+ */
447
+ public function getSharingUser()
448
+ {
449
+ return $this->sharingUser;
450
+ }
451
+ /**
452
+ * @param Google_Service_Drive_DriveFileShortcutDetails
453
+ */
454
+ public function setShortcutDetails(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileShortcutDetails $shortcutDetails)
455
+ {
456
+ $this->shortcutDetails = $shortcutDetails;
457
+ }
458
+ /**
459
+ * @return Google_Service_Drive_DriveFileShortcutDetails
460
+ */
461
+ public function getShortcutDetails()
462
+ {
463
+ return $this->shortcutDetails;
464
+ }
465
+ public function setSize($size)
466
+ {
467
+ $this->size = $size;
468
+ }
469
+ public function getSize()
470
+ {
471
+ return $this->size;
472
+ }
473
+ public function setSpaces($spaces)
474
+ {
475
+ $this->spaces = $spaces;
476
+ }
477
+ public function getSpaces()
478
+ {
479
+ return $this->spaces;
480
+ }
481
+ public function setStarred($starred)
482
+ {
483
+ $this->starred = $starred;
484
+ }
485
+ public function getStarred()
486
+ {
487
+ return $this->starred;
488
+ }
489
+ public function setTeamDriveId($teamDriveId)
490
+ {
491
+ $this->teamDriveId = $teamDriveId;
492
+ }
493
+ public function getTeamDriveId()
494
+ {
495
+ return $this->teamDriveId;
496
+ }
497
+ public function setThumbnailLink($thumbnailLink)
498
+ {
499
+ $this->thumbnailLink = $thumbnailLink;
500
+ }
501
+ public function getThumbnailLink()
502
+ {
503
+ return $this->thumbnailLink;
504
+ }
505
+ public function setThumbnailVersion($thumbnailVersion)
506
+ {
507
+ $this->thumbnailVersion = $thumbnailVersion;
508
+ }
509
+ public function getThumbnailVersion()
510
+ {
511
+ return $this->thumbnailVersion;
512
+ }
513
+ public function setTrashed($trashed)
514
+ {
515
+ $this->trashed = $trashed;
516
+ }
517
+ public function getTrashed()
518
+ {
519
+ return $this->trashed;
520
+ }
521
+ public function setTrashedTime($trashedTime)
522
+ {
523
+ $this->trashedTime = $trashedTime;
524
+ }
525
+ public function getTrashedTime()
526
+ {
527
+ return $this->trashedTime;
528
+ }
529
+ /**
530
+ * @param Google_Service_Drive_User
531
+ */
532
+ public function setTrashingUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $trashingUser)
533
+ {
534
+ $this->trashingUser = $trashingUser;
535
+ }
536
+ /**
537
+ * @return Google_Service_Drive_User
538
+ */
539
+ public function getTrashingUser()
540
+ {
541
+ return $this->trashingUser;
542
+ }
543
+ public function setVersion($version)
544
+ {
545
+ $this->version = $version;
546
+ }
547
+ public function getVersion()
548
+ {
549
+ return $this->version;
550
+ }
551
+ /**
552
+ * @param Google_Service_Drive_DriveFileVideoMediaMetadata
553
+ */
554
+ public function setVideoMediaMetadata(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileVideoMediaMetadata $videoMediaMetadata)
555
+ {
556
+ $this->videoMediaMetadata = $videoMediaMetadata;
557
+ }
558
+ /**
559
+ * @return Google_Service_Drive_DriveFileVideoMediaMetadata
560
+ */
561
+ public function getVideoMediaMetadata()
562
+ {
563
+ return $this->videoMediaMetadata;
564
+ }
565
+ public function setViewedByMe($viewedByMe)
566
+ {
567
+ $this->viewedByMe = $viewedByMe;
568
+ }
569
+ public function getViewedByMe()
570
+ {
571
+ return $this->viewedByMe;
572
+ }
573
+ public function setViewedByMeTime($viewedByMeTime)
574
+ {
575
+ $this->viewedByMeTime = $viewedByMeTime;
576
+ }
577
+ public function getViewedByMeTime()
578
+ {
579
+ return $this->viewedByMeTime;
580
+ }
581
+ public function setViewersCanCopyContent($viewersCanCopyContent)
582
+ {
583
+ $this->viewersCanCopyContent = $viewersCanCopyContent;
584
+ }
585
+ public function getViewersCanCopyContent()
586
+ {
587
+ return $this->viewersCanCopyContent;
588
+ }
589
+ public function setWebContentLink($webContentLink)
590
+ {
591
+ $this->webContentLink = $webContentLink;
592
+ }
593
+ public function getWebContentLink()
594
+ {
595
+ return $this->webContentLink;
596
+ }
597
+ public function setWebViewLink($webViewLink)
598
+ {
599
+ $this->webViewLink = $webViewLink;
600
+ }
601
+ public function getWebViewLink()
602
+ {
603
+ return $this->webViewLink;
604
+ }
605
+ public function setWritersCanShare($writersCanShare)
606
+ {
607
+ $this->writersCanShare = $writersCanShare;
608
+ }
609
+ public function getWritersCanShare()
610
+ {
611
+ return $this->writersCanShare;
612
+ }
613
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileCapabilities.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileCapabilities extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $canAddChildren;
23
+ public $canAddFolderFromAnotherDrive;
24
+ public $canAddMyDriveParent;
25
+ public $canChangeCopyRequiresWriterPermission;
26
+ public $canChangeViewersCanCopyContent;
27
+ public $canComment;
28
+ public $canCopy;
29
+ public $canDelete;
30
+ public $canDeleteChildren;
31
+ public $canDownload;
32
+ public $canEdit;
33
+ public $canListChildren;
34
+ public $canModifyContent;
35
+ public $canModifyContentRestriction;
36
+ public $canMoveChildrenOutOfDrive;
37
+ public $canMoveChildrenOutOfTeamDrive;
38
+ public $canMoveChildrenWithinDrive;
39
+ public $canMoveChildrenWithinTeamDrive;
40
+ public $canMoveItemIntoTeamDrive;
41
+ public $canMoveItemOutOfDrive;
42
+ public $canMoveItemOutOfTeamDrive;
43
+ public $canMoveItemWithinDrive;
44
+ public $canMoveItemWithinTeamDrive;
45
+ public $canMoveTeamDriveItem;
46
+ public $canReadDrive;
47
+ public $canReadRevisions;
48
+ public $canReadTeamDrive;
49
+ public $canRemoveChildren;
50
+ public $canRemoveMyDriveParent;
51
+ public $canRename;
52
+ public $canShare;
53
+ public $canTrash;
54
+ public $canTrashChildren;
55
+ public $canUntrash;
56
+ public function setCanAddChildren($canAddChildren)
57
+ {
58
+ $this->canAddChildren = $canAddChildren;
59
+ }
60
+ public function getCanAddChildren()
61
+ {
62
+ return $this->canAddChildren;
63
+ }
64
+ public function setCanAddFolderFromAnotherDrive($canAddFolderFromAnotherDrive)
65
+ {
66
+ $this->canAddFolderFromAnotherDrive = $canAddFolderFromAnotherDrive;
67
+ }
68
+ public function getCanAddFolderFromAnotherDrive()
69
+ {
70
+ return $this->canAddFolderFromAnotherDrive;
71
+ }
72
+ public function setCanAddMyDriveParent($canAddMyDriveParent)
73
+ {
74
+ $this->canAddMyDriveParent = $canAddMyDriveParent;
75
+ }
76
+ public function getCanAddMyDriveParent()
77
+ {
78
+ return $this->canAddMyDriveParent;
79
+ }
80
+ public function setCanChangeCopyRequiresWriterPermission($canChangeCopyRequiresWriterPermission)
81
+ {
82
+ $this->canChangeCopyRequiresWriterPermission = $canChangeCopyRequiresWriterPermission;
83
+ }
84
+ public function getCanChangeCopyRequiresWriterPermission()
85
+ {
86
+ return $this->canChangeCopyRequiresWriterPermission;
87
+ }
88
+ public function setCanChangeViewersCanCopyContent($canChangeViewersCanCopyContent)
89
+ {
90
+ $this->canChangeViewersCanCopyContent = $canChangeViewersCanCopyContent;
91
+ }
92
+ public function getCanChangeViewersCanCopyContent()
93
+ {
94
+ return $this->canChangeViewersCanCopyContent;
95
+ }
96
+ public function setCanComment($canComment)
97
+ {
98
+ $this->canComment = $canComment;
99
+ }
100
+ public function getCanComment()
101
+ {
102
+ return $this->canComment;
103
+ }
104
+ public function setCanCopy($canCopy)
105
+ {
106
+ $this->canCopy = $canCopy;
107
+ }
108
+ public function getCanCopy()
109
+ {
110
+ return $this->canCopy;
111
+ }
112
+ public function setCanDelete($canDelete)
113
+ {
114
+ $this->canDelete = $canDelete;
115
+ }
116
+ public function getCanDelete()
117
+ {
118
+ return $this->canDelete;
119
+ }
120
+ public function setCanDeleteChildren($canDeleteChildren)
121
+ {
122
+ $this->canDeleteChildren = $canDeleteChildren;
123
+ }
124
+ public function getCanDeleteChildren()
125
+ {
126
+ return $this->canDeleteChildren;
127
+ }
128
+ public function setCanDownload($canDownload)
129
+ {
130
+ $this->canDownload = $canDownload;
131
+ }
132
+ public function getCanDownload()
133
+ {
134
+ return $this->canDownload;
135
+ }
136
+ public function setCanEdit($canEdit)
137
+ {
138
+ $this->canEdit = $canEdit;
139
+ }
140
+ public function getCanEdit()
141
+ {
142
+ return $this->canEdit;
143
+ }
144
+ public function setCanListChildren($canListChildren)
145
+ {
146
+ $this->canListChildren = $canListChildren;
147
+ }
148
+ public function getCanListChildren()
149
+ {
150
+ return $this->canListChildren;
151
+ }
152
+ public function setCanModifyContent($canModifyContent)
153
+ {
154
+ $this->canModifyContent = $canModifyContent;
155
+ }
156
+ public function getCanModifyContent()
157
+ {
158
+ return $this->canModifyContent;
159
+ }
160
+ public function setCanModifyContentRestriction($canModifyContentRestriction)
161
+ {
162
+ $this->canModifyContentRestriction = $canModifyContentRestriction;
163
+ }
164
+ public function getCanModifyContentRestriction()
165
+ {
166
+ return $this->canModifyContentRestriction;
167
+ }
168
+ public function setCanMoveChildrenOutOfDrive($canMoveChildrenOutOfDrive)
169
+ {
170
+ $this->canMoveChildrenOutOfDrive = $canMoveChildrenOutOfDrive;
171
+ }
172
+ public function getCanMoveChildrenOutOfDrive()
173
+ {
174
+ return $this->canMoveChildrenOutOfDrive;
175
+ }
176
+ public function setCanMoveChildrenOutOfTeamDrive($canMoveChildrenOutOfTeamDrive)
177
+ {
178
+ $this->canMoveChildrenOutOfTeamDrive = $canMoveChildrenOutOfTeamDrive;
179
+ }
180
+ public function getCanMoveChildrenOutOfTeamDrive()
181
+ {
182
+ return $this->canMoveChildrenOutOfTeamDrive;
183
+ }
184
+ public function setCanMoveChildrenWithinDrive($canMoveChildrenWithinDrive)
185
+ {
186
+ $this->canMoveChildrenWithinDrive = $canMoveChildrenWithinDrive;
187
+ }
188
+ public function getCanMoveChildrenWithinDrive()
189
+ {
190
+ return $this->canMoveChildrenWithinDrive;
191
+ }
192
+ public function setCanMoveChildrenWithinTeamDrive($canMoveChildrenWithinTeamDrive)
193
+ {
194
+ $this->canMoveChildrenWithinTeamDrive = $canMoveChildrenWithinTeamDrive;
195
+ }
196
+ public function getCanMoveChildrenWithinTeamDrive()
197
+ {
198
+ return $this->canMoveChildrenWithinTeamDrive;
199
+ }
200
+ public function setCanMoveItemIntoTeamDrive($canMoveItemIntoTeamDrive)
201
+ {
202
+ $this->canMoveItemIntoTeamDrive = $canMoveItemIntoTeamDrive;
203
+ }
204
+ public function getCanMoveItemIntoTeamDrive()
205
+ {
206
+ return $this->canMoveItemIntoTeamDrive;
207
+ }
208
+ public function setCanMoveItemOutOfDrive($canMoveItemOutOfDrive)
209
+ {
210
+ $this->canMoveItemOutOfDrive = $canMoveItemOutOfDrive;
211
+ }
212
+ public function getCanMoveItemOutOfDrive()
213
+ {
214
+ return $this->canMoveItemOutOfDrive;
215
+ }
216
+ public function setCanMoveItemOutOfTeamDrive($canMoveItemOutOfTeamDrive)
217
+ {
218
+ $this->canMoveItemOutOfTeamDrive = $canMoveItemOutOfTeamDrive;
219
+ }
220
+ public function getCanMoveItemOutOfTeamDrive()
221
+ {
222
+ return $this->canMoveItemOutOfTeamDrive;
223
+ }
224
+ public function setCanMoveItemWithinDrive($canMoveItemWithinDrive)
225
+ {
226
+ $this->canMoveItemWithinDrive = $canMoveItemWithinDrive;
227
+ }
228
+ public function getCanMoveItemWithinDrive()
229
+ {
230
+ return $this->canMoveItemWithinDrive;
231
+ }
232
+ public function setCanMoveItemWithinTeamDrive($canMoveItemWithinTeamDrive)
233
+ {
234
+ $this->canMoveItemWithinTeamDrive = $canMoveItemWithinTeamDrive;
235
+ }
236
+ public function getCanMoveItemWithinTeamDrive()
237
+ {
238
+ return $this->canMoveItemWithinTeamDrive;
239
+ }
240
+ public function setCanMoveTeamDriveItem($canMoveTeamDriveItem)
241
+ {
242
+ $this->canMoveTeamDriveItem = $canMoveTeamDriveItem;
243
+ }
244
+ public function getCanMoveTeamDriveItem()
245
+ {
246
+ return $this->canMoveTeamDriveItem;
247
+ }
248
+ public function setCanReadDrive($canReadDrive)
249
+ {
250
+ $this->canReadDrive = $canReadDrive;
251
+ }
252
+ public function getCanReadDrive()
253
+ {
254
+ return $this->canReadDrive;
255
+ }
256
+ public function setCanReadRevisions($canReadRevisions)
257
+ {
258
+ $this->canReadRevisions = $canReadRevisions;
259
+ }
260
+ public function getCanReadRevisions()
261
+ {
262
+ return $this->canReadRevisions;
263
+ }
264
+ public function setCanReadTeamDrive($canReadTeamDrive)
265
+ {
266
+ $this->canReadTeamDrive = $canReadTeamDrive;
267
+ }
268
+ public function getCanReadTeamDrive()
269
+ {
270
+ return $this->canReadTeamDrive;
271
+ }
272
+ public function setCanRemoveChildren($canRemoveChildren)
273
+ {
274
+ $this->canRemoveChildren = $canRemoveChildren;
275
+ }
276
+ public function getCanRemoveChildren()
277
+ {
278
+ return $this->canRemoveChildren;
279
+ }
280
+ public function setCanRemoveMyDriveParent($canRemoveMyDriveParent)
281
+ {
282
+ $this->canRemoveMyDriveParent = $canRemoveMyDriveParent;
283
+ }
284
+ public function getCanRemoveMyDriveParent()
285
+ {
286
+ return $this->canRemoveMyDriveParent;
287
+ }
288
+ public function setCanRename($canRename)
289
+ {
290
+ $this->canRename = $canRename;
291
+ }
292
+ public function getCanRename()
293
+ {
294
+ return $this->canRename;
295
+ }
296
+ public function setCanShare($canShare)
297
+ {
298
+ $this->canShare = $canShare;
299
+ }
300
+ public function getCanShare()
301
+ {
302
+ return $this->canShare;
303
+ }
304
+ public function setCanTrash($canTrash)
305
+ {
306
+ $this->canTrash = $canTrash;
307
+ }
308
+ public function getCanTrash()
309
+ {
310
+ return $this->canTrash;
311
+ }
312
+ public function setCanTrashChildren($canTrashChildren)
313
+ {
314
+ $this->canTrashChildren = $canTrashChildren;
315
+ }
316
+ public function getCanTrashChildren()
317
+ {
318
+ return $this->canTrashChildren;
319
+ }
320
+ public function setCanUntrash($canUntrash)
321
+ {
322
+ $this->canUntrash = $canUntrash;
323
+ }
324
+ public function getCanUntrash()
325
+ {
326
+ return $this->canUntrash;
327
+ }
328
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileContentHints.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileContentHints extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $indexableText;
23
+ protected $thumbnailType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileContentHintsThumbnail';
24
+ protected $thumbnailDataType = '';
25
+ public function setIndexableText($indexableText)
26
+ {
27
+ $this->indexableText = $indexableText;
28
+ }
29
+ public function getIndexableText()
30
+ {
31
+ return $this->indexableText;
32
+ }
33
+ /**
34
+ * @param Google_Service_Drive_DriveFileContentHintsThumbnail
35
+ */
36
+ public function setThumbnail(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileContentHintsThumbnail $thumbnail)
37
+ {
38
+ $this->thumbnail = $thumbnail;
39
+ }
40
+ /**
41
+ * @return Google_Service_Drive_DriveFileContentHintsThumbnail
42
+ */
43
+ public function getThumbnail()
44
+ {
45
+ return $this->thumbnail;
46
+ }
47
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileContentHintsThumbnail.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileContentHintsThumbnail extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $image;
23
+ public $mimeType;
24
+ public function setImage($image)
25
+ {
26
+ $this->image = $image;
27
+ }
28
+ public function getImage()
29
+ {
30
+ return $this->image;
31
+ }
32
+ public function setMimeType($mimeType)
33
+ {
34
+ $this->mimeType = $mimeType;
35
+ }
36
+ public function getMimeType()
37
+ {
38
+ return $this->mimeType;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileImageMediaMetadata.php ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileImageMediaMetadata extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $aperture;
23
+ public $cameraMake;
24
+ public $cameraModel;
25
+ public $colorSpace;
26
+ public $exposureBias;
27
+ public $exposureMode;
28
+ public $exposureTime;
29
+ public $flashUsed;
30
+ public $focalLength;
31
+ public $height;
32
+ public $isoSpeed;
33
+ public $lens;
34
+ protected $locationType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileImageMediaMetadataLocation';
35
+ protected $locationDataType = '';
36
+ public $maxApertureValue;
37
+ public $meteringMode;
38
+ public $rotation;
39
+ public $sensor;
40
+ public $subjectDistance;
41
+ public $time;
42
+ public $whiteBalance;
43
+ public $width;
44
+ public function setAperture($aperture)
45
+ {
46
+ $this->aperture = $aperture;
47
+ }
48
+ public function getAperture()
49
+ {
50
+ return $this->aperture;
51
+ }
52
+ public function setCameraMake($cameraMake)
53
+ {
54
+ $this->cameraMake = $cameraMake;
55
+ }
56
+ public function getCameraMake()
57
+ {
58
+ return $this->cameraMake;
59
+ }
60
+ public function setCameraModel($cameraModel)
61
+ {
62
+ $this->cameraModel = $cameraModel;
63
+ }
64
+ public function getCameraModel()
65
+ {
66
+ return $this->cameraModel;
67
+ }
68
+ public function setColorSpace($colorSpace)
69
+ {
70
+ $this->colorSpace = $colorSpace;
71
+ }
72
+ public function getColorSpace()
73
+ {
74
+ return $this->colorSpace;
75
+ }
76
+ public function setExposureBias($exposureBias)
77
+ {
78
+ $this->exposureBias = $exposureBias;
79
+ }
80
+ public function getExposureBias()
81
+ {
82
+ return $this->exposureBias;
83
+ }
84
+ public function setExposureMode($exposureMode)
85
+ {
86
+ $this->exposureMode = $exposureMode;
87
+ }
88
+ public function getExposureMode()
89
+ {
90
+ return $this->exposureMode;
91
+ }
92
+ public function setExposureTime($exposureTime)
93
+ {
94
+ $this->exposureTime = $exposureTime;
95
+ }
96
+ public function getExposureTime()
97
+ {
98
+ return $this->exposureTime;
99
+ }
100
+ public function setFlashUsed($flashUsed)
101
+ {
102
+ $this->flashUsed = $flashUsed;
103
+ }
104
+ public function getFlashUsed()
105
+ {
106
+ return $this->flashUsed;
107
+ }
108
+ public function setFocalLength($focalLength)
109
+ {
110
+ $this->focalLength = $focalLength;
111
+ }
112
+ public function getFocalLength()
113
+ {
114
+ return $this->focalLength;
115
+ }
116
+ public function setHeight($height)
117
+ {
118
+ $this->height = $height;
119
+ }
120
+ public function getHeight()
121
+ {
122
+ return $this->height;
123
+ }
124
+ public function setIsoSpeed($isoSpeed)
125
+ {
126
+ $this->isoSpeed = $isoSpeed;
127
+ }
128
+ public function getIsoSpeed()
129
+ {
130
+ return $this->isoSpeed;
131
+ }
132
+ public function setLens($lens)
133
+ {
134
+ $this->lens = $lens;
135
+ }
136
+ public function getLens()
137
+ {
138
+ return $this->lens;
139
+ }
140
+ /**
141
+ * @param Google_Service_Drive_DriveFileImageMediaMetadataLocation
142
+ */
143
+ public function setLocation(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFileImageMediaMetadataLocation $location)
144
+ {
145
+ $this->location = $location;
146
+ }
147
+ /**
148
+ * @return Google_Service_Drive_DriveFileImageMediaMetadataLocation
149
+ */
150
+ public function getLocation()
151
+ {
152
+ return $this->location;
153
+ }
154
+ public function setMaxApertureValue($maxApertureValue)
155
+ {
156
+ $this->maxApertureValue = $maxApertureValue;
157
+ }
158
+ public function getMaxApertureValue()
159
+ {
160
+ return $this->maxApertureValue;
161
+ }
162
+ public function setMeteringMode($meteringMode)
163
+ {
164
+ $this->meteringMode = $meteringMode;
165
+ }
166
+ public function getMeteringMode()
167
+ {
168
+ return $this->meteringMode;
169
+ }
170
+ public function setRotation($rotation)
171
+ {
172
+ $this->rotation = $rotation;
173
+ }
174
+ public function getRotation()
175
+ {
176
+ return $this->rotation;
177
+ }
178
+ public function setSensor($sensor)
179
+ {
180
+ $this->sensor = $sensor;
181
+ }
182
+ public function getSensor()
183
+ {
184
+ return $this->sensor;
185
+ }
186
+ public function setSubjectDistance($subjectDistance)
187
+ {
188
+ $this->subjectDistance = $subjectDistance;
189
+ }
190
+ public function getSubjectDistance()
191
+ {
192
+ return $this->subjectDistance;
193
+ }
194
+ public function setTime($time)
195
+ {
196
+ $this->time = $time;
197
+ }
198
+ public function getTime()
199
+ {
200
+ return $this->time;
201
+ }
202
+ public function setWhiteBalance($whiteBalance)
203
+ {
204
+ $this->whiteBalance = $whiteBalance;
205
+ }
206
+ public function getWhiteBalance()
207
+ {
208
+ return $this->whiteBalance;
209
+ }
210
+ public function setWidth($width)
211
+ {
212
+ $this->width = $width;
213
+ }
214
+ public function getWidth()
215
+ {
216
+ return $this->width;
217
+ }
218
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileImageMediaMetadataLocation.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileImageMediaMetadataLocation extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $altitude;
23
+ public $latitude;
24
+ public $longitude;
25
+ public function setAltitude($altitude)
26
+ {
27
+ $this->altitude = $altitude;
28
+ }
29
+ public function getAltitude()
30
+ {
31
+ return $this->altitude;
32
+ }
33
+ public function setLatitude($latitude)
34
+ {
35
+ $this->latitude = $latitude;
36
+ }
37
+ public function getLatitude()
38
+ {
39
+ return $this->latitude;
40
+ }
41
+ public function setLongitude($longitude)
42
+ {
43
+ $this->longitude = $longitude;
44
+ }
45
+ public function getLongitude()
46
+ {
47
+ return $this->longitude;
48
+ }
49
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileShortcutDetails.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileShortcutDetails extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $targetId;
23
+ public $targetMimeType;
24
+ public function setTargetId($targetId)
25
+ {
26
+ $this->targetId = $targetId;
27
+ }
28
+ public function getTargetId()
29
+ {
30
+ return $this->targetId;
31
+ }
32
+ public function setTargetMimeType($targetMimeType)
33
+ {
34
+ $this->targetMimeType = $targetMimeType;
35
+ }
36
+ public function getTargetMimeType()
37
+ {
38
+ return $this->targetMimeType;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveFileVideoMediaMetadata.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveFileVideoMediaMetadata extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $durationMillis;
23
+ public $height;
24
+ public $width;
25
+ public function setDurationMillis($durationMillis)
26
+ {
27
+ $this->durationMillis = $durationMillis;
28
+ }
29
+ public function getDurationMillis()
30
+ {
31
+ return $this->durationMillis;
32
+ }
33
+ public function setHeight($height)
34
+ {
35
+ $this->height = $height;
36
+ }
37
+ public function getHeight()
38
+ {
39
+ return $this->height;
40
+ }
41
+ public function setWidth($width)
42
+ {
43
+ $this->width = $width;
44
+ }
45
+ public function getWidth()
46
+ {
47
+ return $this->width;
48
+ }
49
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'drives';
23
+ protected $drivesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Drive';
24
+ protected $drivesDataType = 'array';
25
+ public $kind;
26
+ public $nextPageToken;
27
+ /**
28
+ * @param Google_Service_Drive_Drive[]
29
+ */
30
+ public function setDrives($drives)
31
+ {
32
+ $this->drives = $drives;
33
+ }
34
+ /**
35
+ * @return Google_Service_Drive_Drive[]
36
+ */
37
+ public function getDrives()
38
+ {
39
+ return $this->drives;
40
+ }
41
+ public function setKind($kind)
42
+ {
43
+ $this->kind = $kind;
44
+ }
45
+ public function getKind()
46
+ {
47
+ return $this->kind;
48
+ }
49
+ public function setNextPageToken($nextPageToken)
50
+ {
51
+ $this->nextPageToken = $nextPageToken;
52
+ }
53
+ public function getNextPageToken()
54
+ {
55
+ return $this->nextPageToken;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/DriveRestrictions.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_DriveRestrictions extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $adminManagedRestrictions;
23
+ public $copyRequiresWriterPermission;
24
+ public $domainUsersOnly;
25
+ public $driveMembersOnly;
26
+ public function setAdminManagedRestrictions($adminManagedRestrictions)
27
+ {
28
+ $this->adminManagedRestrictions = $adminManagedRestrictions;
29
+ }
30
+ public function getAdminManagedRestrictions()
31
+ {
32
+ return $this->adminManagedRestrictions;
33
+ }
34
+ public function setCopyRequiresWriterPermission($copyRequiresWriterPermission)
35
+ {
36
+ $this->copyRequiresWriterPermission = $copyRequiresWriterPermission;
37
+ }
38
+ public function getCopyRequiresWriterPermission()
39
+ {
40
+ return $this->copyRequiresWriterPermission;
41
+ }
42
+ public function setDomainUsersOnly($domainUsersOnly)
43
+ {
44
+ $this->domainUsersOnly = $domainUsersOnly;
45
+ }
46
+ public function getDomainUsersOnly()
47
+ {
48
+ return $this->domainUsersOnly;
49
+ }
50
+ public function setDriveMembersOnly($driveMembersOnly)
51
+ {
52
+ $this->driveMembersOnly = $driveMembersOnly;
53
+ }
54
+ public function getDriveMembersOnly()
55
+ {
56
+ return $this->driveMembersOnly;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/FileList.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_FileList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'files';
23
+ protected $filesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile';
24
+ protected $filesDataType = 'array';
25
+ public $incompleteSearch;
26
+ public $kind;
27
+ public $nextPageToken;
28
+ /**
29
+ * @param Google_Service_Drive_DriveFile[]
30
+ */
31
+ public function setFiles($files)
32
+ {
33
+ $this->files = $files;
34
+ }
35
+ /**
36
+ * @return Google_Service_Drive_DriveFile[]
37
+ */
38
+ public function getFiles()
39
+ {
40
+ return $this->files;
41
+ }
42
+ public function setIncompleteSearch($incompleteSearch)
43
+ {
44
+ $this->incompleteSearch = $incompleteSearch;
45
+ }
46
+ public function getIncompleteSearch()
47
+ {
48
+ return $this->incompleteSearch;
49
+ }
50
+ public function setKind($kind)
51
+ {
52
+ $this->kind = $kind;
53
+ }
54
+ public function getKind()
55
+ {
56
+ return $this->kind;
57
+ }
58
+ public function setNextPageToken($nextPageToken)
59
+ {
60
+ $this->nextPageToken = $nextPageToken;
61
+ }
62
+ public function getNextPageToken()
63
+ {
64
+ return $this->nextPageToken;
65
+ }
66
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/GeneratedIds.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_GeneratedIds extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'ids';
23
+ public $ids;
24
+ public $kind;
25
+ public $space;
26
+ public function setIds($ids)
27
+ {
28
+ $this->ids = $ids;
29
+ }
30
+ public function getIds()
31
+ {
32
+ return $this->ids;
33
+ }
34
+ public function setKind($kind)
35
+ {
36
+ $this->kind = $kind;
37
+ }
38
+ public function getKind()
39
+ {
40
+ return $this->kind;
41
+ }
42
+ public function setSpace($space)
43
+ {
44
+ $this->space = $space;
45
+ }
46
+ public function getSpace()
47
+ {
48
+ return $this->space;
49
+ }
50
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Permission.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Permission extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'teamDrivePermissionDetails';
23
+ public $allowFileDiscovery;
24
+ public $deleted;
25
+ public $displayName;
26
+ public $domain;
27
+ public $emailAddress;
28
+ public $expirationTime;
29
+ public $id;
30
+ public $kind;
31
+ protected $permissionDetailsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_PermissionPermissionDetails';
32
+ protected $permissionDetailsDataType = 'array';
33
+ public $photoLink;
34
+ public $role;
35
+ protected $teamDrivePermissionDetailsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_PermissionTeamDrivePermissionDetails';
36
+ protected $teamDrivePermissionDetailsDataType = 'array';
37
+ public $type;
38
+ public $view;
39
+ public function setAllowFileDiscovery($allowFileDiscovery)
40
+ {
41
+ $this->allowFileDiscovery = $allowFileDiscovery;
42
+ }
43
+ public function getAllowFileDiscovery()
44
+ {
45
+ return $this->allowFileDiscovery;
46
+ }
47
+ public function setDeleted($deleted)
48
+ {
49
+ $this->deleted = $deleted;
50
+ }
51
+ public function getDeleted()
52
+ {
53
+ return $this->deleted;
54
+ }
55
+ public function setDisplayName($displayName)
56
+ {
57
+ $this->displayName = $displayName;
58
+ }
59
+ public function getDisplayName()
60
+ {
61
+ return $this->displayName;
62
+ }
63
+ public function setDomain($domain)
64
+ {
65
+ $this->domain = $domain;
66
+ }
67
+ public function getDomain()
68
+ {
69
+ return $this->domain;
70
+ }
71
+ public function setEmailAddress($emailAddress)
72
+ {
73
+ $this->emailAddress = $emailAddress;
74
+ }
75
+ public function getEmailAddress()
76
+ {
77
+ return $this->emailAddress;
78
+ }
79
+ public function setExpirationTime($expirationTime)
80
+ {
81
+ $this->expirationTime = $expirationTime;
82
+ }
83
+ public function getExpirationTime()
84
+ {
85
+ return $this->expirationTime;
86
+ }
87
+ public function setId($id)
88
+ {
89
+ $this->id = $id;
90
+ }
91
+ public function getId()
92
+ {
93
+ return $this->id;
94
+ }
95
+ public function setKind($kind)
96
+ {
97
+ $this->kind = $kind;
98
+ }
99
+ public function getKind()
100
+ {
101
+ return $this->kind;
102
+ }
103
+ /**
104
+ * @param Google_Service_Drive_PermissionPermissionDetails[]
105
+ */
106
+ public function setPermissionDetails($permissionDetails)
107
+ {
108
+ $this->permissionDetails = $permissionDetails;
109
+ }
110
+ /**
111
+ * @return Google_Service_Drive_PermissionPermissionDetails[]
112
+ */
113
+ public function getPermissionDetails()
114
+ {
115
+ return $this->permissionDetails;
116
+ }
117
+ public function setPhotoLink($photoLink)
118
+ {
119
+ $this->photoLink = $photoLink;
120
+ }
121
+ public function getPhotoLink()
122
+ {
123
+ return $this->photoLink;
124
+ }
125
+ public function setRole($role)
126
+ {
127
+ $this->role = $role;
128
+ }
129
+ public function getRole()
130
+ {
131
+ return $this->role;
132
+ }
133
+ /**
134
+ * @param Google_Service_Drive_PermissionTeamDrivePermissionDetails[]
135
+ */
136
+ public function setTeamDrivePermissionDetails($teamDrivePermissionDetails)
137
+ {
138
+ $this->teamDrivePermissionDetails = $teamDrivePermissionDetails;
139
+ }
140
+ /**
141
+ * @return Google_Service_Drive_PermissionTeamDrivePermissionDetails[]
142
+ */
143
+ public function getTeamDrivePermissionDetails()
144
+ {
145
+ return $this->teamDrivePermissionDetails;
146
+ }
147
+ public function setType($type)
148
+ {
149
+ $this->type = $type;
150
+ }
151
+ public function getType()
152
+ {
153
+ return $this->type;
154
+ }
155
+ public function setView($view)
156
+ {
157
+ $this->view = $view;
158
+ }
159
+ public function getView()
160
+ {
161
+ return $this->view;
162
+ }
163
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/PermissionList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_PermissionList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'permissions';
23
+ public $kind;
24
+ public $nextPageToken;
25
+ protected $permissionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Permission';
26
+ protected $permissionsDataType = 'array';
27
+ public function setKind($kind)
28
+ {
29
+ $this->kind = $kind;
30
+ }
31
+ public function getKind()
32
+ {
33
+ return $this->kind;
34
+ }
35
+ public function setNextPageToken($nextPageToken)
36
+ {
37
+ $this->nextPageToken = $nextPageToken;
38
+ }
39
+ public function getNextPageToken()
40
+ {
41
+ return $this->nextPageToken;
42
+ }
43
+ /**
44
+ * @param Google_Service_Drive_Permission[]
45
+ */
46
+ public function setPermissions($permissions)
47
+ {
48
+ $this->permissions = $permissions;
49
+ }
50
+ /**
51
+ * @return Google_Service_Drive_Permission[]
52
+ */
53
+ public function getPermissions()
54
+ {
55
+ return $this->permissions;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/PermissionPermissionDetails.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_PermissionPermissionDetails extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $inherited;
23
+ public $inheritedFrom;
24
+ public $permissionType;
25
+ public $role;
26
+ public function setInherited($inherited)
27
+ {
28
+ $this->inherited = $inherited;
29
+ }
30
+ public function getInherited()
31
+ {
32
+ return $this->inherited;
33
+ }
34
+ public function setInheritedFrom($inheritedFrom)
35
+ {
36
+ $this->inheritedFrom = $inheritedFrom;
37
+ }
38
+ public function getInheritedFrom()
39
+ {
40
+ return $this->inheritedFrom;
41
+ }
42
+ public function setPermissionType($permissionType)
43
+ {
44
+ $this->permissionType = $permissionType;
45
+ }
46
+ public function getPermissionType()
47
+ {
48
+ return $this->permissionType;
49
+ }
50
+ public function setRole($role)
51
+ {
52
+ $this->role = $role;
53
+ }
54
+ public function getRole()
55
+ {
56
+ return $this->role;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/PermissionTeamDrivePermissionDetails.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_PermissionTeamDrivePermissionDetails extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $inherited;
23
+ public $inheritedFrom;
24
+ public $role;
25
+ public $teamDrivePermissionType;
26
+ public function setInherited($inherited)
27
+ {
28
+ $this->inherited = $inherited;
29
+ }
30
+ public function getInherited()
31
+ {
32
+ return $this->inherited;
33
+ }
34
+ public function setInheritedFrom($inheritedFrom)
35
+ {
36
+ $this->inheritedFrom = $inheritedFrom;
37
+ }
38
+ public function getInheritedFrom()
39
+ {
40
+ return $this->inheritedFrom;
41
+ }
42
+ public function setRole($role)
43
+ {
44
+ $this->role = $role;
45
+ }
46
+ public function getRole()
47
+ {
48
+ return $this->role;
49
+ }
50
+ public function setTeamDrivePermissionType($teamDrivePermissionType)
51
+ {
52
+ $this->teamDrivePermissionType = $teamDrivePermissionType;
53
+ }
54
+ public function getTeamDrivePermissionType()
55
+ {
56
+ return $this->teamDrivePermissionType;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Reply.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Reply extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $action;
23
+ protected $authorType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
24
+ protected $authorDataType = '';
25
+ public $content;
26
+ public $createdTime;
27
+ public $deleted;
28
+ public $htmlContent;
29
+ public $id;
30
+ public $kind;
31
+ public $modifiedTime;
32
+ public function setAction($action)
33
+ {
34
+ $this->action = $action;
35
+ }
36
+ public function getAction()
37
+ {
38
+ return $this->action;
39
+ }
40
+ /**
41
+ * @param Google_Service_Drive_User
42
+ */
43
+ public function setAuthor(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $author)
44
+ {
45
+ $this->author = $author;
46
+ }
47
+ /**
48
+ * @return Google_Service_Drive_User
49
+ */
50
+ public function getAuthor()
51
+ {
52
+ return $this->author;
53
+ }
54
+ public function setContent($content)
55
+ {
56
+ $this->content = $content;
57
+ }
58
+ public function getContent()
59
+ {
60
+ return $this->content;
61
+ }
62
+ public function setCreatedTime($createdTime)
63
+ {
64
+ $this->createdTime = $createdTime;
65
+ }
66
+ public function getCreatedTime()
67
+ {
68
+ return $this->createdTime;
69
+ }
70
+ public function setDeleted($deleted)
71
+ {
72
+ $this->deleted = $deleted;
73
+ }
74
+ public function getDeleted()
75
+ {
76
+ return $this->deleted;
77
+ }
78
+ public function setHtmlContent($htmlContent)
79
+ {
80
+ $this->htmlContent = $htmlContent;
81
+ }
82
+ public function getHtmlContent()
83
+ {
84
+ return $this->htmlContent;
85
+ }
86
+ public function setId($id)
87
+ {
88
+ $this->id = $id;
89
+ }
90
+ public function getId()
91
+ {
92
+ return $this->id;
93
+ }
94
+ public function setKind($kind)
95
+ {
96
+ $this->kind = $kind;
97
+ }
98
+ public function getKind()
99
+ {
100
+ return $this->kind;
101
+ }
102
+ public function setModifiedTime($modifiedTime)
103
+ {
104
+ $this->modifiedTime = $modifiedTime;
105
+ }
106
+ public function getModifiedTime()
107
+ {
108
+ return $this->modifiedTime;
109
+ }
110
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/ReplyList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_ReplyList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'replies';
23
+ public $kind;
24
+ public $nextPageToken;
25
+ protected $repliesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Reply';
26
+ protected $repliesDataType = 'array';
27
+ public function setKind($kind)
28
+ {
29
+ $this->kind = $kind;
30
+ }
31
+ public function getKind()
32
+ {
33
+ return $this->kind;
34
+ }
35
+ public function setNextPageToken($nextPageToken)
36
+ {
37
+ $this->nextPageToken = $nextPageToken;
38
+ }
39
+ public function getNextPageToken()
40
+ {
41
+ return $this->nextPageToken;
42
+ }
43
+ /**
44
+ * @param Google_Service_Drive_Reply[]
45
+ */
46
+ public function setReplies($replies)
47
+ {
48
+ $this->replies = $replies;
49
+ }
50
+ /**
51
+ * @return Google_Service_Drive_Reply[]
52
+ */
53
+ public function getReplies()
54
+ {
55
+ return $this->replies;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/About.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "about" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $about = $driveService->about;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_About extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Gets information about the user, the user's Drive, and system capabilities.
32
+ * (about.get)
33
+ *
34
+ * @param array $optParams Optional parameters.
35
+ * @return Google_Service_Drive_About
36
+ */
37
+ public function get($optParams = array())
38
+ {
39
+ $params = array();
40
+ $params = \array_merge($params, $optParams);
41
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_About");
42
+ }
43
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Changes.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "changes" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $changes = $driveService->changes;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Changes extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Gets the starting pageToken for listing future changes.
32
+ * (changes.getStartPageToken)
33
+ *
34
+ * @param array $optParams Optional parameters.
35
+ *
36
+ * @opt_param string driveId The ID of the shared drive for which the starting
37
+ * pageToken for listing future changes from that shared drive is returned.
38
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
39
+ * both My Drives and shared drives.
40
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
41
+ * @opt_param string teamDriveId Deprecated use driveId instead.
42
+ * @return Google_Service_Drive_StartPageToken
43
+ */
44
+ public function getStartPageToken($optParams = array())
45
+ {
46
+ $params = array();
47
+ $params = \array_merge($params, $optParams);
48
+ return $this->call('getStartPageToken', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_StartPageToken");
49
+ }
50
+ /**
51
+ * Lists the changes for a user or shared drive. (changes.listChanges)
52
+ *
53
+ * @param string $pageToken The token for continuing a previous list request on
54
+ * the next page. This should be set to the value of 'nextPageToken' from the
55
+ * previous response or to the response from the getStartPageToken method.
56
+ * @param array $optParams Optional parameters.
57
+ *
58
+ * @opt_param string driveId The shared drive from which changes are returned.
59
+ * If specified the change IDs will be reflective of the shared drive; use the
60
+ * combined drive ID and change ID as an identifier.
61
+ * @opt_param bool includeCorpusRemovals Whether changes should include the file
62
+ * resource if the file is still accessible by the user at the time of the
63
+ * request, even when a file was removed from the list of changes and there will
64
+ * be no further change entries for this file.
65
+ * @opt_param bool includeItemsFromAllDrives Whether both My Drive and shared
66
+ * drive items should be included in results.
67
+ * @opt_param string includePermissionsForView Specifies which additional view's
68
+ * permissions to include in the response. Only 'published' is supported.
69
+ * @opt_param bool includeRemoved Whether to include changes indicating that
70
+ * items have been removed from the list of changes, for example by deletion or
71
+ * loss of access.
72
+ * @opt_param bool includeTeamDriveItems Deprecated use
73
+ * includeItemsFromAllDrives instead.
74
+ * @opt_param int pageSize The maximum number of changes to return per page.
75
+ * @opt_param bool restrictToMyDrive Whether to restrict the results to changes
76
+ * inside the My Drive hierarchy. This omits changes to files such as those in
77
+ * the Application Data folder or shared files which have not been added to My
78
+ * Drive.
79
+ * @opt_param string spaces A comma-separated list of spaces to query within the
80
+ * user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
81
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
82
+ * both My Drives and shared drives.
83
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
84
+ * @opt_param string teamDriveId Deprecated use driveId instead.
85
+ * @return Google_Service_Drive_ChangeList
86
+ */
87
+ public function listChanges($pageToken, $optParams = array())
88
+ {
89
+ $params = array('pageToken' => $pageToken);
90
+ $params = \array_merge($params, $optParams);
91
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_ChangeList");
92
+ }
93
+ /**
94
+ * Subscribes to changes for a user. (changes.watch)
95
+ *
96
+ * @param string $pageToken The token for continuing a previous list request on
97
+ * the next page. This should be set to the value of 'nextPageToken' from the
98
+ * previous response or to the response from the getStartPageToken method.
99
+ * @param Google_Service_Drive_Channel $postBody
100
+ * @param array $optParams Optional parameters.
101
+ *
102
+ * @opt_param string driveId The shared drive from which changes are returned.
103
+ * If specified the change IDs will be reflective of the shared drive; use the
104
+ * combined drive ID and change ID as an identifier.
105
+ * @opt_param bool includeCorpusRemovals Whether changes should include the file
106
+ * resource if the file is still accessible by the user at the time of the
107
+ * request, even when a file was removed from the list of changes and there will
108
+ * be no further change entries for this file.
109
+ * @opt_param bool includeItemsFromAllDrives Whether both My Drive and shared
110
+ * drive items should be included in results.
111
+ * @opt_param string includePermissionsForView Specifies which additional view's
112
+ * permissions to include in the response. Only 'published' is supported.
113
+ * @opt_param bool includeRemoved Whether to include changes indicating that
114
+ * items have been removed from the list of changes, for example by deletion or
115
+ * loss of access.
116
+ * @opt_param bool includeTeamDriveItems Deprecated use
117
+ * includeItemsFromAllDrives instead.
118
+ * @opt_param int pageSize The maximum number of changes to return per page.
119
+ * @opt_param bool restrictToMyDrive Whether to restrict the results to changes
120
+ * inside the My Drive hierarchy. This omits changes to files such as those in
121
+ * the Application Data folder or shared files which have not been added to My
122
+ * Drive.
123
+ * @opt_param string spaces A comma-separated list of spaces to query within the
124
+ * user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
125
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
126
+ * both My Drives and shared drives.
127
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
128
+ * @opt_param string teamDriveId Deprecated use driveId instead.
129
+ * @return Google_Service_Drive_Channel
130
+ */
131
+ public function watch($pageToken, \SimpleCalendar\plugin_deps\Google_Service_Drive_Channel $postBody, $optParams = array())
132
+ {
133
+ $params = array('pageToken' => $pageToken, 'postBody' => $postBody);
134
+ $params = \array_merge($params, $optParams);
135
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Channel");
136
+ }
137
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Channels.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "channels" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $channels = $driveService->channels;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Channels extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Stop watching resources through this channel (channels.stop)
32
+ *
33
+ * @param Google_Service_Drive_Channel $postBody
34
+ * @param array $optParams Optional parameters.
35
+ */
36
+ public function stop(\SimpleCalendar\plugin_deps\Google_Service_Drive_Channel $postBody, $optParams = array())
37
+ {
38
+ $params = array('postBody' => $postBody);
39
+ $params = \array_merge($params, $optParams);
40
+ return $this->call('stop', array($params));
41
+ }
42
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Comments.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "comments" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $comments = $driveService->comments;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Comments extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Creates a new comment on a file. (comments.create)
32
+ *
33
+ * @param string $fileId The ID of the file.
34
+ * @param Google_Service_Drive_Comment $postBody
35
+ * @param array $optParams Optional parameters.
36
+ * @return Google_Service_Drive_Comment
37
+ */
38
+ public function create($fileId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Comment $postBody, $optParams = array())
39
+ {
40
+ $params = array('fileId' => $fileId, 'postBody' => $postBody);
41
+ $params = \array_merge($params, $optParams);
42
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Comment");
43
+ }
44
+ /**
45
+ * Deletes a comment. (comments.delete)
46
+ *
47
+ * @param string $fileId The ID of the file.
48
+ * @param string $commentId The ID of the comment.
49
+ * @param array $optParams Optional parameters.
50
+ */
51
+ public function delete($fileId, $commentId, $optParams = array())
52
+ {
53
+ $params = array('fileId' => $fileId, 'commentId' => $commentId);
54
+ $params = \array_merge($params, $optParams);
55
+ return $this->call('delete', array($params));
56
+ }
57
+ /**
58
+ * Gets a comment by ID. (comments.get)
59
+ *
60
+ * @param string $fileId The ID of the file.
61
+ * @param string $commentId The ID of the comment.
62
+ * @param array $optParams Optional parameters.
63
+ *
64
+ * @opt_param bool includeDeleted Whether to return deleted comments. Deleted
65
+ * comments will not include their original content.
66
+ * @return Google_Service_Drive_Comment
67
+ */
68
+ public function get($fileId, $commentId, $optParams = array())
69
+ {
70
+ $params = array('fileId' => $fileId, 'commentId' => $commentId);
71
+ $params = \array_merge($params, $optParams);
72
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Comment");
73
+ }
74
+ /**
75
+ * Lists a file's comments. (comments.listComments)
76
+ *
77
+ * @param string $fileId The ID of the file.
78
+ * @param array $optParams Optional parameters.
79
+ *
80
+ * @opt_param bool includeDeleted Whether to include deleted comments. Deleted
81
+ * comments will not include their original content.
82
+ * @opt_param int pageSize The maximum number of comments to return per page.
83
+ * @opt_param string pageToken The token for continuing a previous list request
84
+ * on the next page. This should be set to the value of 'nextPageToken' from the
85
+ * previous response.
86
+ * @opt_param string startModifiedTime The minimum value of 'modifiedTime' for
87
+ * the result comments (RFC 3339 date-time).
88
+ * @return Google_Service_Drive_CommentList
89
+ */
90
+ public function listComments($fileId, $optParams = array())
91
+ {
92
+ $params = array('fileId' => $fileId);
93
+ $params = \array_merge($params, $optParams);
94
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_CommentList");
95
+ }
96
+ /**
97
+ * Updates a comment with patch semantics. (comments.update)
98
+ *
99
+ * @param string $fileId The ID of the file.
100
+ * @param string $commentId The ID of the comment.
101
+ * @param Google_Service_Drive_Comment $postBody
102
+ * @param array $optParams Optional parameters.
103
+ * @return Google_Service_Drive_Comment
104
+ */
105
+ public function update($fileId, $commentId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Comment $postBody, $optParams = array())
106
+ {
107
+ $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
108
+ $params = \array_merge($params, $optParams);
109
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Comment");
110
+ }
111
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Drives.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "drives" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $drives = $driveService->drives;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Drives extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Creates a new shared drive. (drives.create)
32
+ *
33
+ * @param string $requestId An ID, such as a random UUID, which uniquely
34
+ * identifies this user's request for idempotent creation of a shared drive. A
35
+ * repeated request by the same user and with the same request ID will avoid
36
+ * creating duplicates by attempting to create the same shared drive. If the
37
+ * shared drive already exists a 409 error will be returned.
38
+ * @param Google_Service_Drive_Drive $postBody
39
+ * @param array $optParams Optional parameters.
40
+ * @return Google_Service_Drive_Drive
41
+ */
42
+ public function create($requestId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Drive $postBody, $optParams = array())
43
+ {
44
+ $params = array('requestId' => $requestId, 'postBody' => $postBody);
45
+ $params = \array_merge($params, $optParams);
46
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Drive");
47
+ }
48
+ /**
49
+ * Permanently deletes a shared drive for which the user is an organizer. The
50
+ * shared drive cannot contain any untrashed items. (drives.delete)
51
+ *
52
+ * @param string $driveId The ID of the shared drive.
53
+ * @param array $optParams Optional parameters.
54
+ */
55
+ public function delete($driveId, $optParams = array())
56
+ {
57
+ $params = array('driveId' => $driveId);
58
+ $params = \array_merge($params, $optParams);
59
+ return $this->call('delete', array($params));
60
+ }
61
+ /**
62
+ * Gets a shared drive's metadata by ID. (drives.get)
63
+ *
64
+ * @param string $driveId The ID of the shared drive.
65
+ * @param array $optParams Optional parameters.
66
+ *
67
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
68
+ * administrator; if set to true, then the requester will be granted access if
69
+ * they are an administrator of the domain to which the shared drive belongs.
70
+ * @return Google_Service_Drive_Drive
71
+ */
72
+ public function get($driveId, $optParams = array())
73
+ {
74
+ $params = array('driveId' => $driveId);
75
+ $params = \array_merge($params, $optParams);
76
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Drive");
77
+ }
78
+ /**
79
+ * Hides a shared drive from the default view. (drives.hide)
80
+ *
81
+ * @param string $driveId The ID of the shared drive.
82
+ * @param array $optParams Optional parameters.
83
+ * @return Google_Service_Drive_Drive
84
+ */
85
+ public function hide($driveId, $optParams = array())
86
+ {
87
+ $params = array('driveId' => $driveId);
88
+ $params = \array_merge($params, $optParams);
89
+ return $this->call('hide', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Drive");
90
+ }
91
+ /**
92
+ * Lists the user's shared drives. (drives.listDrives)
93
+ *
94
+ * @param array $optParams Optional parameters.
95
+ *
96
+ * @opt_param int pageSize Maximum number of shared drives to return.
97
+ * @opt_param string pageToken Page token for shared drives.
98
+ * @opt_param string q Query string for searching shared drives.
99
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
100
+ * administrator; if set to true, then all shared drives of the domain in which
101
+ * the requester is an administrator are returned.
102
+ * @return Google_Service_Drive_DriveList
103
+ */
104
+ public function listDrives($optParams = array())
105
+ {
106
+ $params = array();
107
+ $params = \array_merge($params, $optParams);
108
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_DriveList");
109
+ }
110
+ /**
111
+ * Restores a shared drive to the default view. (drives.unhide)
112
+ *
113
+ * @param string $driveId The ID of the shared drive.
114
+ * @param array $optParams Optional parameters.
115
+ * @return Google_Service_Drive_Drive
116
+ */
117
+ public function unhide($driveId, $optParams = array())
118
+ {
119
+ $params = array('driveId' => $driveId);
120
+ $params = \array_merge($params, $optParams);
121
+ return $this->call('unhide', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Drive");
122
+ }
123
+ /**
124
+ * Updates the metadate for a shared drive. (drives.update)
125
+ *
126
+ * @param string $driveId The ID of the shared drive.
127
+ * @param Google_Service_Drive_Drive $postBody
128
+ * @param array $optParams Optional parameters.
129
+ *
130
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
131
+ * administrator; if set to true, then the requester will be granted access if
132
+ * they are an administrator of the domain to which the shared drive belongs.
133
+ * @return Google_Service_Drive_Drive
134
+ */
135
+ public function update($driveId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Drive $postBody, $optParams = array())
136
+ {
137
+ $params = array('driveId' => $driveId, 'postBody' => $postBody);
138
+ $params = \array_merge($params, $optParams);
139
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Drive");
140
+ }
141
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "files" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $files = $driveService->files;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Files extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Creates a copy of a file and applies any requested updates with patch
32
+ * semantics. Folders cannot be copied. (files.copy)
33
+ *
34
+ * @param string $fileId The ID of the file.
35
+ * @param Google_Service_Drive_DriveFile $postBody
36
+ * @param array $optParams Optional parameters.
37
+ *
38
+ * @opt_param bool enforceSingleParent Deprecated. Copying files into multiple
39
+ * folders is no longer supported. Use shortcuts instead.
40
+ * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
41
+ * default visibility settings for the created file. Domain administrators can
42
+ * choose to make all uploaded files visible to the domain by default; this
43
+ * parameter bypasses that behavior for the request. Permissions are still
44
+ * inherited from parent folders.
45
+ * @opt_param string includePermissionsForView Specifies which additional view's
46
+ * permissions to include in the response. Only 'published' is supported.
47
+ * @opt_param bool keepRevisionForever Whether to set the 'keepForever' field in
48
+ * the new head revision. This is only applicable to files with binary content
49
+ * in Google Drive. Only 200 revisions for the file can be kept forever. If the
50
+ * limit is reached, try deleting pinned revisions.
51
+ * @opt_param string ocrLanguage A language hint for OCR processing during image
52
+ * import (ISO 639-1 code).
53
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
54
+ * both My Drives and shared drives.
55
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
56
+ * @return Google_Service_Drive_DriveFile
57
+ */
58
+ public function copy($fileId, \SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile $postBody, $optParams = array())
59
+ {
60
+ $params = array('fileId' => $fileId, 'postBody' => $postBody);
61
+ $params = \array_merge($params, $optParams);
62
+ return $this->call('copy', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile");
63
+ }
64
+ /**
65
+ * Creates a new file. (files.create)
66
+ *
67
+ * @param Google_Service_Drive_DriveFile $postBody
68
+ * @param array $optParams Optional parameters.
69
+ *
70
+ * @opt_param bool enforceSingleParent Deprecated. Creating files in multiple
71
+ * folders is no longer supported.
72
+ * @opt_param bool ignoreDefaultVisibility Whether to ignore the domain's
73
+ * default visibility settings for the created file. Domain administrators can
74
+ * choose to make all uploaded files visible to the domain by default; this
75
+ * parameter bypasses that behavior for the request. Permissions are still
76
+ * inherited from parent folders.
77
+ * @opt_param string includePermissionsForView Specifies which additional view's
78
+ * permissions to include in the response. Only 'published' is supported.
79
+ * @opt_param bool keepRevisionForever Whether to set the 'keepForever' field in
80
+ * the new head revision. This is only applicable to files with binary content
81
+ * in Google Drive. Only 200 revisions for the file can be kept forever. If the
82
+ * limit is reached, try deleting pinned revisions.
83
+ * @opt_param string ocrLanguage A language hint for OCR processing during image
84
+ * import (ISO 639-1 code).
85
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
86
+ * both My Drives and shared drives.
87
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
88
+ * @opt_param bool useContentAsIndexableText Whether to use the uploaded content
89
+ * as indexable text.
90
+ * @return Google_Service_Drive_DriveFile
91
+ */
92
+ public function create(\SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile $postBody, $optParams = array())
93
+ {
94
+ $params = array('postBody' => $postBody);
95
+ $params = \array_merge($params, $optParams);
96
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile");
97
+ }
98
+ /**
99
+ * Permanently deletes a file owned by the user without moving it to the trash.
100
+ * If the file belongs to a shared drive the user must be an organizer on the
101
+ * parent. If the target is a folder, all descendants owned by the user are also
102
+ * deleted. (files.delete)
103
+ *
104
+ * @param string $fileId The ID of the file.
105
+ * @param array $optParams Optional parameters.
106
+ *
107
+ * @opt_param bool enforceSingleParent Deprecated. If an item is not in a shared
108
+ * drive and its last parent is deleted but the item itself is not, the item
109
+ * will be placed under its owner's root.
110
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
111
+ * both My Drives and shared drives.
112
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
113
+ */
114
+ public function delete($fileId, $optParams = array())
115
+ {
116
+ $params = array('fileId' => $fileId);
117
+ $params = \array_merge($params, $optParams);
118
+ return $this->call('delete', array($params));
119
+ }
120
+ /**
121
+ * Permanently deletes all of the user's trashed files. (files.emptyTrash)
122
+ *
123
+ * @param array $optParams Optional parameters.
124
+ *
125
+ * @opt_param bool enforceSingleParent Deprecated. If an item is not in a shared
126
+ * drive and its last parent is deleted but the item itself is not, the item
127
+ * will be placed under its owner's root.
128
+ */
129
+ public function emptyTrash($optParams = array())
130
+ {
131
+ $params = array();
132
+ $params = \array_merge($params, $optParams);
133
+ return $this->call('emptyTrash', array($params));
134
+ }
135
+ /**
136
+ * Exports a Google Doc to the requested MIME type and returns the exported
137
+ * content. Please note that the exported content is limited to 10MB.
138
+ * (files.export)
139
+ *
140
+ * @param string $fileId The ID of the file.
141
+ * @param string $mimeType The MIME type of the format requested for this
142
+ * export.
143
+ * @param array $optParams Optional parameters.
144
+ */
145
+ public function export($fileId, $mimeType, $optParams = array())
146
+ {
147
+ $params = array('fileId' => $fileId, 'mimeType' => $mimeType);
148
+ $params = \array_merge($params, $optParams);
149
+ return $this->call('export', array($params));
150
+ }
151
+ /**
152
+ * Generates a set of file IDs which can be provided in create or copy requests.
153
+ * (files.generateIds)
154
+ *
155
+ * @param array $optParams Optional parameters.
156
+ *
157
+ * @opt_param int count The number of IDs to return.
158
+ * @opt_param string space The space in which the IDs can be used to create new
159
+ * files. Supported values are 'drive' and 'appDataFolder'.
160
+ * @return Google_Service_Drive_GeneratedIds
161
+ */
162
+ public function generateIds($optParams = array())
163
+ {
164
+ $params = array();
165
+ $params = \array_merge($params, $optParams);
166
+ return $this->call('generateIds', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_GeneratedIds");
167
+ }
168
+ /**
169
+ * Gets a file's metadata or content by ID. (files.get)
170
+ *
171
+ * @param string $fileId The ID of the file.
172
+ * @param array $optParams Optional parameters.
173
+ *
174
+ * @opt_param bool acknowledgeAbuse Whether the user is acknowledging the risk
175
+ * of downloading known malware or other abusive files. This is only applicable
176
+ * when alt=media.
177
+ * @opt_param string includePermissionsForView Specifies which additional view's
178
+ * permissions to include in the response. Only 'published' is supported.
179
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
180
+ * both My Drives and shared drives.
181
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
182
+ * @return Google_Service_Drive_DriveFile
183
+ */
184
+ public function get($fileId, $optParams = array())
185
+ {
186
+ $params = array('fileId' => $fileId);
187
+ $params = \array_merge($params, $optParams);
188
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile");
189
+ }
190
+ /**
191
+ * Lists or searches files. (files.listFiles)
192
+ *
193
+ * @param array $optParams Optional parameters.
194
+ *
195
+ * @opt_param string corpora Groupings of files to which the query applies.
196
+ * Supported groupings are: 'user' (files created by, opened by, or shared
197
+ * directly with the user), 'drive' (files in the specified shared drive as
198
+ * indicated by the 'driveId'), 'domain' (files shared to the user's domain),
199
+ * and 'allDrives' (A combination of 'user' and 'drive' for all drives where the
200
+ * user is a member). When able, use 'user' or 'drive', instead of 'allDrives',
201
+ * for efficiency.
202
+ * @opt_param string corpus The source of files to list. Deprecated: use
203
+ * 'corpora' instead.
204
+ * @opt_param string driveId ID of the shared drive to search.
205
+ * @opt_param bool includeItemsFromAllDrives Whether both My Drive and shared
206
+ * drive items should be included in results.
207
+ * @opt_param string includePermissionsForView Specifies which additional view's
208
+ * permissions to include in the response. Only 'published' is supported.
209
+ * @opt_param bool includeTeamDriveItems Deprecated use
210
+ * includeItemsFromAllDrives instead.
211
+ * @opt_param string orderBy A comma-separated list of sort keys. Valid keys are
212
+ * 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name',
213
+ * 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred',
214
+ * and 'viewedByMeTime'. Each key sorts ascending by default, but may be
215
+ * reversed with the 'desc' modifier. Example usage:
216
+ * ?orderBy=folder,modifiedTime desc,name. Please note that there is a current
217
+ * limitation for users with approximately one million files in which the
218
+ * requested sort order is ignored.
219
+ * @opt_param int pageSize The maximum number of files to return per page.
220
+ * Partial or empty result pages are possible even before the end of the files
221
+ * list has been reached.
222
+ * @opt_param string pageToken The token for continuing a previous list request
223
+ * on the next page. This should be set to the value of 'nextPageToken' from the
224
+ * previous response.
225
+ * @opt_param string q A query for filtering the file results. See the "Search
226
+ * for Files" guide for supported syntax.
227
+ * @opt_param string spaces A comma-separated list of spaces to query within the
228
+ * corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.
229
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
230
+ * both My Drives and shared drives.
231
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
232
+ * @opt_param string teamDriveId Deprecated use driveId instead.
233
+ * @return Google_Service_Drive_FileList
234
+ */
235
+ public function listFiles($optParams = array())
236
+ {
237
+ $params = array();
238
+ $params = \array_merge($params, $optParams);
239
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_FileList");
240
+ }
241
+ /**
242
+ * Updates a file's metadata and/or content. This method supports patch
243
+ * semantics. (files.update)
244
+ *
245
+ * @param string $fileId The ID of the file.
246
+ * @param Google_Service_Drive_DriveFile $postBody
247
+ * @param array $optParams Optional parameters.
248
+ *
249
+ * @opt_param string addParents A comma-separated list of parent IDs to add.
250
+ * @opt_param bool enforceSingleParent Deprecated. Adding files to multiple
251
+ * folders is no longer supported. Use shortcuts instead.
252
+ * @opt_param string includePermissionsForView Specifies which additional view's
253
+ * permissions to include in the response. Only 'published' is supported.
254
+ * @opt_param bool keepRevisionForever Whether to set the 'keepForever' field in
255
+ * the new head revision. This is only applicable to files with binary content
256
+ * in Google Drive. Only 200 revisions for the file can be kept forever. If the
257
+ * limit is reached, try deleting pinned revisions.
258
+ * @opt_param string ocrLanguage A language hint for OCR processing during image
259
+ * import (ISO 639-1 code).
260
+ * @opt_param string removeParents A comma-separated list of parent IDs to
261
+ * remove.
262
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
263
+ * both My Drives and shared drives.
264
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
265
+ * @opt_param bool useContentAsIndexableText Whether to use the uploaded content
266
+ * as indexable text.
267
+ * @return Google_Service_Drive_DriveFile
268
+ */
269
+ public function update($fileId, \SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile $postBody, $optParams = array())
270
+ {
271
+ $params = array('fileId' => $fileId, 'postBody' => $postBody);
272
+ $params = \array_merge($params, $optParams);
273
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_DriveFile");
274
+ }
275
+ /**
276
+ * Subscribes to changes to a file (files.watch)
277
+ *
278
+ * @param string $fileId The ID of the file.
279
+ * @param Google_Service_Drive_Channel $postBody
280
+ * @param array $optParams Optional parameters.
281
+ *
282
+ * @opt_param bool acknowledgeAbuse Whether the user is acknowledging the risk
283
+ * of downloading known malware or other abusive files. This is only applicable
284
+ * when alt=media.
285
+ * @opt_param string includePermissionsForView Specifies which additional view's
286
+ * permissions to include in the response. Only 'published' is supported.
287
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
288
+ * both My Drives and shared drives.
289
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
290
+ * @return Google_Service_Drive_Channel
291
+ */
292
+ public function watch($fileId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Channel $postBody, $optParams = array())
293
+ {
294
+ $params = array('fileId' => $fileId, 'postBody' => $postBody);
295
+ $params = \array_merge($params, $optParams);
296
+ return $this->call('watch', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Channel");
297
+ }
298
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Permissions.php ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "permissions" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $permissions = $driveService->permissions;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Permissions extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Creates a permission for a file or shared drive. (permissions.create)
32
+ *
33
+ * @param string $fileId The ID of the file or shared drive.
34
+ * @param Google_Service_Drive_Permission $postBody
35
+ * @param array $optParams Optional parameters.
36
+ *
37
+ * @opt_param string emailMessage A plain text custom message to include in the
38
+ * notification email.
39
+ * @opt_param bool enforceSingleParent Deprecated. See moveToNewOwnersRoot for
40
+ * details.
41
+ * @opt_param bool moveToNewOwnersRoot This parameter will only take effect if
42
+ * the item is not in a shared drive and the request is attempting to transfer
43
+ * the ownership of the item. If set to true, the item will be moved to the new
44
+ * owner's My Drive root folder and all prior parents removed. If set to false,
45
+ * parents are not changed.
46
+ * @opt_param bool sendNotificationEmail Whether to send a notification email
47
+ * when sharing to users or groups. This defaults to true for users and groups,
48
+ * and is not allowed for other requests. It must not be disabled for ownership
49
+ * transfers.
50
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
51
+ * both My Drives and shared drives.
52
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
53
+ * @opt_param bool transferOwnership Whether to transfer ownership to the
54
+ * specified user and downgrade the current owner to a writer. This parameter is
55
+ * required as an acknowledgement of the side effect.
56
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
57
+ * administrator; if set to true, then the requester will be granted access if
58
+ * the file ID parameter refers to a shared drive and the requester is an
59
+ * administrator of the domain to which the shared drive belongs.
60
+ * @return Google_Service_Drive_Permission
61
+ */
62
+ public function create($fileId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Permission $postBody, $optParams = array())
63
+ {
64
+ $params = array('fileId' => $fileId, 'postBody' => $postBody);
65
+ $params = \array_merge($params, $optParams);
66
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Permission");
67
+ }
68
+ /**
69
+ * Deletes a permission. (permissions.delete)
70
+ *
71
+ * @param string $fileId The ID of the file or shared drive.
72
+ * @param string $permissionId The ID of the permission.
73
+ * @param array $optParams Optional parameters.
74
+ *
75
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
76
+ * both My Drives and shared drives.
77
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
78
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
79
+ * administrator; if set to true, then the requester will be granted access if
80
+ * the file ID parameter refers to a shared drive and the requester is an
81
+ * administrator of the domain to which the shared drive belongs.
82
+ */
83
+ public function delete($fileId, $permissionId, $optParams = array())
84
+ {
85
+ $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
86
+ $params = \array_merge($params, $optParams);
87
+ return $this->call('delete', array($params));
88
+ }
89
+ /**
90
+ * Gets a permission by ID. (permissions.get)
91
+ *
92
+ * @param string $fileId The ID of the file.
93
+ * @param string $permissionId The ID of the permission.
94
+ * @param array $optParams Optional parameters.
95
+ *
96
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
97
+ * both My Drives and shared drives.
98
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
99
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
100
+ * administrator; if set to true, then the requester will be granted access if
101
+ * the file ID parameter refers to a shared drive and the requester is an
102
+ * administrator of the domain to which the shared drive belongs.
103
+ * @return Google_Service_Drive_Permission
104
+ */
105
+ public function get($fileId, $permissionId, $optParams = array())
106
+ {
107
+ $params = array('fileId' => $fileId, 'permissionId' => $permissionId);
108
+ $params = \array_merge($params, $optParams);
109
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Permission");
110
+ }
111
+ /**
112
+ * Lists a file's or shared drive's permissions. (permissions.listPermissions)
113
+ *
114
+ * @param string $fileId The ID of the file or shared drive.
115
+ * @param array $optParams Optional parameters.
116
+ *
117
+ * @opt_param string includePermissionsForView Specifies which additional view's
118
+ * permissions to include in the response. Only 'published' is supported.
119
+ * @opt_param int pageSize The maximum number of permissions to return per page.
120
+ * When not set for files in a shared drive, at most 100 results will be
121
+ * returned. When not set for files that are not in a shared drive, the entire
122
+ * list will be returned.
123
+ * @opt_param string pageToken The token for continuing a previous list request
124
+ * on the next page. This should be set to the value of 'nextPageToken' from the
125
+ * previous response.
126
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
127
+ * both My Drives and shared drives.
128
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
129
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
130
+ * administrator; if set to true, then the requester will be granted access if
131
+ * the file ID parameter refers to a shared drive and the requester is an
132
+ * administrator of the domain to which the shared drive belongs.
133
+ * @return Google_Service_Drive_PermissionList
134
+ */
135
+ public function listPermissions($fileId, $optParams = array())
136
+ {
137
+ $params = array('fileId' => $fileId);
138
+ $params = \array_merge($params, $optParams);
139
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_PermissionList");
140
+ }
141
+ /**
142
+ * Updates a permission with patch semantics. (permissions.update)
143
+ *
144
+ * @param string $fileId The ID of the file or shared drive.
145
+ * @param string $permissionId The ID of the permission.
146
+ * @param Google_Service_Drive_Permission $postBody
147
+ * @param array $optParams Optional parameters.
148
+ *
149
+ * @opt_param bool removeExpiration Whether to remove the expiration date.
150
+ * @opt_param bool supportsAllDrives Whether the requesting application supports
151
+ * both My Drives and shared drives.
152
+ * @opt_param bool supportsTeamDrives Deprecated use supportsAllDrives instead.
153
+ * @opt_param bool transferOwnership Whether to transfer ownership to the
154
+ * specified user and downgrade the current owner to a writer. This parameter is
155
+ * required as an acknowledgement of the side effect.
156
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
157
+ * administrator; if set to true, then the requester will be granted access if
158
+ * the file ID parameter refers to a shared drive and the requester is an
159
+ * administrator of the domain to which the shared drive belongs.
160
+ * @return Google_Service_Drive_Permission
161
+ */
162
+ public function update($fileId, $permissionId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Permission $postBody, $optParams = array())
163
+ {
164
+ $params = array('fileId' => $fileId, 'permissionId' => $permissionId, 'postBody' => $postBody);
165
+ $params = \array_merge($params, $optParams);
166
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Permission");
167
+ }
168
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Replies.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "replies" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $replies = $driveService->replies;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Replies extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Creates a new reply to a comment. (replies.create)
32
+ *
33
+ * @param string $fileId The ID of the file.
34
+ * @param string $commentId The ID of the comment.
35
+ * @param Google_Service_Drive_Reply $postBody
36
+ * @param array $optParams Optional parameters.
37
+ * @return Google_Service_Drive_Reply
38
+ */
39
+ public function create($fileId, $commentId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Reply $postBody, $optParams = array())
40
+ {
41
+ $params = array('fileId' => $fileId, 'commentId' => $commentId, 'postBody' => $postBody);
42
+ $params = \array_merge($params, $optParams);
43
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Reply");
44
+ }
45
+ /**
46
+ * Deletes a reply. (replies.delete)
47
+ *
48
+ * @param string $fileId The ID of the file.
49
+ * @param string $commentId The ID of the comment.
50
+ * @param string $replyId The ID of the reply.
51
+ * @param array $optParams Optional parameters.
52
+ */
53
+ public function delete($fileId, $commentId, $replyId, $optParams = array())
54
+ {
55
+ $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId);
56
+ $params = \array_merge($params, $optParams);
57
+ return $this->call('delete', array($params));
58
+ }
59
+ /**
60
+ * Gets a reply by ID. (replies.get)
61
+ *
62
+ * @param string $fileId The ID of the file.
63
+ * @param string $commentId The ID of the comment.
64
+ * @param string $replyId The ID of the reply.
65
+ * @param array $optParams Optional parameters.
66
+ *
67
+ * @opt_param bool includeDeleted Whether to return deleted replies. Deleted
68
+ * replies will not include their original content.
69
+ * @return Google_Service_Drive_Reply
70
+ */
71
+ public function get($fileId, $commentId, $replyId, $optParams = array())
72
+ {
73
+ $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId);
74
+ $params = \array_merge($params, $optParams);
75
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Reply");
76
+ }
77
+ /**
78
+ * Lists a comment's replies. (replies.listReplies)
79
+ *
80
+ * @param string $fileId The ID of the file.
81
+ * @param string $commentId The ID of the comment.
82
+ * @param array $optParams Optional parameters.
83
+ *
84
+ * @opt_param bool includeDeleted Whether to include deleted replies. Deleted
85
+ * replies will not include their original content.
86
+ * @opt_param int pageSize The maximum number of replies to return per page.
87
+ * @opt_param string pageToken The token for continuing a previous list request
88
+ * on the next page. This should be set to the value of 'nextPageToken' from the
89
+ * previous response.
90
+ * @return Google_Service_Drive_ReplyList
91
+ */
92
+ public function listReplies($fileId, $commentId, $optParams = array())
93
+ {
94
+ $params = array('fileId' => $fileId, 'commentId' => $commentId);
95
+ $params = \array_merge($params, $optParams);
96
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_ReplyList");
97
+ }
98
+ /**
99
+ * Updates a reply with patch semantics. (replies.update)
100
+ *
101
+ * @param string $fileId The ID of the file.
102
+ * @param string $commentId The ID of the comment.
103
+ * @param string $replyId The ID of the reply.
104
+ * @param Google_Service_Drive_Reply $postBody
105
+ * @param array $optParams Optional parameters.
106
+ * @return Google_Service_Drive_Reply
107
+ */
108
+ public function update($fileId, $commentId, $replyId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Reply $postBody, $optParams = array())
109
+ {
110
+ $params = array('fileId' => $fileId, 'commentId' => $commentId, 'replyId' => $replyId, 'postBody' => $postBody);
111
+ $params = \array_merge($params, $optParams);
112
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Reply");
113
+ }
114
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Revisions.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "revisions" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $revisions = $driveService->revisions;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Revisions extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Permanently deletes a file version. You can only delete revisions for files
32
+ * with binary content in Google Drive, like images or videos. Revisions for
33
+ * other files, like Google Docs or Sheets, and the last remaining file version
34
+ * can't be deleted. (revisions.delete)
35
+ *
36
+ * @param string $fileId The ID of the file.
37
+ * @param string $revisionId The ID of the revision.
38
+ * @param array $optParams Optional parameters.
39
+ */
40
+ public function delete($fileId, $revisionId, $optParams = array())
41
+ {
42
+ $params = array('fileId' => $fileId, 'revisionId' => $revisionId);
43
+ $params = \array_merge($params, $optParams);
44
+ return $this->call('delete', array($params));
45
+ }
46
+ /**
47
+ * Gets a revision's metadata or content by ID. (revisions.get)
48
+ *
49
+ * @param string $fileId The ID of the file.
50
+ * @param string $revisionId The ID of the revision.
51
+ * @param array $optParams Optional parameters.
52
+ *
53
+ * @opt_param bool acknowledgeAbuse Whether the user is acknowledging the risk
54
+ * of downloading known malware or other abusive files. This is only applicable
55
+ * when alt=media.
56
+ * @return Google_Service_Drive_Revision
57
+ */
58
+ public function get($fileId, $revisionId, $optParams = array())
59
+ {
60
+ $params = array('fileId' => $fileId, 'revisionId' => $revisionId);
61
+ $params = \array_merge($params, $optParams);
62
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Revision");
63
+ }
64
+ /**
65
+ * Lists a file's revisions. (revisions.listRevisions)
66
+ *
67
+ * @param string $fileId The ID of the file.
68
+ * @param array $optParams Optional parameters.
69
+ *
70
+ * @opt_param int pageSize The maximum number of revisions to return per page.
71
+ * @opt_param string pageToken The token for continuing a previous list request
72
+ * on the next page. This should be set to the value of 'nextPageToken' from the
73
+ * previous response.
74
+ * @return Google_Service_Drive_RevisionList
75
+ */
76
+ public function listRevisions($fileId, $optParams = array())
77
+ {
78
+ $params = array('fileId' => $fileId);
79
+ $params = \array_merge($params, $optParams);
80
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_RevisionList");
81
+ }
82
+ /**
83
+ * Updates a revision with patch semantics. (revisions.update)
84
+ *
85
+ * @param string $fileId The ID of the file.
86
+ * @param string $revisionId The ID of the revision.
87
+ * @param Google_Service_Drive_Revision $postBody
88
+ * @param array $optParams Optional parameters.
89
+ * @return Google_Service_Drive_Revision
90
+ */
91
+ public function update($fileId, $revisionId, \SimpleCalendar\plugin_deps\Google_Service_Drive_Revision $postBody, $optParams = array())
92
+ {
93
+ $params = array('fileId' => $fileId, 'revisionId' => $revisionId, 'postBody' => $postBody);
94
+ $params = \array_merge($params, $optParams);
95
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_Revision");
96
+ }
97
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Resource/Teamdrives.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ /**
21
+ * The "teamdrives" collection of methods.
22
+ * Typical usage is:
23
+ * <code>
24
+ * $driveService = new Google_Service_Drive(...);
25
+ * $teamdrives = $driveService->teamdrives;
26
+ * </code>
27
+ */
28
+ class Google_Service_Drive_Resource_Teamdrives extends \SimpleCalendar\plugin_deps\Google_Service_Resource
29
+ {
30
+ /**
31
+ * Deprecated use drives.create instead. (teamdrives.create)
32
+ *
33
+ * @param string $requestId An ID, such as a random UUID, which uniquely
34
+ * identifies this user's request for idempotent creation of a Team Drive. A
35
+ * repeated request by the same user and with the same request ID will avoid
36
+ * creating duplicates by attempting to create the same Team Drive. If the Team
37
+ * Drive already exists a 409 error will be returned.
38
+ * @param Google_Service_Drive_TeamDrive $postBody
39
+ * @param array $optParams Optional parameters.
40
+ * @return Google_Service_Drive_TeamDrive
41
+ */
42
+ public function create($requestId, \SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive $postBody, $optParams = array())
43
+ {
44
+ $params = array('requestId' => $requestId, 'postBody' => $postBody);
45
+ $params = \array_merge($params, $optParams);
46
+ return $this->call('create', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive");
47
+ }
48
+ /**
49
+ * Deprecated use drives.delete instead. (teamdrives.delete)
50
+ *
51
+ * @param string $teamDriveId The ID of the Team Drive
52
+ * @param array $optParams Optional parameters.
53
+ */
54
+ public function delete($teamDriveId, $optParams = array())
55
+ {
56
+ $params = array('teamDriveId' => $teamDriveId);
57
+ $params = \array_merge($params, $optParams);
58
+ return $this->call('delete', array($params));
59
+ }
60
+ /**
61
+ * Deprecated use drives.get instead. (teamdrives.get)
62
+ *
63
+ * @param string $teamDriveId The ID of the Team Drive
64
+ * @param array $optParams Optional parameters.
65
+ *
66
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
67
+ * administrator; if set to true, then the requester will be granted access if
68
+ * they are an administrator of the domain to which the Team Drive belongs.
69
+ * @return Google_Service_Drive_TeamDrive
70
+ */
71
+ public function get($teamDriveId, $optParams = array())
72
+ {
73
+ $params = array('teamDriveId' => $teamDriveId);
74
+ $params = \array_merge($params, $optParams);
75
+ return $this->call('get', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive");
76
+ }
77
+ /**
78
+ * Deprecated use drives.list instead. (teamdrives.listTeamdrives)
79
+ *
80
+ * @param array $optParams Optional parameters.
81
+ *
82
+ * @opt_param int pageSize Maximum number of Team Drives to return.
83
+ * @opt_param string pageToken Page token for Team Drives.
84
+ * @opt_param string q Query string for searching Team Drives.
85
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
86
+ * administrator; if set to true, then all Team Drives of the domain in which
87
+ * the requester is an administrator are returned.
88
+ * @return Google_Service_Drive_TeamDriveList
89
+ */
90
+ public function listTeamdrives($optParams = array())
91
+ {
92
+ $params = array();
93
+ $params = \array_merge($params, $optParams);
94
+ return $this->call('list', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveList");
95
+ }
96
+ /**
97
+ * Deprecated use drives.update instead (teamdrives.update)
98
+ *
99
+ * @param string $teamDriveId The ID of the Team Drive
100
+ * @param Google_Service_Drive_TeamDrive $postBody
101
+ * @param array $optParams Optional parameters.
102
+ *
103
+ * @opt_param bool useDomainAdminAccess Issue the request as a domain
104
+ * administrator; if set to true, then the requester will be granted access if
105
+ * they are an administrator of the domain to which the Team Drive belongs.
106
+ * @return Google_Service_Drive_TeamDrive
107
+ */
108
+ public function update($teamDriveId, \SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive $postBody, $optParams = array())
109
+ {
110
+ $params = array('teamDriveId' => $teamDriveId, 'postBody' => $postBody);
111
+ $params = \array_merge($params, $optParams);
112
+ return $this->call('update', array($params), "SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive");
113
+ }
114
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/Revision.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_Revision extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $exportLinks;
23
+ public $id;
24
+ public $keepForever;
25
+ public $kind;
26
+ protected $lastModifyingUserType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_User';
27
+ protected $lastModifyingUserDataType = '';
28
+ public $md5Checksum;
29
+ public $mimeType;
30
+ public $modifiedTime;
31
+ public $originalFilename;
32
+ public $publishAuto;
33
+ public $published;
34
+ public $publishedLink;
35
+ public $publishedOutsideDomain;
36
+ public $size;
37
+ public function setExportLinks($exportLinks)
38
+ {
39
+ $this->exportLinks = $exportLinks;
40
+ }
41
+ public function getExportLinks()
42
+ {
43
+ return $this->exportLinks;
44
+ }
45
+ public function setId($id)
46
+ {
47
+ $this->id = $id;
48
+ }
49
+ public function getId()
50
+ {
51
+ return $this->id;
52
+ }
53
+ public function setKeepForever($keepForever)
54
+ {
55
+ $this->keepForever = $keepForever;
56
+ }
57
+ public function getKeepForever()
58
+ {
59
+ return $this->keepForever;
60
+ }
61
+ public function setKind($kind)
62
+ {
63
+ $this->kind = $kind;
64
+ }
65
+ public function getKind()
66
+ {
67
+ return $this->kind;
68
+ }
69
+ /**
70
+ * @param Google_Service_Drive_User
71
+ */
72
+ public function setLastModifyingUser(\SimpleCalendar\plugin_deps\Google_Service_Drive_User $lastModifyingUser)
73
+ {
74
+ $this->lastModifyingUser = $lastModifyingUser;
75
+ }
76
+ /**
77
+ * @return Google_Service_Drive_User
78
+ */
79
+ public function getLastModifyingUser()
80
+ {
81
+ return $this->lastModifyingUser;
82
+ }
83
+ public function setMd5Checksum($md5Checksum)
84
+ {
85
+ $this->md5Checksum = $md5Checksum;
86
+ }
87
+ public function getMd5Checksum()
88
+ {
89
+ return $this->md5Checksum;
90
+ }
91
+ public function setMimeType($mimeType)
92
+ {
93
+ $this->mimeType = $mimeType;
94
+ }
95
+ public function getMimeType()
96
+ {
97
+ return $this->mimeType;
98
+ }
99
+ public function setModifiedTime($modifiedTime)
100
+ {
101
+ $this->modifiedTime = $modifiedTime;
102
+ }
103
+ public function getModifiedTime()
104
+ {
105
+ return $this->modifiedTime;
106
+ }
107
+ public function setOriginalFilename($originalFilename)
108
+ {
109
+ $this->originalFilename = $originalFilename;
110
+ }
111
+ public function getOriginalFilename()
112
+ {
113
+ return $this->originalFilename;
114
+ }
115
+ public function setPublishAuto($publishAuto)
116
+ {
117
+ $this->publishAuto = $publishAuto;
118
+ }
119
+ public function getPublishAuto()
120
+ {
121
+ return $this->publishAuto;
122
+ }
123
+ public function setPublished($published)
124
+ {
125
+ $this->published = $published;
126
+ }
127
+ public function getPublished()
128
+ {
129
+ return $this->published;
130
+ }
131
+ public function setPublishedLink($publishedLink)
132
+ {
133
+ $this->publishedLink = $publishedLink;
134
+ }
135
+ public function getPublishedLink()
136
+ {
137
+ return $this->publishedLink;
138
+ }
139
+ public function setPublishedOutsideDomain($publishedOutsideDomain)
140
+ {
141
+ $this->publishedOutsideDomain = $publishedOutsideDomain;
142
+ }
143
+ public function getPublishedOutsideDomain()
144
+ {
145
+ return $this->publishedOutsideDomain;
146
+ }
147
+ public function setSize($size)
148
+ {
149
+ $this->size = $size;
150
+ }
151
+ public function getSize()
152
+ {
153
+ return $this->size;
154
+ }
155
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/RevisionList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_RevisionList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'revisions';
23
+ public $kind;
24
+ public $nextPageToken;
25
+ protected $revisionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_Revision';
26
+ protected $revisionsDataType = 'array';
27
+ public function setKind($kind)
28
+ {
29
+ $this->kind = $kind;
30
+ }
31
+ public function getKind()
32
+ {
33
+ return $this->kind;
34
+ }
35
+ public function setNextPageToken($nextPageToken)
36
+ {
37
+ $this->nextPageToken = $nextPageToken;
38
+ }
39
+ public function getNextPageToken()
40
+ {
41
+ return $this->nextPageToken;
42
+ }
43
+ /**
44
+ * @param Google_Service_Drive_Revision[]
45
+ */
46
+ public function setRevisions($revisions)
47
+ {
48
+ $this->revisions = $revisions;
49
+ }
50
+ /**
51
+ * @return Google_Service_Drive_Revision[]
52
+ */
53
+ public function getRevisions()
54
+ {
55
+ return $this->revisions;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/StartPageToken.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_StartPageToken extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $kind;
23
+ public $startPageToken;
24
+ public function setKind($kind)
25
+ {
26
+ $this->kind = $kind;
27
+ }
28
+ public function getKind()
29
+ {
30
+ return $this->kind;
31
+ }
32
+ public function setStartPageToken($startPageToken)
33
+ {
34
+ $this->startPageToken = $startPageToken;
35
+ }
36
+ public function getStartPageToken()
37
+ {
38
+ return $this->startPageToken;
39
+ }
40
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/TeamDrive.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_TeamDrive extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ protected $backgroundImageFileType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveBackgroundImageFile';
23
+ protected $backgroundImageFileDataType = '';
24
+ public $backgroundImageLink;
25
+ protected $capabilitiesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveCapabilities';
26
+ protected $capabilitiesDataType = '';
27
+ public $colorRgb;
28
+ public $createdTime;
29
+ public $id;
30
+ public $kind;
31
+ public $name;
32
+ protected $restrictionsType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveRestrictions';
33
+ protected $restrictionsDataType = '';
34
+ public $themeId;
35
+ /**
36
+ * @param Google_Service_Drive_TeamDriveBackgroundImageFile
37
+ */
38
+ public function setBackgroundImageFile(\SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveBackgroundImageFile $backgroundImageFile)
39
+ {
40
+ $this->backgroundImageFile = $backgroundImageFile;
41
+ }
42
+ /**
43
+ * @return Google_Service_Drive_TeamDriveBackgroundImageFile
44
+ */
45
+ public function getBackgroundImageFile()
46
+ {
47
+ return $this->backgroundImageFile;
48
+ }
49
+ public function setBackgroundImageLink($backgroundImageLink)
50
+ {
51
+ $this->backgroundImageLink = $backgroundImageLink;
52
+ }
53
+ public function getBackgroundImageLink()
54
+ {
55
+ return $this->backgroundImageLink;
56
+ }
57
+ /**
58
+ * @param Google_Service_Drive_TeamDriveCapabilities
59
+ */
60
+ public function setCapabilities(\SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveCapabilities $capabilities)
61
+ {
62
+ $this->capabilities = $capabilities;
63
+ }
64
+ /**
65
+ * @return Google_Service_Drive_TeamDriveCapabilities
66
+ */
67
+ public function getCapabilities()
68
+ {
69
+ return $this->capabilities;
70
+ }
71
+ public function setColorRgb($colorRgb)
72
+ {
73
+ $this->colorRgb = $colorRgb;
74
+ }
75
+ public function getColorRgb()
76
+ {
77
+ return $this->colorRgb;
78
+ }
79
+ public function setCreatedTime($createdTime)
80
+ {
81
+ $this->createdTime = $createdTime;
82
+ }
83
+ public function getCreatedTime()
84
+ {
85
+ return $this->createdTime;
86
+ }
87
+ public function setId($id)
88
+ {
89
+ $this->id = $id;
90
+ }
91
+ public function getId()
92
+ {
93
+ return $this->id;
94
+ }
95
+ public function setKind($kind)
96
+ {
97
+ $this->kind = $kind;
98
+ }
99
+ public function getKind()
100
+ {
101
+ return $this->kind;
102
+ }
103
+ public function setName($name)
104
+ {
105
+ $this->name = $name;
106
+ }
107
+ public function getName()
108
+ {
109
+ return $this->name;
110
+ }
111
+ /**
112
+ * @param Google_Service_Drive_TeamDriveRestrictions
113
+ */
114
+ public function setRestrictions(\SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDriveRestrictions $restrictions)
115
+ {
116
+ $this->restrictions = $restrictions;
117
+ }
118
+ /**
119
+ * @return Google_Service_Drive_TeamDriveRestrictions
120
+ */
121
+ public function getRestrictions()
122
+ {
123
+ return $this->restrictions;
124
+ }
125
+ public function setThemeId($themeId)
126
+ {
127
+ $this->themeId = $themeId;
128
+ }
129
+ public function getThemeId()
130
+ {
131
+ return $this->themeId;
132
+ }
133
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveBackgroundImageFile.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_TeamDriveBackgroundImageFile extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $id;
23
+ public $width;
24
+ public $xCoordinate;
25
+ public $yCoordinate;
26
+ public function setId($id)
27
+ {
28
+ $this->id = $id;
29
+ }
30
+ public function getId()
31
+ {
32
+ return $this->id;
33
+ }
34
+ public function setWidth($width)
35
+ {
36
+ $this->width = $width;
37
+ }
38
+ public function getWidth()
39
+ {
40
+ return $this->width;
41
+ }
42
+ public function setXCoordinate($xCoordinate)
43
+ {
44
+ $this->xCoordinate = $xCoordinate;
45
+ }
46
+ public function getXCoordinate()
47
+ {
48
+ return $this->xCoordinate;
49
+ }
50
+ public function setYCoordinate($yCoordinate)
51
+ {
52
+ $this->yCoordinate = $yCoordinate;
53
+ }
54
+ public function getYCoordinate()
55
+ {
56
+ return $this->yCoordinate;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveCapabilities.php ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_TeamDriveCapabilities extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $canAddChildren;
23
+ public $canChangeCopyRequiresWriterPermissionRestriction;
24
+ public $canChangeDomainUsersOnlyRestriction;
25
+ public $canChangeTeamDriveBackground;
26
+ public $canChangeTeamMembersOnlyRestriction;
27
+ public $canComment;
28
+ public $canCopy;
29
+ public $canDeleteChildren;
30
+ public $canDeleteTeamDrive;
31
+ public $canDownload;
32
+ public $canEdit;
33
+ public $canListChildren;
34
+ public $canManageMembers;
35
+ public $canReadRevisions;
36
+ public $canRemoveChildren;
37
+ public $canRename;
38
+ public $canRenameTeamDrive;
39
+ public $canShare;
40
+ public $canTrashChildren;
41
+ public function setCanAddChildren($canAddChildren)
42
+ {
43
+ $this->canAddChildren = $canAddChildren;
44
+ }
45
+ public function getCanAddChildren()
46
+ {
47
+ return $this->canAddChildren;
48
+ }
49
+ public function setCanChangeCopyRequiresWriterPermissionRestriction($canChangeCopyRequiresWriterPermissionRestriction)
50
+ {
51
+ $this->canChangeCopyRequiresWriterPermissionRestriction = $canChangeCopyRequiresWriterPermissionRestriction;
52
+ }
53
+ public function getCanChangeCopyRequiresWriterPermissionRestriction()
54
+ {
55
+ return $this->canChangeCopyRequiresWriterPermissionRestriction;
56
+ }
57
+ public function setCanChangeDomainUsersOnlyRestriction($canChangeDomainUsersOnlyRestriction)
58
+ {
59
+ $this->canChangeDomainUsersOnlyRestriction = $canChangeDomainUsersOnlyRestriction;
60
+ }
61
+ public function getCanChangeDomainUsersOnlyRestriction()
62
+ {
63
+ return $this->canChangeDomainUsersOnlyRestriction;
64
+ }
65
+ public function setCanChangeTeamDriveBackground($canChangeTeamDriveBackground)
66
+ {
67
+ $this->canChangeTeamDriveBackground = $canChangeTeamDriveBackground;
68
+ }
69
+ public function getCanChangeTeamDriveBackground()
70
+ {
71
+ return $this->canChangeTeamDriveBackground;
72
+ }
73
+ public function setCanChangeTeamMembersOnlyRestriction($canChangeTeamMembersOnlyRestriction)
74
+ {
75
+ $this->canChangeTeamMembersOnlyRestriction = $canChangeTeamMembersOnlyRestriction;
76
+ }
77
+ public function getCanChangeTeamMembersOnlyRestriction()
78
+ {
79
+ return $this->canChangeTeamMembersOnlyRestriction;
80
+ }
81
+ public function setCanComment($canComment)
82
+ {
83
+ $this->canComment = $canComment;
84
+ }
85
+ public function getCanComment()
86
+ {
87
+ return $this->canComment;
88
+ }
89
+ public function setCanCopy($canCopy)
90
+ {
91
+ $this->canCopy = $canCopy;
92
+ }
93
+ public function getCanCopy()
94
+ {
95
+ return $this->canCopy;
96
+ }
97
+ public function setCanDeleteChildren($canDeleteChildren)
98
+ {
99
+ $this->canDeleteChildren = $canDeleteChildren;
100
+ }
101
+ public function getCanDeleteChildren()
102
+ {
103
+ return $this->canDeleteChildren;
104
+ }
105
+ public function setCanDeleteTeamDrive($canDeleteTeamDrive)
106
+ {
107
+ $this->canDeleteTeamDrive = $canDeleteTeamDrive;
108
+ }
109
+ public function getCanDeleteTeamDrive()
110
+ {
111
+ return $this->canDeleteTeamDrive;
112
+ }
113
+ public function setCanDownload($canDownload)
114
+ {
115
+ $this->canDownload = $canDownload;
116
+ }
117
+ public function getCanDownload()
118
+ {
119
+ return $this->canDownload;
120
+ }
121
+ public function setCanEdit($canEdit)
122
+ {
123
+ $this->canEdit = $canEdit;
124
+ }
125
+ public function getCanEdit()
126
+ {
127
+ return $this->canEdit;
128
+ }
129
+ public function setCanListChildren($canListChildren)
130
+ {
131
+ $this->canListChildren = $canListChildren;
132
+ }
133
+ public function getCanListChildren()
134
+ {
135
+ return $this->canListChildren;
136
+ }
137
+ public function setCanManageMembers($canManageMembers)
138
+ {
139
+ $this->canManageMembers = $canManageMembers;
140
+ }
141
+ public function getCanManageMembers()
142
+ {
143
+ return $this->canManageMembers;
144
+ }
145
+ public function setCanReadRevisions($canReadRevisions)
146
+ {
147
+ $this->canReadRevisions = $canReadRevisions;
148
+ }
149
+ public function getCanReadRevisions()
150
+ {
151
+ return $this->canReadRevisions;
152
+ }
153
+ public function setCanRemoveChildren($canRemoveChildren)
154
+ {
155
+ $this->canRemoveChildren = $canRemoveChildren;
156
+ }
157
+ public function getCanRemoveChildren()
158
+ {
159
+ return $this->canRemoveChildren;
160
+ }
161
+ public function setCanRename($canRename)
162
+ {
163
+ $this->canRename = $canRename;
164
+ }
165
+ public function getCanRename()
166
+ {
167
+ return $this->canRename;
168
+ }
169
+ public function setCanRenameTeamDrive($canRenameTeamDrive)
170
+ {
171
+ $this->canRenameTeamDrive = $canRenameTeamDrive;
172
+ }
173
+ public function getCanRenameTeamDrive()
174
+ {
175
+ return $this->canRenameTeamDrive;
176
+ }
177
+ public function setCanShare($canShare)
178
+ {
179
+ $this->canShare = $canShare;
180
+ }
181
+ public function getCanShare()
182
+ {
183
+ return $this->canShare;
184
+ }
185
+ public function setCanTrashChildren($canTrashChildren)
186
+ {
187
+ $this->canTrashChildren = $canTrashChildren;
188
+ }
189
+ public function getCanTrashChildren()
190
+ {
191
+ return $this->canTrashChildren;
192
+ }
193
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveList.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_TeamDriveList extends \SimpleCalendar\plugin_deps\Google_Collection
21
+ {
22
+ protected $collection_key = 'teamDrives';
23
+ public $kind;
24
+ public $nextPageToken;
25
+ protected $teamDrivesType = 'SimpleCalendar\plugin_deps\Google_Service_Drive_TeamDrive';
26
+ protected $teamDrivesDataType = 'array';
27
+ public function setKind($kind)
28
+ {
29
+ $this->kind = $kind;
30
+ }
31
+ public function getKind()
32
+ {
33
+ return $this->kind;
34
+ }
35
+ public function setNextPageToken($nextPageToken)
36
+ {
37
+ $this->nextPageToken = $nextPageToken;
38
+ }
39
+ public function getNextPageToken()
40
+ {
41
+ return $this->nextPageToken;
42
+ }
43
+ /**
44
+ * @param Google_Service_Drive_TeamDrive[]
45
+ */
46
+ public function setTeamDrives($teamDrives)
47
+ {
48
+ $this->teamDrives = $teamDrives;
49
+ }
50
+ /**
51
+ * @return Google_Service_Drive_TeamDrive[]
52
+ */
53
+ public function getTeamDrives()
54
+ {
55
+ return $this->teamDrives;
56
+ }
57
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/TeamDriveRestrictions.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_TeamDriveRestrictions extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $adminManagedRestrictions;
23
+ public $copyRequiresWriterPermission;
24
+ public $domainUsersOnly;
25
+ public $teamMembersOnly;
26
+ public function setAdminManagedRestrictions($adminManagedRestrictions)
27
+ {
28
+ $this->adminManagedRestrictions = $adminManagedRestrictions;
29
+ }
30
+ public function getAdminManagedRestrictions()
31
+ {
32
+ return $this->adminManagedRestrictions;
33
+ }
34
+ public function setCopyRequiresWriterPermission($copyRequiresWriterPermission)
35
+ {
36
+ $this->copyRequiresWriterPermission = $copyRequiresWriterPermission;
37
+ }
38
+ public function getCopyRequiresWriterPermission()
39
+ {
40
+ return $this->copyRequiresWriterPermission;
41
+ }
42
+ public function setDomainUsersOnly($domainUsersOnly)
43
+ {
44
+ $this->domainUsersOnly = $domainUsersOnly;
45
+ }
46
+ public function getDomainUsersOnly()
47
+ {
48
+ return $this->domainUsersOnly;
49
+ }
50
+ public function setTeamMembersOnly($teamMembersOnly)
51
+ {
52
+ $this->teamMembersOnly = $teamMembersOnly;
53
+ }
54
+ public function getTeamMembersOnly()
55
+ {
56
+ return $this->teamMembersOnly;
57
+ }
58
+ }
third-party/google/apiclient-services/src/Google/Service/Drive/User.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
9
+ * use this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
+ * License for the specific language governing permissions and limitations under
18
+ * the License.
19
+ */
20
+ class Google_Service_Drive_User extends \SimpleCalendar\plugin_deps\Google_Model
21
+ {
22
+ public $displayName;
23
+ public $emailAddress;
24
+ public $kind;
25
+ public $me;
26
+ public $permissionId;
27
+ public $photoLink;
28
+ public function setDisplayName($displayName)
29
+ {
30
+ $this->displayName = $displayName;
31
+ }
32
+ public function getDisplayName()
33
+ {
34
+ return $this->displayName;
35
+ }
36
+ public function setEmailAddress($emailAddress)
37
+ {
38
+ $this->emailAddress = $emailAddress;
39
+ }
40
+ public function getEmailAddress()
41
+ {
42
+ return $this->emailAddress;
43
+ }
44
+ public function setKind($kind)
45
+ {
46
+ $this->kind = $kind;
47
+ }
48
+ public function getKind()
49
+ {
50
+ return $this->kind;
51
+ }
52
+ public function setMe($me)
53
+ {
54
+ $this->me = $me;
55
+ }
56
+ public function getMe()
57
+ {
58
+ return $this->me;
59
+ }
60
+ public function setPermissionId($permissionId)
61
+ {
62
+ $this->permissionId = $permissionId;
63
+ }
64
+ public function getPermissionId()
65
+ {
66
+ return $this->permissionId;
67
+ }
68
+ public function setPhotoLink($photoLink)
69
+ {
70
+ $this->photoLink = $photoLink;
71
+ }
72
+ public function getPhotoLink()
73
+ {
74
+ return $this->photoLink;
75
+ }
76
+ }
third-party/google/apiclient/src/AccessToken/Revoke.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2008 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\AccessToken;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
21
+ use SimpleCalendar\plugin_deps\Google\Client;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
25
+ /**
26
+ * Wrapper around Google Access Tokens which provides convenience functions
27
+ *
28
+ */
29
+ class Revoke
30
+ {
31
+ /**
32
+ * @var ClientInterface The http client
33
+ */
34
+ private $http;
35
+ /**
36
+ * Instantiates the class, but does not initiate the login flow, leaving it
37
+ * to the discretion of the caller.
38
+ */
39
+ public function __construct(ClientInterface $http = null)
40
+ {
41
+ $this->http = $http;
42
+ }
43
+ /**
44
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
45
+ * token, if a token isn't provided.
46
+ *
47
+ * @param string|array $token The token (access token or a refresh token) that should be revoked.
48
+ * @return boolean Returns True if the revocation was successful, otherwise False.
49
+ */
50
+ public function revokeToken($token)
51
+ {
52
+ if (\is_array($token)) {
53
+ if (isset($token['refresh_token'])) {
54
+ $token = $token['refresh_token'];
55
+ } else {
56
+ $token = $token['access_token'];
57
+ }
58
+ }
59
+ $body = Psr7\stream_for(\http_build_query(array('token' => $token)));
60
+ $request = new Request('POST', Client::OAUTH2_REVOKE_URI, ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'], $body);
61
+ $httpHandler = HttpHandlerFactory::build($this->http);
62
+ $response = $httpHandler($request);
63
+ return $response->getStatusCode() == 200;
64
+ }
65
+ }
third-party/google/apiclient/src/AccessToken/Verify.php ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2008 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\AccessToken;
19
+
20
+ use SimpleCalendar\plugin_deps\Firebase\JWT\ExpiredException as ExpiredExceptionV3;
21
+ use SimpleCalendar\plugin_deps\Firebase\JWT\SignatureInvalidException;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
24
+ use SimpleCalendar\plugin_deps\phpseclib3\Crypt\PublicKeyLoader;
25
+ use SimpleCalendar\plugin_deps\phpseclib3\Crypt\RSA\PublicKey;
26
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
27
+ use SimpleCalendar\plugin_deps\Google\Auth\Cache\MemoryCacheItemPool;
28
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
29
+ use SimpleCalendar\plugin_deps\Stash\Driver\FileSystem;
30
+ use SimpleCalendar\plugin_deps\Stash\Pool;
31
+ use DateTime;
32
+ use DomainException;
33
+ use Exception;
34
+ use SimpleCalendar\plugin_deps\ExpiredException;
35
+ // Firebase v2
36
+ use LogicException;
37
+ /**
38
+ * Wrapper around Google Access Tokens which provides convenience functions
39
+ *
40
+ */
41
+ class Verify
42
+ {
43
+ const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs';
44
+ const OAUTH2_ISSUER = 'accounts.google.com';
45
+ const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com';
46
+ /**
47
+ * @var ClientInterface The http client
48
+ */
49
+ private $http;
50
+ /**
51
+ * @var CacheItemPoolInterface cache class
52
+ */
53
+ private $cache;
54
+ /**
55
+ * Instantiates the class, but does not initiate the login flow, leaving it
56
+ * to the discretion of the caller.
57
+ */
58
+ public function __construct(ClientInterface $http = null, CacheItemPoolInterface $cache = null, $jwt = null)
59
+ {
60
+ if (null === $http) {
61
+ $http = new Client();
62
+ }
63
+ if (null === $cache) {
64
+ $cache = new MemoryCacheItemPool();
65
+ }
66
+ $this->http = $http;
67
+ $this->cache = $cache;
68
+ $this->jwt = $jwt ?: $this->getJwtService();
69
+ }
70
+ /**
71
+ * Verifies an id token and returns the authenticated apiLoginTicket.
72
+ * Throws an exception if the id token is not valid.
73
+ * The audience parameter can be used to control which id tokens are
74
+ * accepted. By default, the id token must have been issued to this OAuth2 client.
75
+ *
76
+ * @param string $idToken the ID token in JWT format
77
+ * @param string $audience Optional. The audience to verify against JWt "aud"
78
+ * @return array the token payload, if successful
79
+ */
80
+ public function verifyIdToken($idToken, $audience = null)
81
+ {
82
+ if (empty($idToken)) {
83
+ throw new LogicException('id_token cannot be null');
84
+ }
85
+ // set phpseclib constants if applicable
86
+ $this->setPhpsecConstants();
87
+ // Check signature
88
+ $certs = $this->getFederatedSignOnCerts();
89
+ foreach ($certs as $cert) {
90
+ try {
91
+ $payload = $this->jwt->decode($idToken, $this->getPublicKey($cert), array('RS256'));
92
+ if (\property_exists($payload, 'aud')) {
93
+ if ($audience && $payload->aud != $audience) {
94
+ return \false;
95
+ }
96
+ }
97
+ // support HTTP and HTTPS issuers
98
+ // @see https://developers.google.com/identity/sign-in/web/backend-auth
99
+ $issuers = array(self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS);
100
+ if (!isset($payload->iss) || !\in_array($payload->iss, $issuers)) {
101
+ return \false;
102
+ }
103
+ return (array) $payload;
104
+ } catch (ExpiredException $e) {
105
+ return \false;
106
+ } catch (ExpiredExceptionV3 $e) {
107
+ return \false;
108
+ } catch (SignatureInvalidException $e) {
109
+ // continue
110
+ } catch (DomainException $e) {
111
+ // continue
112
+ }
113
+ }
114
+ return \false;
115
+ }
116
+ private function getCache()
117
+ {
118
+ return $this->cache;
119
+ }
120
+ /**
121
+ * Retrieve and cache a certificates file.
122
+ *
123
+ * @param $url string location
124
+ * @throws \Google\Exception
125
+ * @return array certificates
126
+ */
127
+ private function retrieveCertsFromLocation($url)
128
+ {
129
+ // If we're retrieving a local file, just grab it.
130
+ if (0 !== \strpos($url, 'http')) {
131
+ if (!($file = \file_get_contents($url))) {
132
+ throw new GoogleException("Failed to retrieve verification certificates: '" . $url . "'.");
133
+ }
134
+ return \json_decode($file, \true);
135
+ }
136
+ $response = $this->http->get($url);
137
+ if ($response->getStatusCode() == 200) {
138
+ return \json_decode((string) $response->getBody(), \true);
139
+ }
140
+ throw new GoogleException(\sprintf('Failed to retrieve verification certificates: "%s".', $response->getBody()->getContents()), $response->getStatusCode());
141
+ }
142
+ // Gets federated sign-on certificates to use for verifying identity tokens.
143
+ // Returns certs as array structure, where keys are key ids, and values
144
+ // are PEM encoded certificates.
145
+ private function getFederatedSignOnCerts()
146
+ {
147
+ $certs = null;
148
+ if ($cache = $this->getCache()) {
149
+ $cacheItem = $cache->getItem('federated_signon_certs_v3');
150
+ $certs = $cacheItem->get();
151
+ }
152
+ if (!$certs) {
153
+ $certs = $this->retrieveCertsFromLocation(self::FEDERATED_SIGNON_CERT_URL);
154
+ if ($cache) {
155
+ $cacheItem->expiresAt(new DateTime('+1 hour'));
156
+ $cacheItem->set($certs);
157
+ $cache->save($cacheItem);
158
+ }
159
+ }
160
+ if (!isset($certs['keys'])) {
161
+ throw new \SimpleCalendar\plugin_deps\Google\AccessToken\InvalidArgumentException('federated sign-on certs expects "keys" to be set');
162
+ }
163
+ return $certs['keys'];
164
+ }
165
+ private function getJwtService()
166
+ {
167
+ $jwtClass = 'JWT';
168
+ if (\class_exists('SimpleCalendar\\plugin_deps\\Firebase\\JWT\\JWT')) {
169
+ $jwtClass = 'SimpleCalendar\\plugin_deps\\Firebase\\JWT\\JWT';
170
+ }
171
+ if (\property_exists($jwtClass, 'leeway') && $jwtClass::$leeway < 1) {
172
+ // Ensures JWT leeway is at least 1
173
+ // @see https://github.com/google/google-api-php-client/issues/827
174
+ $jwtClass::$leeway = 1;
175
+ }
176
+ return new $jwtClass();
177
+ }
178
+ private function getPublicKey($cert)
179
+ {
180
+ $bigIntClass = $this->getBigIntClass();
181
+ $modulus = new $bigIntClass($this->jwt->urlsafeB64Decode($cert['n']), 256);
182
+ $exponent = new $bigIntClass($this->jwt->urlsafeB64Decode($cert['e']), 256);
183
+ $component = array('n' => $modulus, 'e' => $exponent);
184
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib3\\Crypt\\RSA\\PublicKey')) {
185
+ /** @var PublicKey $loader */
186
+ $loader = PublicKeyLoader::load($component);
187
+ return $loader->toString('PKCS8');
188
+ }
189
+ $rsaClass = $this->getRsaClass();
190
+ $rsa = new $rsaClass();
191
+ $rsa->loadKey($component);
192
+ return $rsa->getPublicKey();
193
+ }
194
+ private function getRsaClass()
195
+ {
196
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib3\\Crypt\\RSA')) {
197
+ return 'SimpleCalendar\\plugin_deps\\phpseclib3\\Crypt\\RSA';
198
+ }
199
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib\\Crypt\\RSA')) {
200
+ return 'SimpleCalendar\\plugin_deps\\phpseclib\\Crypt\\RSA';
201
+ }
202
+ return 'Crypt_RSA';
203
+ }
204
+ private function getBigIntClass()
205
+ {
206
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib3\\Math\\BigInteger')) {
207
+ return 'SimpleCalendar\\plugin_deps\\phpseclib3\\Math\\BigInteger';
208
+ }
209
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib\\Math\\BigInteger')) {
210
+ return 'SimpleCalendar\\plugin_deps\\phpseclib\\Math\\BigInteger';
211
+ }
212
+ return 'Math_BigInteger';
213
+ }
214
+ private function getOpenSslConstant()
215
+ {
216
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib3\\Crypt\\AES')) {
217
+ return 'phpseclib3\\Crypt\\AES::ENGINE_OPENSSL';
218
+ }
219
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib\\Crypt\\RSA')) {
220
+ return 'phpseclib\\Crypt\\RSA::MODE_OPENSSL';
221
+ }
222
+ if (\class_exists('SimpleCalendar\\plugin_deps\\Crypt_RSA')) {
223
+ return 'CRYPT_RSA_MODE_OPENSSL';
224
+ }
225
+ throw new Exception('Cannot find RSA class');
226
+ }
227
+ /**
228
+ * phpseclib calls "phpinfo" by default, which requires special
229
+ * whitelisting in the AppEngine VM environment. This function
230
+ * sets constants to bypass the need for phpseclib to check phpinfo
231
+ *
232
+ * @see phpseclib/Math/BigInteger
233
+ * @see https://github.com/GoogleCloudPlatform/getting-started-php/issues/85
234
+ */
235
+ private function setPhpsecConstants()
236
+ {
237
+ if (\filter_var(\getenv('GAE_VM'), \FILTER_VALIDATE_BOOLEAN)) {
238
+ if (!\defined('SimpleCalendar\\plugin_deps\\MATH_BIGINTEGER_OPENSSL_ENABLED')) {
239
+ \define('SimpleCalendar\\plugin_deps\\MATH_BIGINTEGER_OPENSSL_ENABLED', \true);
240
+ }
241
+ if (!\defined('SimpleCalendar\\plugin_deps\\CRYPT_RSA_MODE')) {
242
+ \define('SimpleCalendar\\plugin_deps\\CRYPT_RSA_MODE', \constant($this->getOpenSslConstant()));
243
+ }
244
+ }
245
+ }
246
+ }
third-party/google/apiclient/src/AuthHandler/AuthHandlerFactory.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2015 Google Inc. All Rights Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\AuthHandler;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
21
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
22
+ use Exception;
23
+ class AuthHandlerFactory
24
+ {
25
+ /**
26
+ * Builds out a default http handler for the installed version of guzzle.
27
+ *
28
+ * @return Guzzle5AuthHandler|Guzzle6AuthHandler|Guzzle7AuthHandler
29
+ * @throws Exception
30
+ */
31
+ public static function build($cache = null, array $cacheConfig = [])
32
+ {
33
+ $guzzleVersion = null;
34
+ if (\defined('\\SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) {
35
+ $guzzleVersion = ClientInterface::MAJOR_VERSION;
36
+ } elseif (\defined('\\SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::VERSION')) {
37
+ $guzzleVersion = (int) \substr(ClientInterface::VERSION, 0, 1);
38
+ }
39
+ switch ($guzzleVersion) {
40
+ case 5:
41
+ return new \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle5AuthHandler($cache, $cacheConfig);
42
+ case 6:
43
+ return new \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle6AuthHandler($cache, $cacheConfig);
44
+ case 7:
45
+ return new \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle7AuthHandler($cache, $cacheConfig);
46
+ default:
47
+ throw new Exception('Version not supported');
48
+ }
49
+ }
50
+ }
third-party/google/apiclient/src/AuthHandler/Guzzle5AuthHandler.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Google\AuthHandler;
4
+
5
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
6
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
7
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenCache;
8
+ use SimpleCalendar\plugin_deps\Google\Auth\Subscriber\AuthTokenSubscriber;
9
+ use SimpleCalendar\plugin_deps\Google\Auth\Subscriber\ScopedAccessTokenSubscriber;
10
+ use SimpleCalendar\plugin_deps\Google\Auth\Subscriber\SimpleSubscriber;
11
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
12
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
13
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
14
+ /**
15
+ *
16
+ */
17
+ class Guzzle5AuthHandler
18
+ {
19
+ protected $cache;
20
+ protected $cacheConfig;
21
+ public function __construct(CacheItemPoolInterface $cache = null, array $cacheConfig = [])
22
+ {
23
+ $this->cache = $cache;
24
+ $this->cacheConfig = $cacheConfig;
25
+ }
26
+ public function attachCredentials(ClientInterface $http, CredentialsLoader $credentials, callable $tokenCallback = null)
27
+ {
28
+ // use the provided cache
29
+ if ($this->cache) {
30
+ $credentials = new FetchAuthTokenCache($credentials, $this->cacheConfig, $this->cache);
31
+ }
32
+ return $this->attachCredentialsCache($http, $credentials, $tokenCallback);
33
+ }
34
+ public function attachCredentialsCache(ClientInterface $http, FetchAuthTokenCache $credentials, callable $tokenCallback = null)
35
+ {
36
+ // if we end up needing to make an HTTP request to retrieve credentials, we
37
+ // can use our existing one, but we need to throw exceptions so the error
38
+ // bubbles up.
39
+ $authHttp = $this->createAuthHttp($http);
40
+ $authHttpHandler = HttpHandlerFactory::build($authHttp);
41
+ $subscriber = new AuthTokenSubscriber($credentials, $authHttpHandler, $tokenCallback);
42
+ $http->setDefaultOption('auth', 'google_auth');
43
+ $http->getEmitter()->attach($subscriber);
44
+ return $http;
45
+ }
46
+ public function attachToken(ClientInterface $http, array $token, array $scopes)
47
+ {
48
+ $tokenFunc = function ($scopes) use($token) {
49
+ return $token['access_token'];
50
+ };
51
+ $subscriber = new ScopedAccessTokenSubscriber($tokenFunc, $scopes, $this->cacheConfig, $this->cache);
52
+ $http->setDefaultOption('auth', 'scoped');
53
+ $http->getEmitter()->attach($subscriber);
54
+ return $http;
55
+ }
56
+ public function attachKey(ClientInterface $http, $key)
57
+ {
58
+ $subscriber = new SimpleSubscriber(['key' => $key]);
59
+ $http->setDefaultOption('auth', 'simple');
60
+ $http->getEmitter()->attach($subscriber);
61
+ return $http;
62
+ }
63
+ private function createAuthHttp(ClientInterface $http)
64
+ {
65
+ return new Client(['base_url' => $http->getBaseUrl(), 'defaults' => ['exceptions' => \true, 'verify' => $http->getDefaultOption('verify'), 'proxy' => $http->getDefaultOption('proxy')]]);
66
+ }
67
+ }
third-party/google/apiclient/src/AuthHandler/Guzzle6AuthHandler.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Google\AuthHandler;
4
+
5
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
6
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
7
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenCache;
8
+ use SimpleCalendar\plugin_deps\Google\Auth\Middleware\AuthTokenMiddleware;
9
+ use SimpleCalendar\plugin_deps\Google\Auth\Middleware\ScopedAccessTokenMiddleware;
10
+ use SimpleCalendar\plugin_deps\Google\Auth\Middleware\SimpleMiddleware;
11
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
12
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
13
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
14
+ /**
15
+ * This supports Guzzle 6
16
+ */
17
+ class Guzzle6AuthHandler
18
+ {
19
+ protected $cache;
20
+ protected $cacheConfig;
21
+ public function __construct(CacheItemPoolInterface $cache = null, array $cacheConfig = [])
22
+ {
23
+ $this->cache = $cache;
24
+ $this->cacheConfig = $cacheConfig;
25
+ }
26
+ public function attachCredentials(ClientInterface $http, CredentialsLoader $credentials, callable $tokenCallback = null)
27
+ {
28
+ // use the provided cache
29
+ if ($this->cache) {
30
+ $credentials = new FetchAuthTokenCache($credentials, $this->cacheConfig, $this->cache);
31
+ }
32
+ return $this->attachCredentialsCache($http, $credentials, $tokenCallback);
33
+ }
34
+ public function attachCredentialsCache(ClientInterface $http, FetchAuthTokenCache $credentials, callable $tokenCallback = null)
35
+ {
36
+ // if we end up needing to make an HTTP request to retrieve credentials, we
37
+ // can use our existing one, but we need to throw exceptions so the error
38
+ // bubbles up.
39
+ $authHttp = $this->createAuthHttp($http);
40
+ $authHttpHandler = HttpHandlerFactory::build($authHttp);
41
+ $middleware = new AuthTokenMiddleware($credentials, $authHttpHandler, $tokenCallback);
42
+ $config = $http->getConfig();
43
+ $config['handler']->remove('google_auth');
44
+ $config['handler']->push($middleware, 'google_auth');
45
+ $config['auth'] = 'google_auth';
46
+ $http = new Client($config);
47
+ return $http;
48
+ }
49
+ public function attachToken(ClientInterface $http, array $token, array $scopes)
50
+ {
51
+ $tokenFunc = function ($scopes) use($token) {
52
+ return $token['access_token'];
53
+ };
54
+ $middleware = new ScopedAccessTokenMiddleware($tokenFunc, $scopes, $this->cacheConfig, $this->cache);
55
+ $config = $http->getConfig();
56
+ $config['handler']->remove('google_auth');
57
+ $config['handler']->push($middleware, 'google_auth');
58
+ $config['auth'] = 'scoped';
59
+ $http = new Client($config);
60
+ return $http;
61
+ }
62
+ public function attachKey(ClientInterface $http, $key)
63
+ {
64
+ $middleware = new SimpleMiddleware(['key' => $key]);
65
+ $config = $http->getConfig();
66
+ $config['handler']->remove('google_auth');
67
+ $config['handler']->push($middleware, 'google_auth');
68
+ $config['auth'] = 'simple';
69
+ $http = new Client($config);
70
+ return $http;
71
+ }
72
+ private function createAuthHttp(ClientInterface $http)
73
+ {
74
+ return new Client(['base_uri' => $http->getConfig('base_uri'), 'http_errors' => \true, 'verify' => $http->getConfig('verify'), 'proxy' => $http->getConfig('proxy')]);
75
+ }
76
+ }
third-party/google/apiclient/src/AuthHandler/Guzzle7AuthHandler.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2020 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\AuthHandler;
19
+
20
+ /**
21
+ * This supports Guzzle 7
22
+ */
23
+ class Guzzle7AuthHandler extends \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle6AuthHandler
24
+ {
25
+ }
third-party/google/apiclient/src/Client.php ADDED
@@ -0,0 +1,1009 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\AccessToken\Revoke;
21
+ use SimpleCalendar\plugin_deps\Google\AccessToken\Verify;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\ApplicationDefaultCredentials;
23
+ use SimpleCalendar\plugin_deps\Google\Auth\Cache\MemoryCacheItemPool;
24
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenCache;
26
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
27
+ use SimpleCalendar\plugin_deps\Google\Auth\OAuth2;
28
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\ServiceAccountCredentials;
29
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\UserRefreshCredentials;
30
+ use SimpleCalendar\plugin_deps\Google\AuthHandler\AuthHandlerFactory;
31
+ use SimpleCalendar\plugin_deps\Google\Http\REST;
32
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client as GuzzleClient;
33
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
34
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Ring\Client\StreamHandler;
35
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
36
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
37
+ use SimpleCalendar\plugin_deps\Psr\Log\LoggerInterface;
38
+ use SimpleCalendar\plugin_deps\Monolog\Logger;
39
+ use SimpleCalendar\plugin_deps\Monolog\Handler\StreamHandler as MonologStreamHandler;
40
+ use SimpleCalendar\plugin_deps\Monolog\Handler\SyslogHandler as MonologSyslogHandler;
41
+ use BadMethodCallException;
42
+ use DomainException;
43
+ use InvalidArgumentException;
44
+ use LogicException;
45
+ /**
46
+ * The Google API Client
47
+ * https://github.com/google/google-api-php-client
48
+ */
49
+ class Client
50
+ {
51
+ const LIBVER = "2.9.1";
52
+ const USER_AGENT_SUFFIX = "google-api-php-client/";
53
+ const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
54
+ const OAUTH2_TOKEN_URI = 'https://oauth2.googleapis.com/token';
55
+ const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
56
+ const API_BASE_PATH = 'https://www.googleapis.com';
57
+ /**
58
+ * @var OAuth2 $auth
59
+ */
60
+ private $auth;
61
+ /**
62
+ * @var ClientInterface $http
63
+ */
64
+ private $http;
65
+ /**
66
+ * @var CacheItemPoolInterface $cache
67
+ */
68
+ private $cache;
69
+ /**
70
+ * @var array access token
71
+ */
72
+ private $token;
73
+ /**
74
+ * @var array $config
75
+ */
76
+ private $config;
77
+ /**
78
+ * @var LoggerInterface $logger
79
+ */
80
+ private $logger;
81
+ /**
82
+ * @var boolean $deferExecution
83
+ */
84
+ private $deferExecution = \false;
85
+ /** @var array $scopes */
86
+ // Scopes requested by the client
87
+ protected $requestedScopes = [];
88
+ /**
89
+ * Construct the Google Client.
90
+ *
91
+ * @param array $config
92
+ */
93
+ public function __construct(array $config = array())
94
+ {
95
+ $this->config = \array_merge([
96
+ 'application_name' => '',
97
+ // Don't change these unless you're working against a special development
98
+ // or testing environment.
99
+ 'base_path' => self::API_BASE_PATH,
100
+ // https://developers.google.com/console
101
+ 'client_id' => '',
102
+ 'client_secret' => '',
103
+ // Path to JSON credentials or an array representing those credentials
104
+ // @see Google\Client::setAuthConfig
105
+ 'credentials' => null,
106
+ // @see Google\Client::setScopes
107
+ 'scopes' => null,
108
+ // Sets X-Goog-User-Project, which specifies a user project to bill
109
+ // for access charges associated with the request
110
+ 'quota_project' => null,
111
+ 'redirect_uri' => null,
112
+ 'state' => null,
113
+ // Simple API access key, also from the API console. Ensure you get
114
+ // a Server key, and not a Browser key.
115
+ 'developer_key' => '',
116
+ // For use with Google Cloud Platform
117
+ // fetch the ApplicationDefaultCredentials, if applicable
118
+ // @see https://developers.google.com/identity/protocols/application-default-credentials
119
+ 'use_application_default_credentials' => \false,
120
+ 'signing_key' => null,
121
+ 'signing_algorithm' => null,
122
+ 'subject' => null,
123
+ // Other OAuth2 parameters.
124
+ 'hd' => '',
125
+ 'prompt' => '',
126
+ 'openid.realm' => '',
127
+ 'include_granted_scopes' => null,
128
+ 'login_hint' => '',
129
+ 'request_visible_actions' => '',
130
+ 'access_type' => 'online',
131
+ 'approval_prompt' => 'auto',
132
+ // Task Runner retry configuration
133
+ // @see Google\Task\Runner
134
+ 'retry' => array(),
135
+ 'retry_map' => null,
136
+ // Cache class implementing Psr\Cache\CacheItemPoolInterface.
137
+ // Defaults to Google\Auth\Cache\MemoryCacheItemPool.
138
+ 'cache' => null,
139
+ // cache config for downstream auth caching
140
+ 'cache_config' => [],
141
+ // function to be called when an access token is fetched
142
+ // follows the signature function ($cacheKey, $accessToken)
143
+ 'token_callback' => null,
144
+ // Service class used in Google\Client::verifyIdToken.
145
+ // Explicitly pass this in to avoid setting JWT::$leeway
146
+ 'jwt' => null,
147
+ // Setting api_format_v2 will return more detailed error messages
148
+ // from certain APIs.
149
+ 'api_format_v2' => \false,
150
+ ], $config);
151
+ if (!\is_null($this->config['credentials'])) {
152
+ $this->setAuthConfig($this->config['credentials']);
153
+ unset($this->config['credentials']);
154
+ }
155
+ if (!\is_null($this->config['scopes'])) {
156
+ $this->setScopes($this->config['scopes']);
157
+ unset($this->config['scopes']);
158
+ }
159
+ // Set a default token callback to update the in-memory access token
160
+ if (\is_null($this->config['token_callback'])) {
161
+ $this->config['token_callback'] = function ($cacheKey, $newAccessToken) {
162
+ $this->setAccessToken([
163
+ 'access_token' => $newAccessToken,
164
+ 'expires_in' => 3600,
165
+ // Google default
166
+ 'created' => \time(),
167
+ ]);
168
+ };
169
+ }
170
+ if (!\is_null($this->config['cache'])) {
171
+ $this->setCache($this->config['cache']);
172
+ unset($this->config['cache']);
173
+ }
174
+ }
175
+ /**
176
+ * Get a string containing the version of the library.
177
+ *
178
+ * @return string
179
+ */
180
+ public function getLibraryVersion()
181
+ {
182
+ return self::LIBVER;
183
+ }
184
+ /**
185
+ * For backwards compatibility
186
+ * alias for fetchAccessTokenWithAuthCode
187
+ *
188
+ * @param $code string code from accounts.google.com
189
+ * @return array access token
190
+ * @deprecated
191
+ */
192
+ public function authenticate($code)
193
+ {
194
+ return $this->fetchAccessTokenWithAuthCode($code);
195
+ }
196
+ /**
197
+ * Attempt to exchange a code for an valid authentication token.
198
+ * Helper wrapped around the OAuth 2.0 implementation.
199
+ *
200
+ * @param $code string code from accounts.google.com
201
+ * @return array access token
202
+ */
203
+ public function fetchAccessTokenWithAuthCode($code)
204
+ {
205
+ if (\strlen($code) == 0) {
206
+ throw new InvalidArgumentException("Invalid code");
207
+ }
208
+ $auth = $this->getOAuth2Service();
209
+ $auth->setCode($code);
210
+ $auth->setRedirectUri($this->getRedirectUri());
211
+ $httpHandler = HttpHandlerFactory::build($this->getHttpClient());
212
+ $creds = $auth->fetchAuthToken($httpHandler);
213
+ if ($creds && isset($creds['access_token'])) {
214
+ $creds['created'] = \time();
215
+ $this->setAccessToken($creds);
216
+ }
217
+ return $creds;
218
+ }
219
+ /**
220
+ * For backwards compatibility
221
+ * alias for fetchAccessTokenWithAssertion
222
+ *
223
+ * @return array access token
224
+ * @deprecated
225
+ */
226
+ public function refreshTokenWithAssertion()
227
+ {
228
+ return $this->fetchAccessTokenWithAssertion();
229
+ }
230
+ /**
231
+ * Fetches a fresh access token with a given assertion token.
232
+ * @param ClientInterface $authHttp optional.
233
+ * @return array access token
234
+ */
235
+ public function fetchAccessTokenWithAssertion(ClientInterface $authHttp = null)
236
+ {
237
+ if (!$this->isUsingApplicationDefaultCredentials()) {
238
+ throw new DomainException('set the JSON service account credentials using' . ' Google\\Client::setAuthConfig or set the path to your JSON file' . ' with the "GOOGLE_APPLICATION_CREDENTIALS" environment variable' . ' and call Google\\Client::useApplicationDefaultCredentials to' . ' refresh a token with assertion.');
239
+ }
240
+ $this->getLogger()->log('info', 'OAuth2 access token refresh with Signed JWT assertion grants.');
241
+ $credentials = $this->createApplicationDefaultCredentials();
242
+ $httpHandler = HttpHandlerFactory::build($authHttp);
243
+ $creds = $credentials->fetchAuthToken($httpHandler);
244
+ if ($creds && isset($creds['access_token'])) {
245
+ $creds['created'] = \time();
246
+ $this->setAccessToken($creds);
247
+ }
248
+ return $creds;
249
+ }
250
+ /**
251
+ * For backwards compatibility
252
+ * alias for fetchAccessTokenWithRefreshToken
253
+ *
254
+ * @param string $refreshToken
255
+ * @return array access token
256
+ */
257
+ public function refreshToken($refreshToken)
258
+ {
259
+ return $this->fetchAccessTokenWithRefreshToken($refreshToken);
260
+ }
261
+ /**
262
+ * Fetches a fresh OAuth 2.0 access token with the given refresh token.
263
+ * @param string $refreshToken
264
+ * @return array access token
265
+ */
266
+ public function fetchAccessTokenWithRefreshToken($refreshToken = null)
267
+ {
268
+ if (null === $refreshToken) {
269
+ if (!isset($this->token['refresh_token'])) {
270
+ throw new LogicException('refresh token must be passed in or set as part of setAccessToken');
271
+ }
272
+ $refreshToken = $this->token['refresh_token'];
273
+ }
274
+ $this->getLogger()->info('OAuth2 access token refresh');
275
+ $auth = $this->getOAuth2Service();
276
+ $auth->setRefreshToken($refreshToken);
277
+ $httpHandler = HttpHandlerFactory::build($this->getHttpClient());
278
+ $creds = $auth->fetchAuthToken($httpHandler);
279
+ if ($creds && isset($creds['access_token'])) {
280
+ $creds['created'] = \time();
281
+ if (!isset($creds['refresh_token'])) {
282
+ $creds['refresh_token'] = $refreshToken;
283
+ }
284
+ $this->setAccessToken($creds);
285
+ }
286
+ return $creds;
287
+ }
288
+ /**
289
+ * Create a URL to obtain user authorization.
290
+ * The authorization endpoint allows the user to first
291
+ * authenticate, and then grant/deny the access request.
292
+ * @param string|array $scope The scope is expressed as an array or list of space-delimited strings.
293
+ * @return string
294
+ */
295
+ public function createAuthUrl($scope = null)
296
+ {
297
+ if (empty($scope)) {
298
+ $scope = $this->prepareScopes();
299
+ }
300
+ if (\is_array($scope)) {
301
+ $scope = \implode(' ', $scope);
302
+ }
303
+ // only accept one of prompt or approval_prompt
304
+ $approvalPrompt = $this->config['prompt'] ? null : $this->config['approval_prompt'];
305
+ // include_granted_scopes should be string "true", string "false", or null
306
+ $includeGrantedScopes = $this->config['include_granted_scopes'] === null ? null : \var_export($this->config['include_granted_scopes'], \true);
307
+ $params = \array_filter(['access_type' => $this->config['access_type'], 'approval_prompt' => $approvalPrompt, 'hd' => $this->config['hd'], 'include_granted_scopes' => $includeGrantedScopes, 'login_hint' => $this->config['login_hint'], 'openid.realm' => $this->config['openid.realm'], 'prompt' => $this->config['prompt'], 'response_type' => 'code', 'scope' => $scope, 'state' => $this->config['state']]);
308
+ // If the list of scopes contains plus.login, add request_visible_actions
309
+ // to auth URL.
310
+ $rva = $this->config['request_visible_actions'];
311
+ if (\strlen($rva) > 0 && \false !== \strpos($scope, 'plus.login')) {
312
+ $params['request_visible_actions'] = $rva;
313
+ }
314
+ $auth = $this->getOAuth2Service();
315
+ return (string) $auth->buildFullAuthorizationUri($params);
316
+ }
317
+ /**
318
+ * Adds auth listeners to the HTTP client based on the credentials
319
+ * set in the Google API Client object
320
+ *
321
+ * @param ClientInterface $http the http client object.
322
+ * @return ClientInterface the http client object
323
+ */
324
+ public function authorize(ClientInterface $http = null)
325
+ {
326
+ $credentials = null;
327
+ $token = null;
328
+ $scopes = null;
329
+ $http = $http ?: $this->getHttpClient();
330
+ $authHandler = $this->getAuthHandler();
331
+ // These conditionals represent the decision tree for authentication
332
+ // 1. Check for Application Default Credentials
333
+ // 2. Check for API Key
334
+ // 3a. Check for an Access Token
335
+ // 3b. If access token exists but is expired, try to refresh it
336
+ if ($this->isUsingApplicationDefaultCredentials()) {
337
+ $credentials = $this->createApplicationDefaultCredentials();
338
+ $http = $authHandler->attachCredentialsCache($http, $credentials, $this->config['token_callback']);
339
+ } elseif ($token = $this->getAccessToken()) {
340
+ $scopes = $this->prepareScopes();
341
+ // add refresh subscriber to request a new token
342
+ if (isset($token['refresh_token']) && $this->isAccessTokenExpired()) {
343
+ $credentials = $this->createUserRefreshCredentials($scopes, $token['refresh_token']);
344
+ $http = $authHandler->attachCredentials($http, $credentials, $this->config['token_callback']);
345
+ } else {
346
+ $http = $authHandler->attachToken($http, $token, (array) $scopes);
347
+ }
348
+ } elseif ($key = $this->config['developer_key']) {
349
+ $http = $authHandler->attachKey($http, $key);
350
+ }
351
+ return $http;
352
+ }
353
+ /**
354
+ * Set the configuration to use application default credentials for
355
+ * authentication
356
+ *
357
+ * @see https://developers.google.com/identity/protocols/application-default-credentials
358
+ * @param boolean $useAppCreds
359
+ */
360
+ public function useApplicationDefaultCredentials($useAppCreds = \true)
361
+ {
362
+ $this->config['use_application_default_credentials'] = $useAppCreds;
363
+ }
364
+ /**
365
+ * To prevent useApplicationDefaultCredentials from inappropriately being
366
+ * called in a conditional
367
+ *
368
+ * @see https://developers.google.com/identity/protocols/application-default-credentials
369
+ */
370
+ public function isUsingApplicationDefaultCredentials()
371
+ {
372
+ return $this->config['use_application_default_credentials'];
373
+ }
374
+ /**
375
+ * Set the access token used for requests.
376
+ *
377
+ * Note that at the time requests are sent, tokens are cached. A token will be
378
+ * cached for each combination of service and authentication scopes. If a
379
+ * cache pool is not provided, creating a new instance of the client will
380
+ * allow modification of access tokens. If a persistent cache pool is
381
+ * provided, in order to change the access token, you must clear the cached
382
+ * token by calling `$client->getCache()->clear()`. (Use caution in this case,
383
+ * as calling `clear()` will remove all cache items, including any items not
384
+ * related to Google API PHP Client.)
385
+ *
386
+ * @param string|array $token
387
+ * @throws InvalidArgumentException
388
+ */
389
+ public function setAccessToken($token)
390
+ {
391
+ if (\is_string($token)) {
392
+ if ($json = \json_decode($token, \true)) {
393
+ $token = $json;
394
+ } else {
395
+ // assume $token is just the token string
396
+ $token = array('access_token' => $token);
397
+ }
398
+ }
399
+ if ($token == null) {
400
+ throw new InvalidArgumentException('invalid json token');
401
+ }
402
+ if (!isset($token['access_token'])) {
403
+ throw new InvalidArgumentException("Invalid token format");
404
+ }
405
+ $this->token = $token;
406
+ }
407
+ public function getAccessToken()
408
+ {
409
+ return $this->token;
410
+ }
411
+ /**
412
+ * @return string|null
413
+ */
414
+ public function getRefreshToken()
415
+ {
416
+ if (isset($this->token['refresh_token'])) {
417
+ return $this->token['refresh_token'];
418
+ }
419
+ return null;
420
+ }
421
+ /**
422
+ * Returns if the access_token is expired.
423
+ * @return bool Returns True if the access_token is expired.
424
+ */
425
+ public function isAccessTokenExpired()
426
+ {
427
+ if (!$this->token) {
428
+ return \true;
429
+ }
430
+ $created = 0;
431
+ if (isset($this->token['created'])) {
432
+ $created = $this->token['created'];
433
+ } elseif (isset($this->token['id_token'])) {
434
+ // check the ID token for "iat"
435
+ // signature verification is not required here, as we are just
436
+ // using this for convenience to save a round trip request
437
+ // to the Google API server
438
+ $idToken = $this->token['id_token'];
439
+ if (\substr_count($idToken, '.') == 2) {
440
+ $parts = \explode('.', $idToken);
441
+ $payload = \json_decode(\base64_decode($parts[1]), \true);
442
+ if ($payload && isset($payload['iat'])) {
443
+ $created = $payload['iat'];
444
+ }
445
+ }
446
+ }
447
+ // If the token is set to expire in the next 30 seconds.
448
+ return $created + ($this->token['expires_in'] - 30) < \time();
449
+ }
450
+ /**
451
+ * @deprecated See UPGRADING.md for more information
452
+ */
453
+ public function getAuth()
454
+ {
455
+ throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information');
456
+ }
457
+ /**
458
+ * @deprecated See UPGRADING.md for more information
459
+ */
460
+ public function setAuth($auth)
461
+ {
462
+ throw new BadMethodCallException('This function no longer exists. See UPGRADING.md for more information');
463
+ }
464
+ /**
465
+ * Set the OAuth 2.0 Client ID.
466
+ * @param string $clientId
467
+ */
468
+ public function setClientId($clientId)
469
+ {
470
+ $this->config['client_id'] = $clientId;
471
+ }
472
+ public function getClientId()
473
+ {
474
+ return $this->config['client_id'];
475
+ }
476
+ /**
477
+ * Set the OAuth 2.0 Client Secret.
478
+ * @param string $clientSecret
479
+ */
480
+ public function setClientSecret($clientSecret)
481
+ {
482
+ $this->config['client_secret'] = $clientSecret;
483
+ }
484
+ public function getClientSecret()
485
+ {
486
+ return $this->config['client_secret'];
487
+ }
488
+ /**
489
+ * Set the OAuth 2.0 Redirect URI.
490
+ * @param string $redirectUri
491
+ */
492
+ public function setRedirectUri($redirectUri)
493
+ {
494
+ $this->config['redirect_uri'] = $redirectUri;
495
+ }
496
+ public function getRedirectUri()
497
+ {
498
+ return $this->config['redirect_uri'];
499
+ }
500
+ /**
501
+ * Set OAuth 2.0 "state" parameter to achieve per-request customization.
502
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
503
+ * @param string $state
504
+ */
505
+ public function setState($state)
506
+ {
507
+ $this->config['state'] = $state;
508
+ }
509
+ /**
510
+ * @param string $accessType Possible values for access_type include:
511
+ * {@code "offline"} to request offline access from the user.
512
+ * {@code "online"} to request online access from the user.
513
+ */
514
+ public function setAccessType($accessType)
515
+ {
516
+ $this->config['access_type'] = $accessType;
517
+ }
518
+ /**
519
+ * @param string $approvalPrompt Possible values for approval_prompt include:
520
+ * {@code "force"} to force the approval UI to appear.
521
+ * {@code "auto"} to request auto-approval when possible. (This is the default value)
522
+ */
523
+ public function setApprovalPrompt($approvalPrompt)
524
+ {
525
+ $this->config['approval_prompt'] = $approvalPrompt;
526
+ }
527
+ /**
528
+ * Set the login hint, email address or sub id.
529
+ * @param string $loginHint
530
+ */
531
+ public function setLoginHint($loginHint)
532
+ {
533
+ $this->config['login_hint'] = $loginHint;
534
+ }
535
+ /**
536
+ * Set the application name, this is included in the User-Agent HTTP header.
537
+ * @param string $applicationName
538
+ */
539
+ public function setApplicationName($applicationName)
540
+ {
541
+ $this->config['application_name'] = $applicationName;
542
+ }
543
+ /**
544
+ * If 'plus.login' is included in the list of requested scopes, you can use
545
+ * this method to define types of app activities that your app will write.
546
+ * You can find a list of available types here:
547
+ * @link https://developers.google.com/+/api/moment-types
548
+ *
549
+ * @param array $requestVisibleActions Array of app activity types
550
+ */
551
+ public function setRequestVisibleActions($requestVisibleActions)
552
+ {
553
+ if (\is_array($requestVisibleActions)) {
554
+ $requestVisibleActions = \implode(" ", $requestVisibleActions);
555
+ }
556
+ $this->config['request_visible_actions'] = $requestVisibleActions;
557
+ }
558
+ /**
559
+ * Set the developer key to use, these are obtained through the API Console.
560
+ * @see http://code.google.com/apis/console-help/#generatingdevkeys
561
+ * @param string $developerKey
562
+ */
563
+ public function setDeveloperKey($developerKey)
564
+ {
565
+ $this->config['developer_key'] = $developerKey;
566
+ }
567
+ /**
568
+ * Set the hd (hosted domain) parameter streamlines the login process for
569
+ * Google Apps hosted accounts. By including the domain of the user, you
570
+ * restrict sign-in to accounts at that domain.
571
+ * @param $hd string - the domain to use.
572
+ */
573
+ public function setHostedDomain($hd)
574
+ {
575
+ $this->config['hd'] = $hd;
576
+ }
577
+ /**
578
+ * Set the prompt hint. Valid values are none, consent and select_account.
579
+ * If no value is specified and the user has not previously authorized
580
+ * access, then the user is shown a consent screen.
581
+ * @param $prompt string
582
+ * {@code "none"} Do not display any authentication or consent screens. Must not be specified with other values.
583
+ * {@code "consent"} Prompt the user for consent.
584
+ * {@code "select_account"} Prompt the user to select an account.
585
+ */
586
+ public function setPrompt($prompt)
587
+ {
588
+ $this->config['prompt'] = $prompt;
589
+ }
590
+ /**
591
+ * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
592
+ * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which
593
+ * an authentication request is valid.
594
+ * @param $realm string - the URL-space to use.
595
+ */
596
+ public function setOpenidRealm($realm)
597
+ {
598
+ $this->config['openid.realm'] = $realm;
599
+ }
600
+ /**
601
+ * If this is provided with the value true, and the authorization request is
602
+ * granted, the authorization will include any previous authorizations
603
+ * granted to this user/application combination for other scopes.
604
+ * @param $include boolean - the URL-space to use.
605
+ */
606
+ public function setIncludeGrantedScopes($include)
607
+ {
608
+ $this->config['include_granted_scopes'] = $include;
609
+ }
610
+ /**
611
+ * sets function to be called when an access token is fetched
612
+ * @param callable $tokenCallback - function ($cacheKey, $accessToken)
613
+ */
614
+ public function setTokenCallback(callable $tokenCallback)
615
+ {
616
+ $this->config['token_callback'] = $tokenCallback;
617
+ }
618
+ /**
619
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
620
+ * token, if a token isn't provided.
621
+ *
622
+ * @param string|array|null $token The token (access token or a refresh token) that should be revoked.
623
+ * @return boolean Returns True if the revocation was successful, otherwise False.
624
+ */
625
+ public function revokeToken($token = null)
626
+ {
627
+ $tokenRevoker = new Revoke($this->getHttpClient());
628
+ return $tokenRevoker->revokeToken($token ?: $this->getAccessToken());
629
+ }
630
+ /**
631
+ * Verify an id_token. This method will verify the current id_token, if one
632
+ * isn't provided.
633
+ *
634
+ * @throws LogicException If no token was provided and no token was set using `setAccessToken`.
635
+ * @throws UnexpectedValueException If the token is not a valid JWT.
636
+ * @param string|null $idToken The token (id_token) that should be verified.
637
+ * @return array|false Returns the token payload as an array if the verification was
638
+ * successful, false otherwise.
639
+ */
640
+ public function verifyIdToken($idToken = null)
641
+ {
642
+ $tokenVerifier = new Verify($this->getHttpClient(), $this->getCache(), $this->config['jwt']);
643
+ if (null === $idToken) {
644
+ $token = $this->getAccessToken();
645
+ if (!isset($token['id_token'])) {
646
+ throw new LogicException('id_token must be passed in or set as part of setAccessToken');
647
+ }
648
+ $idToken = $token['id_token'];
649
+ }
650
+ return $tokenVerifier->verifyIdToken($idToken, $this->getClientId());
651
+ }
652
+ /**
653
+ * Set the scopes to be requested. Must be called before createAuthUrl().
654
+ * Will remove any previously configured scopes.
655
+ * @param string|array $scope_or_scopes, ie:
656
+ * array(
657
+ * 'https://www.googleapis.com/auth/plus.login',
658
+ * 'https://www.googleapis.com/auth/moderator'
659
+ * );
660
+ */
661
+ public function setScopes($scope_or_scopes)
662
+ {
663
+ $this->requestedScopes = array();
664
+ $this->addScope($scope_or_scopes);
665
+ }
666
+ /**
667
+ * This functions adds a scope to be requested as part of the OAuth2.0 flow.
668
+ * Will append any scopes not previously requested to the scope parameter.
669
+ * A single string will be treated as a scope to request. An array of strings
670
+ * will each be appended.
671
+ * @param $scope_or_scopes string|array e.g. "profile"
672
+ */
673
+ public function addScope($scope_or_scopes)
674
+ {
675
+ if (\is_string($scope_or_scopes) && !\in_array($scope_or_scopes, $this->requestedScopes)) {
676
+ $this->requestedScopes[] = $scope_or_scopes;
677
+ } else {
678
+ if (\is_array($scope_or_scopes)) {
679
+ foreach ($scope_or_scopes as $scope) {
680
+ $this->addScope($scope);
681
+ }
682
+ }
683
+ }
684
+ }
685
+ /**
686
+ * Returns the list of scopes requested by the client
687
+ * @return array the list of scopes
688
+ *
689
+ */
690
+ public function getScopes()
691
+ {
692
+ return $this->requestedScopes;
693
+ }
694
+ /**
695
+ * @return string|null
696
+ * @visible For Testing
697
+ */
698
+ public function prepareScopes()
699
+ {
700
+ if (empty($this->requestedScopes)) {
701
+ return null;
702
+ }
703
+ return \implode(' ', $this->requestedScopes);
704
+ }
705
+ /**
706
+ * Helper method to execute deferred HTTP requests.
707
+ *
708
+ * @param $request RequestInterface|\Google\Http\Batch
709
+ * @param string $expectedClass
710
+ * @throws \Google\Exception
711
+ * @return object of the type of the expected class or Psr\Http\Message\ResponseInterface.
712
+ */
713
+ public function execute(RequestInterface $request, $expectedClass = null)
714
+ {
715
+ $request = $request->withHeader('User-Agent', \sprintf('%s %s%s', $this->config['application_name'], self::USER_AGENT_SUFFIX, $this->getLibraryVersion()))->withHeader('x-goog-api-client', \sprintf('gl-php/%s gdcl/%s', \phpversion(), $this->getLibraryVersion()));
716
+ if ($this->config['api_format_v2']) {
717
+ $request = $request->withHeader('X-GOOG-API-FORMAT-VERSION', 2);
718
+ }
719
+ // call the authorize method
720
+ // this is where most of the grunt work is done
721
+ $http = $this->authorize();
722
+ return REST::execute($http, $request, $expectedClass, $this->config['retry'], $this->config['retry_map']);
723
+ }
724
+ /**
725
+ * Declare whether batch calls should be used. This may increase throughput
726
+ * by making multiple requests in one connection.
727
+ *
728
+ * @param boolean $useBatch True if the batch support should
729
+ * be enabled. Defaults to False.
730
+ */
731
+ public function setUseBatch($useBatch)
732
+ {
733
+ // This is actually an alias for setDefer.
734
+ $this->setDefer($useBatch);
735
+ }
736
+ /**
737
+ * Are we running in Google AppEngine?
738
+ * return bool
739
+ */
740
+ public function isAppEngine()
741
+ {
742
+ return isset($_SERVER['SERVER_SOFTWARE']) && \strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== \false;
743
+ }
744
+ public function setConfig($name, $value)
745
+ {
746
+ $this->config[$name] = $value;
747
+ }
748
+ public function getConfig($name, $default = null)
749
+ {
750
+ return isset($this->config[$name]) ? $this->config[$name] : $default;
751
+ }
752
+ /**
753
+ * For backwards compatibility
754
+ * alias for setAuthConfig
755
+ *
756
+ * @param string $file the configuration file
757
+ * @throws \Google\Exception
758
+ * @deprecated
759
+ */
760
+ public function setAuthConfigFile($file)
761
+ {
762
+ $this->setAuthConfig($file);
763
+ }
764
+ /**
765
+ * Set the auth config from new or deprecated JSON config.
766
+ * This structure should match the file downloaded from
767
+ * the "Download JSON" button on in the Google Developer
768
+ * Console.
769
+ * @param string|array $config the configuration json
770
+ * @throws \Google\Exception
771
+ */
772
+ public function setAuthConfig($config)
773
+ {
774
+ if (\is_string($config)) {
775
+ if (!\file_exists($config)) {
776
+ throw new InvalidArgumentException(\sprintf('file "%s" does not exist', $config));
777
+ }
778
+ $json = \file_get_contents($config);
779
+ if (!($config = \json_decode($json, \true))) {
780
+ throw new LogicException('invalid json for auth config');
781
+ }
782
+ }
783
+ $key = isset($config['installed']) ? 'installed' : 'web';
784
+ if (isset($config['type']) && $config['type'] == 'service_account') {
785
+ // application default credentials
786
+ $this->useApplicationDefaultCredentials();
787
+ // set the information from the config
788
+ $this->setClientId($config['client_id']);
789
+ $this->config['client_email'] = $config['client_email'];
790
+ $this->config['signing_key'] = $config['private_key'];
791
+ $this->config['signing_algorithm'] = 'HS256';
792
+ } elseif (isset($config[$key])) {
793
+ // old-style
794
+ $this->setClientId($config[$key]['client_id']);
795
+ $this->setClientSecret($config[$key]['client_secret']);
796
+ if (isset($config[$key]['redirect_uris'])) {
797
+ $this->setRedirectUri($config[$key]['redirect_uris'][0]);
798
+ }
799
+ } else {
800
+ // new-style
801
+ $this->setClientId($config['client_id']);
802
+ $this->setClientSecret($config['client_secret']);
803
+ if (isset($config['redirect_uris'])) {
804
+ $this->setRedirectUri($config['redirect_uris'][0]);
805
+ }
806
+ }
807
+ }
808
+ /**
809
+ * Use when the service account has been delegated domain wide access.
810
+ *
811
+ * @param string $subject an email address account to impersonate
812
+ */
813
+ public function setSubject($subject)
814
+ {
815
+ $this->config['subject'] = $subject;
816
+ }
817
+ /**
818
+ * Declare whether making API calls should make the call immediately, or
819
+ * return a request which can be called with ->execute();
820
+ *
821
+ * @param boolean $defer True if calls should not be executed right away.
822
+ */
823
+ public function setDefer($defer)
824
+ {
825
+ $this->deferExecution = $defer;
826
+ }
827
+ /**
828
+ * Whether or not to return raw requests
829
+ * @return boolean
830
+ */
831
+ public function shouldDefer()
832
+ {
833
+ return $this->deferExecution;
834
+ }
835
+ /**
836
+ * @return OAuth2 implementation
837
+ */
838
+ public function getOAuth2Service()
839
+ {
840
+ if (!isset($this->auth)) {
841
+ $this->auth = $this->createOAuth2Service();
842
+ }
843
+ return $this->auth;
844
+ }
845
+ /**
846
+ * create a default google auth object
847
+ */
848
+ protected function createOAuth2Service()
849
+ {
850
+ $auth = new OAuth2(['clientId' => $this->getClientId(), 'clientSecret' => $this->getClientSecret(), 'authorizationUri' => self::OAUTH2_AUTH_URL, 'tokenCredentialUri' => self::OAUTH2_TOKEN_URI, 'redirectUri' => $this->getRedirectUri(), 'issuer' => $this->config['client_id'], 'signingKey' => $this->config['signing_key'], 'signingAlgorithm' => $this->config['signing_algorithm']]);
851
+ return $auth;
852
+ }
853
+ /**
854
+ * Set the Cache object
855
+ * @param CacheItemPoolInterface $cache
856
+ */
857
+ public function setCache(CacheItemPoolInterface $cache)
858
+ {
859
+ $this->cache = $cache;
860
+ }
861
+ /**
862
+ * @return CacheItemPoolInterface
863
+ */
864
+ public function getCache()
865
+ {
866
+ if (!$this->cache) {
867
+ $this->cache = $this->createDefaultCache();
868
+ }
869
+ return $this->cache;
870
+ }
871
+ /**
872
+ * @param array $cacheConfig
873
+ */
874
+ public function setCacheConfig(array $cacheConfig)
875
+ {
876
+ $this->config['cache_config'] = $cacheConfig;
877
+ }
878
+ /**
879
+ * Set the Logger object
880
+ * @param LoggerInterface $logger
881
+ */
882
+ public function setLogger(LoggerInterface $logger)
883
+ {
884
+ $this->logger = $logger;
885
+ }
886
+ /**
887
+ * @return LoggerInterface
888
+ */
889
+ public function getLogger()
890
+ {
891
+ if (!isset($this->logger)) {
892
+ $this->logger = $this->createDefaultLogger();
893
+ }
894
+ return $this->logger;
895
+ }
896
+ protected function createDefaultLogger()
897
+ {
898
+ $logger = new Logger('google-api-php-client');
899
+ if ($this->isAppEngine()) {
900
+ $handler = new MonologSyslogHandler('app', \LOG_USER, Logger::NOTICE);
901
+ } else {
902
+ $handler = new MonologStreamHandler('php://stderr', Logger::NOTICE);
903
+ }
904
+ $logger->pushHandler($handler);
905
+ return $logger;
906
+ }
907
+ protected function createDefaultCache()
908
+ {
909
+ return new MemoryCacheItemPool();
910
+ }
911
+ /**
912
+ * Set the Http Client object
913
+ * @param ClientInterface $http
914
+ */
915
+ public function setHttpClient(ClientInterface $http)
916
+ {
917
+ $this->http = $http;
918
+ }
919
+ /**
920
+ * @return ClientInterface
921
+ */
922
+ public function getHttpClient()
923
+ {
924
+ if (null === $this->http) {
925
+ $this->http = $this->createDefaultHttpClient();
926
+ }
927
+ return $this->http;
928
+ }
929
+ /**
930
+ * Set the API format version.
931
+ *
932
+ * `true` will use V2, which may return more useful error messages.
933
+ *
934
+ * @param bool $value
935
+ */
936
+ public function setApiFormatV2($value)
937
+ {
938
+ $this->config['api_format_v2'] = (bool) $value;
939
+ }
940
+ protected function createDefaultHttpClient()
941
+ {
942
+ $guzzleVersion = null;
943
+ if (\defined('\\SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) {
944
+ $guzzleVersion = ClientInterface::MAJOR_VERSION;
945
+ } elseif (\defined('\\SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::VERSION')) {
946
+ $guzzleVersion = (int) \substr(ClientInterface::VERSION, 0, 1);
947
+ }
948
+ if (5 === $guzzleVersion) {
949
+ $options = ['base_url' => $this->config['base_path'], 'defaults' => ['exceptions' => \false]];
950
+ if ($this->isAppEngine()) {
951
+ // set StreamHandler on AppEngine by default
952
+ $options['handler'] = new StreamHandler();
953
+ $options['defaults']['verify'] = '/etc/ca-certificates.crt';
954
+ }
955
+ } elseif (6 === $guzzleVersion || 7 === $guzzleVersion) {
956
+ // guzzle 6 or 7
957
+ $options = ['base_uri' => $this->config['base_path'], 'http_errors' => \false];
958
+ } else {
959
+ throw new LogicException('Could not find supported version of Guzzle.');
960
+ }
961
+ return new GuzzleClient($options);
962
+ }
963
+ /**
964
+ * @return FetchAuthTokenCache
965
+ */
966
+ private function createApplicationDefaultCredentials()
967
+ {
968
+ $scopes = $this->prepareScopes();
969
+ $sub = $this->config['subject'];
970
+ $signingKey = $this->config['signing_key'];
971
+ // create credentials using values supplied in setAuthConfig
972
+ if ($signingKey) {
973
+ $serviceAccountCredentials = array('client_id' => $this->config['client_id'], 'client_email' => $this->config['client_email'], 'private_key' => $signingKey, 'type' => 'service_account', 'quota_project_id' => $this->config['quota_project']);
974
+ $credentials = CredentialsLoader::makeCredentials($scopes, $serviceAccountCredentials);
975
+ } else {
976
+ // When $sub is provided, we cannot pass cache classes to ::getCredentials
977
+ // because FetchAuthTokenCache::setSub does not exist.
978
+ // The result is when $sub is provided, calls to ::onGce are not cached.
979
+ $credentials = ApplicationDefaultCredentials::getCredentials($scopes, null, $sub ? null : $this->config['cache_config'], $sub ? null : $this->getCache(), $this->config['quota_project']);
980
+ }
981
+ // for service account domain-wide authority (impersonating a user)
982
+ // @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount
983
+ if ($sub) {
984
+ if (!$credentials instanceof ServiceAccountCredentials) {
985
+ throw new DomainException('domain-wide authority requires service account credentials');
986
+ }
987
+ $credentials->setSub($sub);
988
+ }
989
+ // If we are not using FetchAuthTokenCache yet, create it now
990
+ if (!$credentials instanceof FetchAuthTokenCache) {
991
+ $credentials = new FetchAuthTokenCache($credentials, $this->config['cache_config'], $this->getCache());
992
+ }
993
+ return $credentials;
994
+ }
995
+ protected function getAuthHandler()
996
+ {
997
+ // Be very careful using the cache, as the underlying auth library's cache
998
+ // implementation is naive, and the cache keys do not account for user
999
+ // sessions.
1000
+ //
1001
+ // @see https://github.com/google/google-api-php-client/issues/821
1002
+ return AuthHandlerFactory::build($this->getCache(), $this->config['cache_config']);
1003
+ }
1004
+ private function createUserRefreshCredentials($scope, $refreshToken)
1005
+ {
1006
+ $creds = \array_filter(array('client_id' => $this->getClientId(), 'client_secret' => $this->getClientSecret(), 'refresh_token' => $refreshToken));
1007
+ return new UserRefreshCredentials($scope, $creds);
1008
+ }
1009
+ }
third-party/google/apiclient/src/Collection.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\Google;
4
+
5
+ /**
6
+ * Extension to the regular Google\Model that automatically
7
+ * exposes the items array for iteration, so you can just
8
+ * iterate over the object rather than a reference inside.
9
+ */
10
+ class Collection extends \SimpleCalendar\plugin_deps\Google\Model implements \Iterator, \Countable
11
+ {
12
+ protected $collection_key = 'items';
13
+ public function rewind()
14
+ {
15
+ if (isset($this->{$this->collection_key}) && \is_array($this->{$this->collection_key})) {
16
+ \reset($this->{$this->collection_key});
17
+ }
18
+ }
19
+ public function current()
20
+ {
21
+ $this->coerceType($this->key());
22
+ if (\is_array($this->{$this->collection_key})) {
23
+ return \current($this->{$this->collection_key});
24
+ }
25
+ }
26
+ public function key()
27
+ {
28
+ if (isset($this->{$this->collection_key}) && \is_array($this->{$this->collection_key})) {
29
+ return \key($this->{$this->collection_key});
30
+ }
31
+ }
32
+ public function next()
33
+ {
34
+ return \next($this->{$this->collection_key});
35
+ }
36
+ public function valid()
37
+ {
38
+ $key = $this->key();
39
+ return $key !== null && $key !== \false;
40
+ }
41
+ public function count()
42
+ {
43
+ if (!isset($this->{$this->collection_key})) {
44
+ return 0;
45
+ }
46
+ return \count($this->{$this->collection_key});
47
+ }
48
+ public function offsetExists($offset)
49
+ {
50
+ if (!\is_numeric($offset)) {
51
+ return parent::offsetExists($offset);
52
+ }
53
+ return isset($this->{$this->collection_key}[$offset]);
54
+ }
55
+ public function offsetGet($offset)
56
+ {
57
+ if (!\is_numeric($offset)) {
58
+ return parent::offsetGet($offset);
59
+ }
60
+ $this->coerceType($offset);
61
+ return $this->{$this->collection_key}[$offset];
62
+ }
63
+ public function offsetSet($offset, $value)
64
+ {
65
+ if (!\is_numeric($offset)) {
66
+ return parent::offsetSet($offset, $value);
67
+ }
68
+ $this->{$this->collection_key}[$offset] = $value;
69
+ }
70
+ public function offsetUnset($offset)
71
+ {
72
+ if (!\is_numeric($offset)) {
73
+ return parent::offsetUnset($offset);
74
+ }
75
+ unset($this->{$this->collection_key}[$offset]);
76
+ }
77
+ private function coerceType($offset)
78
+ {
79
+ $keyType = $this->keyType($this->collection_key);
80
+ if ($keyType && !\is_object($this->{$this->collection_key}[$offset])) {
81
+ $this->{$this->collection_key}[$offset] = new $keyType($this->{$this->collection_key}[$offset]);
82
+ }
83
+ }
84
+ }
third-party/google/apiclient/src/Exception.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2013 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google;
19
+
20
+ use Exception as BaseException;
21
+ class Exception extends BaseException
22
+ {
23
+ }
third-party/google/apiclient/src/Http/Batch.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2012 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Http;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Client;
21
+ use SimpleCalendar\plugin_deps\Google\Http\REST;
22
+ use SimpleCalendar\plugin_deps\Google\Service\Exception as GoogleServiceException;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
25
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Response;
26
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
27
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
28
+ /**
29
+ * Class to handle batched requests to the Google API service.
30
+ *
31
+ * Note that calls to `Google\Http\Batch::execute()` do not clear the queued
32
+ * requests. To start a new batch, be sure to create a new instance of this
33
+ * class.
34
+ */
35
+ class Batch
36
+ {
37
+ const BATCH_PATH = 'batch';
38
+ private static $CONNECTION_ESTABLISHED_HEADERS = array("HTTP/1.0 200 Connection established\r\n\r\n", "HTTP/1.1 200 Connection established\r\n\r\n");
39
+ /** @var string Multipart Boundary. */
40
+ private $boundary;
41
+ /** @var array service requests to be executed. */
42
+ private $requests = array();
43
+ /** @var Client */
44
+ private $client;
45
+ private $rootUrl;
46
+ private $batchPath;
47
+ public function __construct(Client $client, $boundary = \false, $rootUrl = null, $batchPath = null)
48
+ {
49
+ $this->client = $client;
50
+ $this->boundary = $boundary ?: \mt_rand();
51
+ $this->rootUrl = \rtrim($rootUrl ?: $this->client->getConfig('base_path'), '/');
52
+ $this->batchPath = $batchPath ?: self::BATCH_PATH;
53
+ }
54
+ public function add(RequestInterface $request, $key = \false)
55
+ {
56
+ if (\false == $key) {
57
+ $key = \mt_rand();
58
+ }
59
+ $this->requests[$key] = $request;
60
+ }
61
+ public function execute()
62
+ {
63
+ $body = '';
64
+ $classes = array();
65
+ $batchHttpTemplate = <<<EOF
66
+ --%s
67
+ Content-Type: application/http
68
+ Content-Transfer-Encoding: binary
69
+ MIME-Version: 1.0
70
+ Content-ID: %s
71
+
72
+ %s
73
+ %s%s
74
+
75
+
76
+ EOF;
77
+ /** @var RequestInterface $req */
78
+ foreach ($this->requests as $key => $request) {
79
+ $firstLine = \sprintf('%s %s HTTP/%s', $request->getMethod(), $request->getRequestTarget(), $request->getProtocolVersion());
80
+ $content = (string) $request->getBody();
81
+ $headers = '';
82
+ foreach ($request->getHeaders() as $name => $values) {
83
+ $headers .= \sprintf("%s:%s\r\n", $name, \implode(', ', $values));
84
+ }
85
+ $body .= \sprintf($batchHttpTemplate, $this->boundary, $key, $firstLine, $headers, $content ? "\n" . $content : '');
86
+ $classes['response-' . $key] = $request->getHeaderLine('X-Php-Expected-Class');
87
+ }
88
+ $body .= "--{$this->boundary}--";
89
+ $body = \trim($body);
90
+ $url = $this->rootUrl . '/' . $this->batchPath;
91
+ $headers = array('Content-Type' => \sprintf('multipart/mixed; boundary=%s', $this->boundary), 'Content-Length' => \strlen($body));
92
+ $request = new Request('POST', $url, $headers, $body);
93
+ $response = $this->client->execute($request);
94
+ return $this->parseResponse($response, $classes);
95
+ }
96
+ public function parseResponse(ResponseInterface $response, $classes = array())
97
+ {
98
+ $contentType = $response->getHeaderLine('content-type');
99
+ $contentType = \explode(';', $contentType);
100
+ $boundary = \false;
101
+ foreach ($contentType as $part) {
102
+ $part = \explode('=', $part, 2);
103
+ if (isset($part[0]) && 'boundary' == \trim($part[0])) {
104
+ $boundary = $part[1];
105
+ }
106
+ }
107
+ $body = (string) $response->getBody();
108
+ if (!empty($body)) {
109
+ $body = \str_replace("--{$boundary}--", "--{$boundary}", $body);
110
+ $parts = \explode("--{$boundary}", $body);
111
+ $responses = array();
112
+ $requests = \array_values($this->requests);
113
+ foreach ($parts as $i => $part) {
114
+ $part = \trim($part);
115
+ if (!empty($part)) {
116
+ list($rawHeaders, $part) = \explode("\r\n\r\n", $part, 2);
117
+ $headers = $this->parseRawHeaders($rawHeaders);
118
+ $status = \substr($part, 0, \strpos($part, "\n"));
119
+ $status = \explode(" ", $status);
120
+ $status = $status[1];
121
+ list($partHeaders, $partBody) = $this->parseHttpResponse($part, \false);
122
+ $response = new Response($status, $partHeaders, Psr7\stream_for($partBody));
123
+ // Need content id.
124
+ $key = $headers['content-id'];
125
+ try {
126
+ $response = REST::decodeHttpResponse($response, $requests[$i - 1]);
127
+ } catch (GoogleServiceException $e) {
128
+ // Store the exception as the response, so successful responses
129
+ // can be processed.
130
+ $response = $e;
131
+ }
132
+ $responses[$key] = $response;
133
+ }
134
+ }
135
+ return $responses;
136
+ }
137
+ return null;
138
+ }
139
+ private function parseRawHeaders($rawHeaders)
140
+ {
141
+ $headers = array();
142
+ $responseHeaderLines = \explode("\r\n", $rawHeaders);
143
+ foreach ($responseHeaderLines as $headerLine) {
144
+ if ($headerLine && \strpos($headerLine, ':') !== \false) {
145
+ list($header, $value) = \explode(': ', $headerLine, 2);
146
+ $header = \strtolower($header);
147
+ if (isset($headers[$header])) {
148
+ $headers[$header] .= "\n" . $value;
149
+ } else {
150
+ $headers[$header] = $value;
151
+ }
152
+ }
153
+ }
154
+ return $headers;
155
+ }
156
+ /**
157
+ * Used by the IO lib and also the batch processing.
158
+ *
159
+ * @param $respData
160
+ * @param $headerSize
161
+ * @return array
162
+ */
163
+ private function parseHttpResponse($respData, $headerSize)
164
+ {
165
+ // check proxy header
166
+ foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) {
167
+ if (\stripos($respData, $established_header) !== \false) {
168
+ // existed, remove it
169
+ $respData = \str_ireplace($established_header, '', $respData);
170
+ // Subtract the proxy header size unless the cURL bug prior to 7.30.0
171
+ // is present which prevented the proxy header size from being taken into
172
+ // account.
173
+ // @TODO look into this
174
+ // if (!$this->needsQuirk()) {
175
+ // $headerSize -= strlen($established_header);
176
+ // }
177
+ break;
178
+ }
179
+ }
180
+ if ($headerSize) {
181
+ $responseBody = \substr($respData, $headerSize);
182
+ $responseHeaders = \substr($respData, 0, $headerSize);
183
+ } else {
184
+ $responseSegments = \explode("\r\n\r\n", $respData, 2);
185
+ $responseHeaders = $responseSegments[0];
186
+ $responseBody = isset($responseSegments[1]) ? $responseSegments[1] : null;
187
+ }
188
+ $responseHeaders = $this->parseRawHeaders($responseHeaders);
189
+ return array($responseHeaders, $responseBody);
190
+ }
191
+ }
third-party/google/apiclient/src/Http/MediaFileUpload.php ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2012 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Http;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Client;
21
+ use SimpleCalendar\plugin_deps\Google\Http\REST;
22
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
25
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Uri;
26
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
27
+ /**
28
+ * Manage large file uploads, which may be media but can be any type
29
+ * of sizable data.
30
+ */
31
+ class MediaFileUpload
32
+ {
33
+ const UPLOAD_MEDIA_TYPE = 'media';
34
+ const UPLOAD_MULTIPART_TYPE = 'multipart';
35
+ const UPLOAD_RESUMABLE_TYPE = 'resumable';
36
+ /** @var string $mimeType */
37
+ private $mimeType;
38
+ /** @var string $data */
39
+ private $data;
40
+ /** @var bool $resumable */
41
+ private $resumable;
42
+ /** @var int $chunkSize */
43
+ private $chunkSize;
44
+ /** @var int $size */
45
+ private $size;
46
+ /** @var string $resumeUri */
47
+ private $resumeUri;
48
+ /** @var int $progress */
49
+ private $progress;
50
+ /** @var Client */
51
+ private $client;
52
+ /** @var RequestInterface */
53
+ private $request;
54
+ /** @var string */
55
+ private $boundary;
56
+ /**
57
+ * Result code from last HTTP call
58
+ * @var int
59
+ */
60
+ private $httpResultCode;
61
+ /**
62
+ * @param Client $client
63
+ * @param RequestInterface $request
64
+ * @param string $mimeType
65
+ * @param string $data The bytes you want to upload.
66
+ * @param bool $resumable
67
+ * @param bool $chunkSize File will be uploaded in chunks of this many bytes.
68
+ * only used if resumable=True
69
+ */
70
+ public function __construct(Client $client, RequestInterface $request, $mimeType, $data, $resumable = \false, $chunkSize = \false)
71
+ {
72
+ $this->client = $client;
73
+ $this->request = $request;
74
+ $this->mimeType = $mimeType;
75
+ $this->data = $data;
76
+ $this->resumable = $resumable;
77
+ $this->chunkSize = $chunkSize;
78
+ $this->progress = 0;
79
+ $this->process();
80
+ }
81
+ /**
82
+ * Set the size of the file that is being uploaded.
83
+ * @param $size - int file size in bytes
84
+ */
85
+ public function setFileSize($size)
86
+ {
87
+ $this->size = $size;
88
+ }
89
+ /**
90
+ * Return the progress on the upload
91
+ * @return int progress in bytes uploaded.
92
+ */
93
+ public function getProgress()
94
+ {
95
+ return $this->progress;
96
+ }
97
+ /**
98
+ * Send the next part of the file to upload.
99
+ * @param string|bool $chunk Optional. The next set of bytes to send. If false will
100
+ * use $data passed at construct time.
101
+ */
102
+ public function nextChunk($chunk = \false)
103
+ {
104
+ $resumeUri = $this->getResumeUri();
105
+ if (\false == $chunk) {
106
+ $chunk = \substr($this->data, $this->progress, $this->chunkSize);
107
+ }
108
+ $lastBytePos = $this->progress + \strlen($chunk) - 1;
109
+ $headers = array('content-range' => "bytes {$this->progress}-{$lastBytePos}/{$this->size}", 'content-length' => \strlen($chunk), 'expect' => '');
110
+ $request = new Request('PUT', $resumeUri, $headers, Psr7\stream_for($chunk));
111
+ return $this->makePutRequest($request);
112
+ }
113
+ /**
114
+ * Return the HTTP result code from the last call made.
115
+ * @return int code
116
+ */
117
+ public function getHttpResultCode()
118
+ {
119
+ return $this->httpResultCode;
120
+ }
121
+ /**
122
+ * Sends a PUT-Request to google drive and parses the response,
123
+ * setting the appropiate variables from the response()
124
+ *
125
+ * @param RequestInterface $request the Request which will be send
126
+ *
127
+ * @return false|mixed false when the upload is unfinished or the decoded http response
128
+ *
129
+ */
130
+ private function makePutRequest(RequestInterface $request)
131
+ {
132
+ $response = $this->client->execute($request);
133
+ $this->httpResultCode = $response->getStatusCode();
134
+ if (308 == $this->httpResultCode) {
135
+ // Track the amount uploaded.
136
+ $range = $response->getHeaderLine('range');
137
+ if ($range) {
138
+ $range_array = \explode('-', $range);
139
+ $this->progress = $range_array[1] + 1;
140
+ }
141
+ // Allow for changing upload URLs.
142
+ $location = $response->getHeaderLine('location');
143
+ if ($location) {
144
+ $this->resumeUri = $location;
145
+ }
146
+ // No problems, but upload not complete.
147
+ return \false;
148
+ }
149
+ return REST::decodeHttpResponse($response, $this->request);
150
+ }
151
+ /**
152
+ * Resume a previously unfinished upload
153
+ * @param $resumeUri the resume-URI of the unfinished, resumable upload.
154
+ */
155
+ public function resume($resumeUri)
156
+ {
157
+ $this->resumeUri = $resumeUri;
158
+ $headers = array('content-range' => "bytes */{$this->size}", 'content-length' => 0);
159
+ $httpRequest = new Request('PUT', $this->resumeUri, $headers);
160
+ return $this->makePutRequest($httpRequest);
161
+ }
162
+ /**
163
+ * @return RequestInterface
164
+ * @visible for testing
165
+ */
166
+ private function process()
167
+ {
168
+ $this->transformToUploadUrl();
169
+ $request = $this->request;
170
+ $postBody = '';
171
+ $contentType = \false;
172
+ $meta = (string) $request->getBody();
173
+ $meta = \is_string($meta) ? \json_decode($meta, \true) : $meta;
174
+ $uploadType = $this->getUploadType($meta);
175
+ $request = $request->withUri(Uri::withQueryValue($request->getUri(), 'uploadType', $uploadType));
176
+ $mimeType = $this->mimeType ?: $request->getHeaderLine('content-type');
177
+ if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
178
+ $contentType = $mimeType;
179
+ $postBody = \is_string($meta) ? $meta : \json_encode($meta);
180
+ } else {
181
+ if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
182
+ $contentType = $mimeType;
183
+ $postBody = $this->data;
184
+ } else {
185
+ if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
186
+ // This is a multipart/related upload.
187
+ $boundary = $this->boundary ?: \mt_rand();
188
+ $boundary = \str_replace('"', '', $boundary);
189
+ $contentType = 'multipart/related; boundary=' . $boundary;
190
+ $related = "--{$boundary}\r\n";
191
+ $related .= "Content-Type: application/json; charset=UTF-8\r\n";
192
+ $related .= "\r\n" . \json_encode($meta) . "\r\n";
193
+ $related .= "--{$boundary}\r\n";
194
+ $related .= "Content-Type: {$mimeType}\r\n";
195
+ $related .= "Content-Transfer-Encoding: base64\r\n";
196
+ $related .= "\r\n" . \base64_encode($this->data) . "\r\n";
197
+ $related .= "--{$boundary}--";
198
+ $postBody = $related;
199
+ }
200
+ }
201
+ }
202
+ $request = $request->withBody(Psr7\stream_for($postBody));
203
+ if (isset($contentType) && $contentType) {
204
+ $request = $request->withHeader('content-type', $contentType);
205
+ }
206
+ return $this->request = $request;
207
+ }
208
+ /**
209
+ * Valid upload types:
210
+ * - resumable (UPLOAD_RESUMABLE_TYPE)
211
+ * - media (UPLOAD_MEDIA_TYPE)
212
+ * - multipart (UPLOAD_MULTIPART_TYPE)
213
+ * @param $meta
214
+ * @return string
215
+ * @visible for testing
216
+ */
217
+ public function getUploadType($meta)
218
+ {
219
+ if ($this->resumable) {
220
+ return self::UPLOAD_RESUMABLE_TYPE;
221
+ }
222
+ if (\false == $meta && $this->data) {
223
+ return self::UPLOAD_MEDIA_TYPE;
224
+ }
225
+ return self::UPLOAD_MULTIPART_TYPE;
226
+ }
227
+ public function getResumeUri()
228
+ {
229
+ if (null === $this->resumeUri) {
230
+ $this->resumeUri = $this->fetchResumeUri();
231
+ }
232
+ return $this->resumeUri;
233
+ }
234
+ private function fetchResumeUri()
235
+ {
236
+ $body = $this->request->getBody();
237
+ if ($body) {
238
+ $headers = array('content-type' => 'application/json; charset=UTF-8', 'content-length' => $body->getSize(), 'x-upload-content-type' => $this->mimeType, 'x-upload-content-length' => $this->size, 'expect' => '');
239
+ foreach ($headers as $key => $value) {
240
+ $this->request = $this->request->withHeader($key, $value);
241
+ }
242
+ }
243
+ $response = $this->client->execute($this->request, \false);
244
+ $location = $response->getHeaderLine('location');
245
+ $code = $response->getStatusCode();
246
+ if (200 == $code && \true == $location) {
247
+ return $location;
248
+ }
249
+ $message = $code;
250
+ $body = \json_decode((string) $this->request->getBody(), \true);
251
+ if (isset($body['error']['errors'])) {
252
+ $message .= ': ';
253
+ foreach ($body['error']['errors'] as $error) {
254
+ $message .= "{$error['domain']}, {$error['message']};";
255
+ }
256
+ $message = \rtrim($message, ';');
257
+ }
258
+ $error = "Failed to start the resumable upload (HTTP {$message})";
259
+ $this->client->getLogger()->error($error);
260
+ throw new GoogleException($error);
261
+ }
262
+ private function transformToUploadUrl()
263
+ {
264
+ $parts = \parse_url((string) $this->request->getUri());
265
+ if (!isset($parts['path'])) {
266
+ $parts['path'] = '';
267
+ }
268
+ $parts['path'] = '/upload' . $parts['path'];
269
+ $uri = Uri::fromParts($parts);
270
+ $this->request = $this->request->withUri($uri);
271
+ }
272
+ public function setChunkSize($chunkSize)
273
+ {
274
+ $this->chunkSize = $chunkSize;
275
+ }
276
+ public function getRequest()
277
+ {
278
+ return $this->request;
279
+ }
280
+ }
third-party/google/apiclient/src/Http/REST.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Http;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
21
+ use SimpleCalendar\plugin_deps\Google\Client;
22
+ use SimpleCalendar\plugin_deps\Google\Task\Runner;
23
+ use SimpleCalendar\plugin_deps\Google\Service\Exception as GoogleServiceException;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
25
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\RequestException;
26
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Response;
27
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
28
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
29
+ /**
30
+ * This class implements the RESTful transport of apiServiceRequest()'s
31
+ */
32
+ class REST
33
+ {
34
+ /**
35
+ * Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries
36
+ * when errors occur.
37
+ *
38
+ * @param Client $client
39
+ * @param RequestInterface $req
40
+ * @param string $expectedClass
41
+ * @param array $config
42
+ * @param array $retryMap
43
+ * @return array decoded result
44
+ * @throws \Google\Service\Exception on server side error (ie: not authenticated,
45
+ * invalid or malformed post body, invalid url)
46
+ */
47
+ public static function execute(ClientInterface $client, RequestInterface $request, $expectedClass = null, $config = array(), $retryMap = null)
48
+ {
49
+ $runner = new Runner($config, \sprintf('%s %s', $request->getMethod(), (string) $request->getUri()), array(\get_class(), 'doExecute'), array($client, $request, $expectedClass));
50
+ if (null !== $retryMap) {
51
+ $runner->setRetryMap($retryMap);
52
+ }
53
+ return $runner->run();
54
+ }
55
+ /**
56
+ * Executes a Psr\Http\Message\RequestInterface
57
+ *
58
+ * @param Client $client
59
+ * @param RequestInterface $request
60
+ * @param string $expectedClass
61
+ * @return array decoded result
62
+ * @throws \Google\Service\Exception on server side error (ie: not authenticated,
63
+ * invalid or malformed post body, invalid url)
64
+ */
65
+ public static function doExecute(ClientInterface $client, RequestInterface $request, $expectedClass = null)
66
+ {
67
+ try {
68
+ $httpHandler = HttpHandlerFactory::build($client);
69
+ $response = $httpHandler($request);
70
+ } catch (RequestException $e) {
71
+ // if Guzzle throws an exception, catch it and handle the response
72
+ if (!$e->hasResponse()) {
73
+ throw $e;
74
+ }
75
+ $response = $e->getResponse();
76
+ // specific checking for Guzzle 5: convert to PSR7 response
77
+ if ($response instanceof \SimpleCalendar\plugin_deps\GuzzleHttp\Message\ResponseInterface) {
78
+ $response = new Response($response->getStatusCode(), $response->getHeaders() ?: [], $response->getBody(), $response->getProtocolVersion(), $response->getReasonPhrase());
79
+ }
80
+ }
81
+ return self::decodeHttpResponse($response, $request, $expectedClass);
82
+ }
83
+ /**
84
+ * Decode an HTTP Response.
85
+ * @static
86
+ * @throws \Google\Service\Exception
87
+ * @param RequestInterface $response The http response to be decoded.
88
+ * @param ResponseInterface $response
89
+ * @param string $expectedClass
90
+ * @return mixed|null
91
+ */
92
+ public static function decodeHttpResponse(ResponseInterface $response, RequestInterface $request = null, $expectedClass = null)
93
+ {
94
+ $code = $response->getStatusCode();
95
+ // retry strategy
96
+ if (\intVal($code) >= 400) {
97
+ // if we errored out, it should be safe to grab the response body
98
+ $body = (string) $response->getBody();
99
+ // Check if we received errors, and add those to the Exception for convenience
100
+ throw new GoogleServiceException($body, $code, null, self::getResponseErrors($body));
101
+ }
102
+ // Ensure we only pull the entire body into memory if the request is not
103
+ // of media type
104
+ $body = self::decodeBody($response, $request);
105
+ if ($expectedClass = self::determineExpectedClass($expectedClass, $request)) {
106
+ $json = \json_decode($body, \true);
107
+ return new $expectedClass($json);
108
+ }
109
+ return $response;
110
+ }
111
+ private static function decodeBody(ResponseInterface $response, RequestInterface $request = null)
112
+ {
113
+ if (self::isAltMedia($request)) {
114
+ // don't decode the body, it's probably a really long string
115
+ return '';
116
+ }
117
+ return (string) $response->getBody();
118
+ }
119
+ private static function determineExpectedClass($expectedClass, RequestInterface $request = null)
120
+ {
121
+ // "false" is used to explicitly prevent an expected class from being returned
122
+ if (\false === $expectedClass) {
123
+ return null;
124
+ }
125
+ // if we don't have a request, we just use what's passed in
126
+ if (null === $request) {
127
+ return $expectedClass;
128
+ }
129
+ // return what we have in the request header if one was not supplied
130
+ return $expectedClass ?: $request->getHeaderLine('X-Php-Expected-Class');
131
+ }
132
+ private static function getResponseErrors($body)
133
+ {
134
+ $json = \json_decode($body, \true);
135
+ if (isset($json['error']['errors'])) {
136
+ return $json['error']['errors'];
137
+ }
138
+ return null;
139
+ }
140
+ private static function isAltMedia(RequestInterface $request = null)
141
+ {
142
+ if ($request && ($qs = $request->getUri()->getQuery())) {
143
+ \parse_str($qs, $query);
144
+ if (isset($query['alt']) && $query['alt'] == 'media') {
145
+ return \true;
146
+ }
147
+ }
148
+ return \false;
149
+ }
150
+ }
third-party/google/apiclient/src/Model.php ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2011 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
21
+ use ReflectionObject;
22
+ use ReflectionProperty;
23
+ use stdClass;
24
+ /**
25
+ * This class defines attributes, valid values, and usage which is generated
26
+ * from a given json schema.
27
+ * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
28
+ *
29
+ */
30
+ class Model implements \ArrayAccess
31
+ {
32
+ /**
33
+ * If you need to specify a NULL JSON value, use Google\Model::NULL_VALUE
34
+ * instead - it will be replaced when converting to JSON with a real null.
35
+ */
36
+ const NULL_VALUE = "{}gapi-php-null";
37
+ protected $internal_gapi_mappings = array();
38
+ protected $modelData = array();
39
+ protected $processed = array();
40
+ /**
41
+ * Polymorphic - accepts a variable number of arguments dependent
42
+ * on the type of the model subclass.
43
+ */
44
+ public final function __construct()
45
+ {
46
+ if (\func_num_args() == 1 && \is_array(\func_get_arg(0))) {
47
+ // Initialize the model with the array's contents.
48
+ $array = \func_get_arg(0);
49
+ $this->mapTypes($array);
50
+ }
51
+ $this->gapiInit();
52
+ }
53
+ /**
54
+ * Getter that handles passthrough access to the data array, and lazy object creation.
55
+ * @param string $key Property name.
56
+ * @return mixed The value if any, or null.
57
+ */
58
+ public function __get($key)
59
+ {
60
+ $keyType = $this->keyType($key);
61
+ $keyDataType = $this->dataType($key);
62
+ if ($keyType && !isset($this->processed[$key])) {
63
+ if (isset($this->modelData[$key])) {
64
+ $val = $this->modelData[$key];
65
+ } elseif ($keyDataType == 'array' || $keyDataType == 'map') {
66
+ $val = array();
67
+ } else {
68
+ $val = null;
69
+ }
70
+ if ($this->isAssociativeArray($val)) {
71
+ if ($keyDataType && 'map' == $keyDataType) {
72
+ foreach ($val as $arrayKey => $arrayItem) {
73
+ $this->modelData[$key][$arrayKey] = new $keyType($arrayItem);
74
+ }
75
+ } else {
76
+ $this->modelData[$key] = new $keyType($val);
77
+ }
78
+ } else {
79
+ if (\is_array($val)) {
80
+ $arrayObject = array();
81
+ foreach ($val as $arrayIndex => $arrayItem) {
82
+ $arrayObject[$arrayIndex] = new $keyType($arrayItem);
83
+ }
84
+ $this->modelData[$key] = $arrayObject;
85
+ }
86
+ }
87
+ $this->processed[$key] = \true;
88
+ }
89
+ return isset($this->modelData[$key]) ? $this->modelData[$key] : null;
90
+ }
91
+ /**
92
+ * Initialize this object's properties from an array.
93
+ *
94
+ * @param array $array Used to seed this object's properties.
95
+ * @return void
96
+ */
97
+ protected function mapTypes($array)
98
+ {
99
+ // Hard initialise simple types, lazy load more complex ones.
100
+ foreach ($array as $key => $val) {
101
+ if ($keyType = $this->keyType($key)) {
102
+ $dataType = $this->dataType($key);
103
+ if ($dataType == 'array' || $dataType == 'map') {
104
+ $this->{$key} = array();
105
+ foreach ($val as $itemKey => $itemVal) {
106
+ if ($itemVal instanceof $keyType) {
107
+ $this->{$key}[$itemKey] = $itemVal;
108
+ } else {
109
+ $this->{$key}[$itemKey] = new $keyType($itemVal);
110
+ }
111
+ }
112
+ } elseif ($val instanceof $keyType) {
113
+ $this->{$key} = $val;
114
+ } else {
115
+ $this->{$key} = new $keyType($val);
116
+ }
117
+ unset($array[$key]);
118
+ } elseif (\property_exists($this, $key)) {
119
+ $this->{$key} = $val;
120
+ unset($array[$key]);
121
+ } elseif (\property_exists($this, $camelKey = $this->camelCase($key))) {
122
+ // This checks if property exists as camelCase, leaving it in array as snake_case
123
+ // in case of backwards compatibility issues.
124
+ $this->{$camelKey} = $val;
125
+ }
126
+ }
127
+ $this->modelData = $array;
128
+ }
129
+ /**
130
+ * Blank initialiser to be used in subclasses to do post-construction initialisation - this
131
+ * avoids the need for subclasses to have to implement the variadics handling in their
132
+ * constructors.
133
+ */
134
+ protected function gapiInit()
135
+ {
136
+ return;
137
+ }
138
+ /**
139
+ * Create a simplified object suitable for straightforward
140
+ * conversion to JSON. This is relatively expensive
141
+ * due to the usage of reflection, but shouldn't be called
142
+ * a whole lot, and is the most straightforward way to filter.
143
+ */
144
+ public function toSimpleObject()
145
+ {
146
+ $object = new stdClass();
147
+ // Process all other data.
148
+ foreach ($this->modelData as $key => $val) {
149
+ $result = $this->getSimpleValue($val);
150
+ if ($result !== null) {
151
+ $object->{$key} = $this->nullPlaceholderCheck($result);
152
+ }
153
+ }
154
+ // Process all public properties.
155
+ $reflect = new ReflectionObject($this);
156
+ $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
157
+ foreach ($props as $member) {
158
+ $name = $member->getName();
159
+ $result = $this->getSimpleValue($this->{$name});
160
+ if ($result !== null) {
161
+ $name = $this->getMappedName($name);
162
+ $object->{$name} = $this->nullPlaceholderCheck($result);
163
+ }
164
+ }
165
+ return $object;
166
+ }
167
+ /**
168
+ * Handle different types of values, primarily
169
+ * other objects and map and array data types.
170
+ */
171
+ private function getSimpleValue($value)
172
+ {
173
+ if ($value instanceof \SimpleCalendar\plugin_deps\Google\Model) {
174
+ return $value->toSimpleObject();
175
+ } else {
176
+ if (\is_array($value)) {
177
+ $return = array();
178
+ foreach ($value as $key => $a_value) {
179
+ $a_value = $this->getSimpleValue($a_value);
180
+ if ($a_value !== null) {
181
+ $key = $this->getMappedName($key);
182
+ $return[$key] = $this->nullPlaceholderCheck($a_value);
183
+ }
184
+ }
185
+ return $return;
186
+ }
187
+ }
188
+ return $value;
189
+ }
190
+ /**
191
+ * Check whether the value is the null placeholder and return true null.
192
+ */
193
+ private function nullPlaceholderCheck($value)
194
+ {
195
+ if ($value === self::NULL_VALUE) {
196
+ return null;
197
+ }
198
+ return $value;
199
+ }
200
+ /**
201
+ * If there is an internal name mapping, use that.
202
+ */
203
+ private function getMappedName($key)
204
+ {
205
+ if (isset($this->internal_gapi_mappings, $this->internal_gapi_mappings[$key])) {
206
+ $key = $this->internal_gapi_mappings[$key];
207
+ }
208
+ return $key;
209
+ }
210
+ /**
211
+ * Returns true only if the array is associative.
212
+ * @param array $array
213
+ * @return bool True if the array is associative.
214
+ */
215
+ protected function isAssociativeArray($array)
216
+ {
217
+ if (!\is_array($array)) {
218
+ return \false;
219
+ }
220
+ $keys = \array_keys($array);
221
+ foreach ($keys as $key) {
222
+ if (\is_string($key)) {
223
+ return \true;
224
+ }
225
+ }
226
+ return \false;
227
+ }
228
+ /**
229
+ * Verify if $obj is an array.
230
+ * @throws \Google\Exception Thrown if $obj isn't an array.
231
+ * @param array $obj Items that should be validated.
232
+ * @param string $method Method expecting an array as an argument.
233
+ */
234
+ public function assertIsArray($obj, $method)
235
+ {
236
+ if ($obj && !\is_array($obj)) {
237
+ throw new GoogleException("Incorrect parameter type passed to {$method}(). Expected an array.");
238
+ }
239
+ }
240
+ public function offsetExists($offset)
241
+ {
242
+ return isset($this->{$offset}) || isset($this->modelData[$offset]);
243
+ }
244
+ public function offsetGet($offset)
245
+ {
246
+ return isset($this->{$offset}) ? $this->{$offset} : $this->__get($offset);
247
+ }
248
+ public function offsetSet($offset, $value)
249
+ {
250
+ if (\property_exists($this, $offset)) {
251
+ $this->{$offset} = $value;
252
+ } else {
253
+ $this->modelData[$offset] = $value;
254
+ $this->processed[$offset] = \true;
255
+ }
256
+ }
257
+ public function offsetUnset($offset)
258
+ {
259
+ unset($this->modelData[$offset]);
260
+ }
261
+ protected function keyType($key)
262
+ {
263
+ $keyType = $key . "Type";
264
+ // ensure keyType is a valid class
265
+ if (\property_exists($this, $keyType) && \class_exists($this->{$keyType})) {
266
+ return $this->{$keyType};
267
+ }
268
+ }
269
+ protected function dataType($key)
270
+ {
271
+ $dataType = $key . "DataType";
272
+ if (\property_exists($this, $dataType)) {
273
+ return $this->{$dataType};
274
+ }
275
+ }
276
+ public function __isset($key)
277
+ {
278
+ return isset($this->modelData[$key]);
279
+ }
280
+ public function __unset($key)
281
+ {
282
+ unset($this->modelData[$key]);
283
+ }
284
+ /**
285
+ * Convert a string to camelCase
286
+ * @param string $value
287
+ * @return string
288
+ */
289
+ private function camelCase($value)
290
+ {
291
+ $value = \ucwords(\str_replace(array('-', '_'), ' ', $value));
292
+ $value = \str_replace(' ', '', $value);
293
+ $value[0] = \strtolower($value[0]);
294
+ return $value;
295
+ }
296
+ }
third-party/google/apiclient/src/Service.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Http\Batch;
21
+ use TypeError;
22
+ class Service
23
+ {
24
+ public $batchPath;
25
+ public $rootUrl;
26
+ public $version;
27
+ public $servicePath;
28
+ public $availableScopes;
29
+ public $resource;
30
+ private $client;
31
+ public function __construct($clientOrConfig = [])
32
+ {
33
+ if ($clientOrConfig instanceof \SimpleCalendar\plugin_deps\Google\Client) {
34
+ $this->client = $clientOrConfig;
35
+ } elseif (\is_array($clientOrConfig)) {
36
+ $this->client = new \SimpleCalendar\plugin_deps\Google\Client($clientOrConfig ?: []);
37
+ } else {
38
+ $errorMessage = 'SimpleCalendar\\plugin_deps\\constructor must be array or instance of Google\\Client';
39
+ if (\class_exists('TypeError')) {
40
+ throw new TypeError($errorMessage);
41
+ }
42
+ \trigger_error($errorMessage, \E_USER_ERROR);
43
+ }
44
+ }
45
+ /**
46
+ * Return the associated Google\Client class.
47
+ * @return \Google\Client
48
+ */
49
+ public function getClient()
50
+ {
51
+ return $this->client;
52
+ }
53
+ /**
54
+ * Create a new HTTP Batch handler for this service
55
+ *
56
+ * @return Batch
57
+ */
58
+ public function createBatch()
59
+ {
60
+ return new Batch($this->client, \false, $this->rootUrl, $this->batchPath);
61
+ }
62
+ }
third-party/google/apiclient/src/Service/Exception.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2014 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Service;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
21
+ class Exception extends GoogleException
22
+ {
23
+ /**
24
+ * Optional list of errors returned in a JSON body of an HTTP error response.
25
+ */
26
+ protected $errors = array();
27
+ /**
28
+ * Override default constructor to add the ability to set $errors and a retry
29
+ * map.
30
+ *
31
+ * @param string $message
32
+ * @param int $code
33
+ * @param \Exception|null $previous
34
+ * @param [{string, string}] errors List of errors returned in an HTTP
35
+ * response. Defaults to [].
36
+ */
37
+ public function __construct($message, $code = 0, \SimpleCalendar\plugin_deps\Google\Service\Exception $previous = null, $errors = array())
38
+ {
39
+ if (\version_compare(\PHP_VERSION, '5.3.0') >= 0) {
40
+ parent::__construct($message, $code, $previous);
41
+ } else {
42
+ parent::__construct($message, $code);
43
+ }
44
+ $this->errors = $errors;
45
+ }
46
+ /**
47
+ * An example of the possible errors returned.
48
+ *
49
+ * {
50
+ * "domain": "global",
51
+ * "reason": "authError",
52
+ * "message": "Invalid Credentials",
53
+ * "locationType": "header",
54
+ * "location": "Authorization",
55
+ * }
56
+ *
57
+ * @return [{string, string}] List of errors return in an HTTP response or [].
58
+ */
59
+ public function getErrors()
60
+ {
61
+ return $this->errors;
62
+ }
63
+ }
third-party/google/apiclient/src/Service/Resource.php ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Service;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Model;
21
+ use SimpleCalendar\plugin_deps\Google\Http\MediaFileUpload;
22
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
23
+ use SimpleCalendar\plugin_deps\Google\Utils\UriTemplate;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
25
+ /**
26
+ * Implements the actual methods/resources of the discovered Google API using magic function
27
+ * calling overloading (__call()), which on call will see if the method name (plus.activities.list)
28
+ * is available in this service, and if so construct an apiHttpRequest representing it.
29
+ *
30
+ */
31
+ class Resource
32
+ {
33
+ // Valid query parameters that work, but don't appear in discovery.
34
+ private $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'));
35
+ /** @var string $rootUrl */
36
+ private $rootUrl;
37
+ /** @var \Google\Client $client */
38
+ private $client;
39
+ /** @var string $serviceName */
40
+ private $serviceName;
41
+ /** @var string $servicePath */
42
+ private $servicePath;
43
+ /** @var string $resourceName */
44
+ private $resourceName;
45
+ /** @var array $methods */
46
+ private $methods;
47
+ public function __construct($service, $serviceName, $resourceName, $resource)
48
+ {
49
+ $this->rootUrl = $service->rootUrl;
50
+ $this->client = $service->getClient();
51
+ $this->servicePath = $service->servicePath;
52
+ $this->serviceName = $serviceName;
53
+ $this->resourceName = $resourceName;
54
+ $this->methods = \is_array($resource) && isset($resource['methods']) ? $resource['methods'] : array($resourceName => $resource);
55
+ }
56
+ /**
57
+ * TODO: This function needs simplifying.
58
+ * @param $name
59
+ * @param $arguments
60
+ * @param $expectedClass - optional, the expected class name
61
+ * @return Request|$expectedClass
62
+ * @throws \Google\Exception
63
+ */
64
+ public function call($name, $arguments, $expectedClass = null)
65
+ {
66
+ if (!isset($this->methods[$name])) {
67
+ $this->client->getLogger()->error('Service method unknown', array('service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name));
68
+ throw new GoogleException("Unknown function: " . "{$this->serviceName}->{$this->resourceName}->{$name}()");
69
+ }
70
+ $method = $this->methods[$name];
71
+ $parameters = $arguments[0];
72
+ // postBody is a special case since it's not defined in the discovery
73
+ // document as parameter, but we abuse the param entry for storing it.
74
+ $postBody = null;
75
+ if (isset($parameters['postBody'])) {
76
+ if ($parameters['postBody'] instanceof Model) {
77
+ // In the cases the post body is an existing object, we want
78
+ // to use the smart method to create a simple object for
79
+ // for JSONification.
80
+ $parameters['postBody'] = $parameters['postBody']->toSimpleObject();
81
+ } else {
82
+ if (\is_object($parameters['postBody'])) {
83
+ // If the post body is another kind of object, we will try and
84
+ // wrangle it into a sensible format.
85
+ $parameters['postBody'] = $this->convertToArrayAndStripNulls($parameters['postBody']);
86
+ }
87
+ }
88
+ $postBody = (array) $parameters['postBody'];
89
+ unset($parameters['postBody']);
90
+ }
91
+ // TODO: optParams here probably should have been
92
+ // handled already - this may well be redundant code.
93
+ if (isset($parameters['optParams'])) {
94
+ $optParams = $parameters['optParams'];
95
+ unset($parameters['optParams']);
96
+ $parameters = \array_merge($parameters, $optParams);
97
+ }
98
+ if (!isset($method['parameters'])) {
99
+ $method['parameters'] = array();
100
+ }
101
+ $method['parameters'] = \array_merge($this->stackParameters, $method['parameters']);
102
+ foreach ($parameters as $key => $val) {
103
+ if ($key != 'postBody' && !isset($method['parameters'][$key])) {
104
+ $this->client->getLogger()->error('Service parameter unknown', array('service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'parameter' => $key));
105
+ throw new GoogleException("({$name}) unknown parameter: '{$key}'");
106
+ }
107
+ }
108
+ foreach ($method['parameters'] as $paramName => $paramSpec) {
109
+ if (isset($paramSpec['required']) && $paramSpec['required'] && !isset($parameters[$paramName])) {
110
+ $this->client->getLogger()->error('Service parameter missing', array('service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'parameter' => $paramName));
111
+ throw new GoogleException("({$name}) missing required param: '{$paramName}'");
112
+ }
113
+ if (isset($parameters[$paramName])) {
114
+ $value = $parameters[$paramName];
115
+ $parameters[$paramName] = $paramSpec;
116
+ $parameters[$paramName]['value'] = $value;
117
+ unset($parameters[$paramName]['required']);
118
+ } else {
119
+ // Ensure we don't pass nulls.
120
+ unset($parameters[$paramName]);
121
+ }
122
+ }
123
+ $this->client->getLogger()->info('Service Call', array('service' => $this->serviceName, 'resource' => $this->resourceName, 'method' => $name, 'arguments' => $parameters));
124
+ // build the service uri
125
+ $url = $this->createRequestUri($method['path'], $parameters);
126
+ // NOTE: because we're creating the request by hand,
127
+ // and because the service has a rootUrl property
128
+ // the "base_uri" of the Http Client is not accounted for
129
+ $request = new Request($method['httpMethod'], $url, ['content-type' => 'application/json'], $postBody ? \json_encode($postBody) : '');
130
+ // support uploads
131
+ if (isset($parameters['data'])) {
132
+ $mimeType = isset($parameters['mimeType']) ? $parameters['mimeType']['value'] : 'application/octet-stream';
133
+ $data = $parameters['data']['value'];
134
+ $upload = new MediaFileUpload($this->client, $request, $mimeType, $data);
135
+ // pull down the modified request
136
+ $request = $upload->getRequest();
137
+ }
138
+ // if this is a media type, we will return the raw response
139
+ // rather than using an expected class
140
+ if (isset($parameters['alt']) && $parameters['alt']['value'] == 'media') {
141
+ $expectedClass = null;
142
+ }
143
+ // if the client is marked for deferring, rather than
144
+ // execute the request, return the response
145
+ if ($this->client->shouldDefer()) {
146
+ // @TODO find a better way to do this
147
+ $request = $request->withHeader('X-Php-Expected-Class', $expectedClass);
148
+ return $request;
149
+ }
150
+ return $this->client->execute($request, $expectedClass);
151
+ }
152
+ protected function convertToArrayAndStripNulls($o)
153
+ {
154
+ $o = (array) $o;
155
+ foreach ($o as $k => $v) {
156
+ if ($v === null) {
157
+ unset($o[$k]);
158
+ } elseif (\is_object($v) || \is_array($v)) {
159
+ $o[$k] = $this->convertToArrayAndStripNulls($o[$k]);
160
+ }
161
+ }
162
+ return $o;
163
+ }
164
+ /**
165
+ * Parse/expand request parameters and create a fully qualified
166
+ * request uri.
167
+ * @static
168
+ * @param string $restPath
169
+ * @param array $params
170
+ * @return string $requestUrl
171
+ */
172
+ public function createRequestUri($restPath, $params)
173
+ {
174
+ // Override the default servicePath address if the $restPath use a /
175
+ if ('/' == \substr($restPath, 0, 1)) {
176
+ $requestUrl = \substr($restPath, 1);
177
+ } else {
178
+ $requestUrl = $this->servicePath . $restPath;
179
+ }
180
+ // code for leading slash
181
+ if ($this->rootUrl) {
182
+ if ('/' !== \substr($this->rootUrl, -1) && '/' !== \substr($requestUrl, 0, 1)) {
183
+ $requestUrl = '/' . $requestUrl;
184
+ }
185
+ $requestUrl = $this->rootUrl . $requestUrl;
186
+ }
187
+ $uriTemplateVars = array();
188
+ $queryVars = array();
189
+ foreach ($params as $paramName => $paramSpec) {
190
+ if ($paramSpec['type'] == 'boolean') {
191
+ $paramSpec['value'] = $paramSpec['value'] ? 'true' : 'false';
192
+ }
193
+ if ($paramSpec['location'] == 'path') {
194
+ $uriTemplateVars[$paramName] = $paramSpec['value'];
195
+ } else {
196
+ if ($paramSpec['location'] == 'query') {
197
+ if (\is_array($paramSpec['value'])) {
198
+ foreach ($paramSpec['value'] as $value) {
199
+ $queryVars[] = $paramName . '=' . \rawurlencode(\rawurldecode($value));
200
+ }
201
+ } else {
202
+ $queryVars[] = $paramName . '=' . \rawurlencode(\rawurldecode($paramSpec['value']));
203
+ }
204
+ }
205
+ }
206
+ }
207
+ if (\count($uriTemplateVars)) {
208
+ $uriTemplateParser = new UriTemplate();
209
+ $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
210
+ }
211
+ if (\count($queryVars)) {
212
+ $requestUrl .= '?' . \implode('&', $queryVars);
213
+ }
214
+ return $requestUrl;
215
+ }
216
+ }
third-party/google/apiclient/src/Task/Composer.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2020 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7
+ * use this file except in compliance with the License. You may obtain a copy of
8
+ * the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
+ * License for the specific language governing permissions and limitations under
16
+ * the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Task;
19
+
20
+ use SimpleCalendar\plugin_deps\Composer\Script\Event;
21
+ use SimpleCalendar\plugin_deps\Symfony\Component\Filesystem\Filesystem;
22
+ use SimpleCalendar\plugin_deps\Symfony\Component\Finder\Finder;
23
+ use InvalidArgumentException;
24
+ class Composer
25
+ {
26
+ /**
27
+ * @param Event $event Composer event passed in for any script method
28
+ * @param Filesystem $filesystem Optional. Used for testing.
29
+ */
30
+ public static function cleanup(Event $event, Filesystem $filesystem = null)
31
+ {
32
+ $composer = $event->getComposer();
33
+ $extra = $composer->getPackage()->getExtra();
34
+ $servicesToKeep = isset($extra['google/apiclient-services']) ? $extra['google/apiclient-services'] : [];
35
+ if ($servicesToKeep) {
36
+ $serviceDir = \sprintf('%s/google/apiclient-services/src/Google/Service', $composer->getConfig()->get('vendor-dir'));
37
+ self::verifyServicesToKeep($serviceDir, $servicesToKeep);
38
+ $finder = self::getServicesToRemove($serviceDir, $servicesToKeep);
39
+ $filesystem = $filesystem ?: new Filesystem();
40
+ if (0 !== ($count = \count($finder))) {
41
+ $event->getIO()->write(\sprintf('Removing %s google services', $count));
42
+ foreach ($finder as $file) {
43
+ $realpath = $file->getRealPath();
44
+ $filesystem->remove($realpath);
45
+ $filesystem->remove($realpath . '.php');
46
+ }
47
+ }
48
+ }
49
+ }
50
+ /**
51
+ * @throws InvalidArgumentException when the service doesn't exist
52
+ */
53
+ private static function verifyServicesToKeep($serviceDir, array $servicesToKeep)
54
+ {
55
+ $finder = (new Finder())->directories()->depth('== 0');
56
+ foreach ($servicesToKeep as $service) {
57
+ if (!\preg_match('/^[a-zA-Z0-9]*$/', $service)) {
58
+ throw new InvalidArgumentException(\sprintf('Invalid Google service name "%s"', $service));
59
+ }
60
+ try {
61
+ $finder->in($serviceDir . '/' . $service);
62
+ } catch (InvalidArgumentException $e) {
63
+ throw new InvalidArgumentException(\sprintf('Google service "%s" does not exist or was removed previously', $service));
64
+ }
65
+ }
66
+ }
67
+ private static function getServicesToRemove($serviceDir, array $servicesToKeep)
68
+ {
69
+ // find all files in the current directory
70
+ return (new Finder())->directories()->depth('== 0')->in($serviceDir)->exclude($servicesToKeep);
71
+ }
72
+ }
third-party/google/apiclient/src/Task/Exception.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2014 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Task;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Exception as GoogleException;
21
+ class Exception extends GoogleException
22
+ {
23
+ }
third-party/google/apiclient/src/Task/Retryable.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2014 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Task;
19
+
20
+ /**
21
+ * Interface for checking how many times a given task can be retried following
22
+ * a failure.
23
+ */
24
+ interface Retryable
25
+ {
26
+ }
third-party/google/apiclient/src/Task/Runner.php ADDED
@@ -0,0 +1,234 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2014 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Task;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Service\Exception as GoogleServiceException;
21
+ use SimpleCalendar\plugin_deps\Google\Task\Exception as GoogleTaskException;
22
+ /**
23
+ * A task runner with exponential backoff support.
24
+ *
25
+ * @see https://developers.google.com/drive/web/handle-errors#implementing_exponential_backoff
26
+ */
27
+ class Runner
28
+ {
29
+ const TASK_RETRY_NEVER = 0;
30
+ const TASK_RETRY_ONCE = 1;
31
+ const TASK_RETRY_ALWAYS = -1;
32
+ /**
33
+ * @var integer $maxDelay The max time (in seconds) to wait before a retry.
34
+ */
35
+ private $maxDelay = 60;
36
+ /**
37
+ * @var integer $delay The previous delay from which the next is calculated.
38
+ */
39
+ private $delay = 1;
40
+ /**
41
+ * @var integer $factor The base number for the exponential back off.
42
+ */
43
+ private $factor = 2;
44
+ /**
45
+ * @var float $jitter A random number between -$jitter and $jitter will be
46
+ * added to $factor on each iteration to allow for a better distribution of
47
+ * retries.
48
+ */
49
+ private $jitter = 0.5;
50
+ /**
51
+ * @var integer $attempts The number of attempts that have been tried so far.
52
+ */
53
+ private $attempts = 0;
54
+ /**
55
+ * @var integer $maxAttempts The max number of attempts allowed.
56
+ */
57
+ private $maxAttempts = 1;
58
+ /**
59
+ * @var callable $action The task to run and possibly retry.
60
+ */
61
+ private $action;
62
+ /**
63
+ * @var array $arguments The task arguments.
64
+ */
65
+ private $arguments;
66
+ /**
67
+ * @var array $retryMap Map of errors with retry counts.
68
+ */
69
+ protected $retryMap = [
70
+ '500' => self::TASK_RETRY_ALWAYS,
71
+ '503' => self::TASK_RETRY_ALWAYS,
72
+ 'rateLimitExceeded' => self::TASK_RETRY_ALWAYS,
73
+ 'userRateLimitExceeded' => self::TASK_RETRY_ALWAYS,
74
+ 6 => self::TASK_RETRY_ALWAYS,
75
+ // CURLE_COULDNT_RESOLVE_HOST
76
+ 7 => self::TASK_RETRY_ALWAYS,
77
+ // CURLE_COULDNT_CONNECT
78
+ 28 => self::TASK_RETRY_ALWAYS,
79
+ // CURLE_OPERATION_TIMEOUTED
80
+ 35 => self::TASK_RETRY_ALWAYS,
81
+ // CURLE_SSL_CONNECT_ERROR
82
+ 52 => self::TASK_RETRY_ALWAYS,
83
+ // CURLE_GOT_NOTHING
84
+ 'lighthouseError' => self::TASK_RETRY_NEVER,
85
+ ];
86
+ /**
87
+ * Creates a new task runner with exponential backoff support.
88
+ *
89
+ * @param array $config The task runner config
90
+ * @param string $name The name of the current task (used for logging)
91
+ * @param callable $action The task to run and possibly retry
92
+ * @param array $arguments The task arguments
93
+ * @throws \Google\Task\Exception when misconfigured
94
+ */
95
+ public function __construct($config, $name, $action, array $arguments = array())
96
+ {
97
+ if (isset($config['initial_delay'])) {
98
+ if ($config['initial_delay'] < 0) {
99
+ throw new GoogleTaskException('Task configuration `initial_delay` must not be negative.');
100
+ }
101
+ $this->delay = $config['initial_delay'];
102
+ }
103
+ if (isset($config['max_delay'])) {
104
+ if ($config['max_delay'] <= 0) {
105
+ throw new GoogleTaskException('Task configuration `max_delay` must be greater than 0.');
106
+ }
107
+ $this->maxDelay = $config['max_delay'];
108
+ }
109
+ if (isset($config['factor'])) {
110
+ if ($config['factor'] <= 0) {
111
+ throw new GoogleTaskException('Task configuration `factor` must be greater than 0.');
112
+ }
113
+ $this->factor = $config['factor'];
114
+ }
115
+ if (isset($config['jitter'])) {
116
+ if ($config['jitter'] <= 0) {
117
+ throw new GoogleTaskException('Task configuration `jitter` must be greater than 0.');
118
+ }
119
+ $this->jitter = $config['jitter'];
120
+ }
121
+ if (isset($config['retries'])) {
122
+ if ($config['retries'] < 0) {
123
+ throw new GoogleTaskException('Task configuration `retries` must not be negative.');
124
+ }
125
+ $this->maxAttempts += $config['retries'];
126
+ }
127
+ if (!\is_callable($action)) {
128
+ throw new GoogleTaskException('Task argument `$action` must be a valid callable.');
129
+ }
130
+ $this->action = $action;
131
+ $this->arguments = $arguments;
132
+ }
133
+ /**
134
+ * Checks if a retry can be attempted.
135
+ *
136
+ * @return boolean
137
+ */
138
+ public function canAttempt()
139
+ {
140
+ return $this->attempts < $this->maxAttempts;
141
+ }
142
+ /**
143
+ * Runs the task and (if applicable) automatically retries when errors occur.
144
+ *
145
+ * @return mixed
146
+ * @throws \Google\Service\Exception on failure when no retries are available.
147
+ */
148
+ public function run()
149
+ {
150
+ while ($this->attempt()) {
151
+ try {
152
+ return \call_user_func_array($this->action, $this->arguments);
153
+ } catch (GoogleServiceException $exception) {
154
+ $allowedRetries = $this->allowedRetries($exception->getCode(), $exception->getErrors());
155
+ if (!$this->canAttempt() || !$allowedRetries) {
156
+ throw $exception;
157
+ }
158
+ if ($allowedRetries > 0) {
159
+ $this->maxAttempts = \min($this->maxAttempts, $this->attempts + $allowedRetries);
160
+ }
161
+ }
162
+ }
163
+ }
164
+ /**
165
+ * Runs a task once, if possible. This is useful for bypassing the `run()`
166
+ * loop.
167
+ *
168
+ * NOTE: If this is not the first attempt, this function will sleep in
169
+ * accordance to the backoff configurations before running the task.
170
+ *
171
+ * @return boolean
172
+ */
173
+ public function attempt()
174
+ {
175
+ if (!$this->canAttempt()) {
176
+ return \false;
177
+ }
178
+ if ($this->attempts > 0) {
179
+ $this->backOff();
180
+ }
181
+ $this->attempts++;
182
+ return \true;
183
+ }
184
+ /**
185
+ * Sleeps in accordance to the backoff configurations.
186
+ */
187
+ private function backOff()
188
+ {
189
+ $delay = $this->getDelay();
190
+ \usleep($delay * 1000000);
191
+ }
192
+ /**
193
+ * Gets the delay (in seconds) for the current backoff period.
194
+ *
195
+ * @return float
196
+ */
197
+ private function getDelay()
198
+ {
199
+ $jitter = $this->getJitter();
200
+ $factor = $this->attempts > 1 ? $this->factor + $jitter : 1 + \abs($jitter);
201
+ return $this->delay = \min($this->maxDelay, $this->delay * $factor);
202
+ }
203
+ /**
204
+ * Gets the current jitter (random number between -$this->jitter and
205
+ * $this->jitter).
206
+ *
207
+ * @return float
208
+ */
209
+ private function getJitter()
210
+ {
211
+ return $this->jitter * 2 * \mt_rand() / \mt_getrandmax() - $this->jitter;
212
+ }
213
+ /**
214
+ * Gets the number of times the associated task can be retried.
215
+ *
216
+ * NOTE: -1 is returned if the task can be retried indefinitely
217
+ *
218
+ * @return integer
219
+ */
220
+ public function allowedRetries($code, $errors = array())
221
+ {
222
+ if (isset($this->retryMap[$code])) {
223
+ return $this->retryMap[$code];
224
+ }
225
+ if (!empty($errors) && isset($errors[0]['reason'], $this->retryMap[$errors[0]['reason']])) {
226
+ return $this->retryMap[$errors[0]['reason']];
227
+ }
228
+ return 0;
229
+ }
230
+ public function setRetryMap($retryMap)
231
+ {
232
+ $this->retryMap = $retryMap;
233
+ }
234
+ }
third-party/google/apiclient/src/Utils/UriTemplate.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2013 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Utils;
19
+
20
+ /**
21
+ * Implementation of levels 1-3 of the URI Template spec.
22
+ * @see http://tools.ietf.org/html/rfc6570
23
+ */
24
+ class UriTemplate
25
+ {
26
+ const TYPE_MAP = "1";
27
+ const TYPE_LIST = "2";
28
+ const TYPE_SCALAR = "4";
29
+ /**
30
+ * @var $operators array
31
+ * These are valid at the start of a template block to
32
+ * modify the way in which the variables inside are
33
+ * processed.
34
+ */
35
+ private $operators = array("+" => "reserved", "/" => "segments", "." => "dotprefix", "#" => "fragment", ";" => "semicolon", "?" => "form", "&" => "continuation");
36
+ /**
37
+ * @var reserved array
38
+ * These are the characters which should not be URL encoded in reserved
39
+ * strings.
40
+ */
41
+ private $reserved = array("=", ",", "!", "@", "|", ":", "/", "?", "#", "[", "]", '$', "&", "'", "(", ")", "*", "+", ";");
42
+ private $reservedEncoded = array("%3D", "%2C", "%21", "%40", "%7C", "%3A", "%2F", "%3F", "%23", "%5B", "%5D", "%24", "%26", "%27", "%28", "%29", "%2A", "%2B", "%3B");
43
+ public function parse($string, array $parameters)
44
+ {
45
+ return $this->resolveNextSection($string, $parameters);
46
+ }
47
+ /**
48
+ * This function finds the first matching {...} block and
49
+ * executes the replacement. It then calls itself to find
50
+ * subsequent blocks, if any.
51
+ */
52
+ private function resolveNextSection($string, $parameters)
53
+ {
54
+ $start = \strpos($string, "{");
55
+ if ($start === \false) {
56
+ return $string;
57
+ }
58
+ $end = \strpos($string, "}");
59
+ if ($end === \false) {
60
+ return $string;
61
+ }
62
+ $string = $this->replace($string, $start, $end, $parameters);
63
+ return $this->resolveNextSection($string, $parameters);
64
+ }
65
+ private function replace($string, $start, $end, $parameters)
66
+ {
67
+ // We know a data block will have {} round it, so we can strip that.
68
+ $data = \substr($string, $start + 1, $end - $start - 1);
69
+ // If the first character is one of the reserved operators, it effects
70
+ // the processing of the stream.
71
+ if (isset($this->operators[$data[0]])) {
72
+ $op = $this->operators[$data[0]];
73
+ $data = \substr($data, 1);
74
+ $prefix = "";
75
+ $prefix_on_missing = \false;
76
+ switch ($op) {
77
+ case "reserved":
78
+ // Reserved means certain characters should not be URL encoded
79
+ $data = $this->replaceVars($data, $parameters, ",", null, \true);
80
+ break;
81
+ case "fragment":
82
+ // Comma separated with fragment prefix. Bare values only.
83
+ $prefix = "#";
84
+ $prefix_on_missing = \true;
85
+ $data = $this->replaceVars($data, $parameters, ",", null, \true);
86
+ break;
87
+ case "segments":
88
+ // Slash separated data. Bare values only.
89
+ $prefix = "/";
90
+ $data = $this->replaceVars($data, $parameters, "/");
91
+ break;
92
+ case "dotprefix":
93
+ // Dot separated data. Bare values only.
94
+ $prefix = ".";
95
+ $prefix_on_missing = \true;
96
+ $data = $this->replaceVars($data, $parameters, ".");
97
+ break;
98
+ case "semicolon":
99
+ // Semicolon prefixed and separated. Uses the key name
100
+ $prefix = ";";
101
+ $data = $this->replaceVars($data, $parameters, ";", "=", \false, \true, \false);
102
+ break;
103
+ case "form":
104
+ // Standard URL format. Uses the key name
105
+ $prefix = "?";
106
+ $data = $this->replaceVars($data, $parameters, "&", "=");
107
+ break;
108
+ case "continuation":
109
+ // Standard URL, but with leading ampersand. Uses key name.
110
+ $prefix = "&";
111
+ $data = $this->replaceVars($data, $parameters, "&", "=");
112
+ break;
113
+ }
114
+ // Add the initial prefix character if data is valid.
115
+ if ($data || $data !== \false && $prefix_on_missing) {
116
+ $data = $prefix . $data;
117
+ }
118
+ } else {
119
+ // If no operator we replace with the defaults.
120
+ $data = $this->replaceVars($data, $parameters);
121
+ }
122
+ // This is chops out the {...} and replaces with the new section.
123
+ return \substr($string, 0, $start) . $data . \substr($string, $end + 1);
124
+ }
125
+ private function replaceVars($section, $parameters, $sep = ",", $combine = null, $reserved = \false, $tag_empty = \false, $combine_on_empty = \true)
126
+ {
127
+ if (\strpos($section, ",") === \false) {
128
+ // If we only have a single value, we can immediately process.
129
+ return $this->combine($section, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty);
130
+ } else {
131
+ // If we have multiple values, we need to split and loop over them.
132
+ // Each is treated individually, then glued together with the
133
+ // separator character.
134
+ $vars = \explode(",", $section);
135
+ return $this->combineList(
136
+ $vars,
137
+ $sep,
138
+ $parameters,
139
+ $combine,
140
+ $reserved,
141
+ \false,
142
+ // Never emit empty strings in multi-param replacements
143
+ $combine_on_empty
144
+ );
145
+ }
146
+ }
147
+ public function combine($key, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty)
148
+ {
149
+ $length = \false;
150
+ $explode = \false;
151
+ $skip_final_combine = \false;
152
+ $value = \false;
153
+ // Check for length restriction.
154
+ if (\strpos($key, ":") !== \false) {
155
+ list($key, $length) = \explode(":", $key);
156
+ }
157
+ // Check for explode parameter.
158
+ if ($key[\strlen($key) - 1] == "*") {
159
+ $explode = \true;
160
+ $key = \substr($key, 0, -1);
161
+ $skip_final_combine = \true;
162
+ }
163
+ // Define the list separator.
164
+ $list_sep = $explode ? $sep : ",";
165
+ if (isset($parameters[$key])) {
166
+ $data_type = $this->getDataType($parameters[$key]);
167
+ switch ($data_type) {
168
+ case self::TYPE_SCALAR:
169
+ $value = $this->getValue($parameters[$key], $length);
170
+ break;
171
+ case self::TYPE_LIST:
172
+ $values = array();
173
+ foreach ($parameters[$key] as $pkey => $pvalue) {
174
+ $pvalue = $this->getValue($pvalue, $length);
175
+ if ($combine && $explode) {
176
+ $values[$pkey] = $key . $combine . $pvalue;
177
+ } else {
178
+ $values[$pkey] = $pvalue;
179
+ }
180
+ }
181
+ $value = \implode($list_sep, $values);
182
+ if ($value == '') {
183
+ return '';
184
+ }
185
+ break;
186
+ case self::TYPE_MAP:
187
+ $values = array();
188
+ foreach ($parameters[$key] as $pkey => $pvalue) {
189
+ $pvalue = $this->getValue($pvalue, $length);
190
+ if ($explode) {
191
+ $pkey = $this->getValue($pkey, $length);
192
+ $values[] = $pkey . "=" . $pvalue;
193
+ // Explode triggers = combine.
194
+ } else {
195
+ $values[] = $pkey;
196
+ $values[] = $pvalue;
197
+ }
198
+ }
199
+ $value = \implode($list_sep, $values);
200
+ if ($value == '') {
201
+ return \false;
202
+ }
203
+ break;
204
+ }
205
+ } else {
206
+ if ($tag_empty) {
207
+ // If we are just indicating empty values with their key name, return that.
208
+ return $key;
209
+ } else {
210
+ // Otherwise we can skip this variable due to not being defined.
211
+ return \false;
212
+ }
213
+ }
214
+ if ($reserved) {
215
+ $value = \str_replace($this->reservedEncoded, $this->reserved, $value);
216
+ }
217
+ // If we do not need to include the key name, we just return the raw
218
+ // value.
219
+ if (!$combine || $skip_final_combine) {
220
+ return $value;
221
+ }
222
+ // Else we combine the key name: foo=bar, if value is not the empty string.
223
+ return $key . ($value != '' || $combine_on_empty ? $combine . $value : '');
224
+ }
225
+ /**
226
+ * Return the type of a passed in value
227
+ */
228
+ private function getDataType($data)
229
+ {
230
+ if (\is_array($data)) {
231
+ \reset($data);
232
+ if (\key($data) !== 0) {
233
+ return self::TYPE_MAP;
234
+ }
235
+ return self::TYPE_LIST;
236
+ }
237
+ return self::TYPE_SCALAR;
238
+ }
239
+ /**
240
+ * Utility function that merges multiple combine calls
241
+ * for multi-key templates.
242
+ */
243
+ private function combineList($vars, $sep, $parameters, $combine, $reserved, $tag_empty, $combine_on_empty)
244
+ {
245
+ $ret = array();
246
+ foreach ($vars as $var) {
247
+ $response = $this->combine($var, $parameters, $sep, $combine, $reserved, $tag_empty, $combine_on_empty);
248
+ if ($response === \false) {
249
+ continue;
250
+ }
251
+ $ret[] = $response;
252
+ }
253
+ return \implode($sep, $ret);
254
+ }
255
+ /**
256
+ * Utility function to encode and trim values
257
+ */
258
+ private function getValue($value, $length)
259
+ {
260
+ if ($length) {
261
+ $value = \substr($value, 0, $length);
262
+ }
263
+ $value = \rawurlencode($value);
264
+ return $value;
265
+ }
266
+ }
third-party/google/apiclient/src/aliases.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ if (\class_exists('SimpleCalendar\\plugin_deps\\Google_Client', \false)) {
6
+ // Prevent error with preloading in PHP 7.4
7
+ // @see https://github.com/googleapis/google-api-php-client/issues/1976
8
+ return;
9
+ }
10
+ $classMap = ['SimpleCalendar\\plugin_deps\\Google\\Client' => 'SimpleCalendar\\plugin_deps\Google_Client', 'SimpleCalendar\\plugin_deps\\Google\\Service' => 'SimpleCalendar\\plugin_deps\Google_Service', 'SimpleCalendar\\plugin_deps\\Google\\AccessToken\\Revoke' => 'SimpleCalendar\\plugin_deps\Google_AccessToken_Revoke', 'SimpleCalendar\\plugin_deps\\Google\\AccessToken\\Verify' => 'SimpleCalendar\\plugin_deps\Google_AccessToken_Verify', 'SimpleCalendar\\plugin_deps\\Google\\Model' => 'SimpleCalendar\\plugin_deps\Google_Model', 'SimpleCalendar\\plugin_deps\\Google\\Utils\\UriTemplate' => 'SimpleCalendar\\plugin_deps\Google_Utils_UriTemplate', 'SimpleCalendar\\plugin_deps\\Google\\AuthHandler\\Guzzle6AuthHandler' => 'SimpleCalendar\\plugin_deps\Google_AuthHandler_Guzzle6AuthHandler', 'SimpleCalendar\\plugin_deps\\Google\\AuthHandler\\Guzzle7AuthHandler' => 'SimpleCalendar\\plugin_deps\Google_AuthHandler_Guzzle7AuthHandler', 'SimpleCalendar\\plugin_deps\\Google\\AuthHandler\\Guzzle5AuthHandler' => 'SimpleCalendar\\plugin_deps\Google_AuthHandler_Guzzle5AuthHandler', 'SimpleCalendar\\plugin_deps\\Google\\AuthHandler\\AuthHandlerFactory' => 'SimpleCalendar\\plugin_deps\Google_AuthHandler_AuthHandlerFactory', 'SimpleCalendar\\plugin_deps\\Google\\Http\\Batch' => 'SimpleCalendar\\plugin_deps\Google_Http_Batch', 'SimpleCalendar\\plugin_deps\\Google\\Http\\MediaFileUpload' => 'SimpleCalendar\\plugin_deps\Google_Http_MediaFileUpload', 'SimpleCalendar\\plugin_deps\\Google\\Http\\REST' => 'SimpleCalendar\\plugin_deps\Google_Http_REST', 'SimpleCalendar\\plugin_deps\\Google\\Task\\Retryable' => 'SimpleCalendar\\plugin_deps\Google_Task_Retryable', 'SimpleCalendar\\plugin_deps\\Google\\Task\\Exception' => 'SimpleCalendar\\plugin_deps\Google_Task_Exception', 'SimpleCalendar\\plugin_deps\\Google\\Task\\Runner' => 'SimpleCalendar\\plugin_deps\Google_Task_Runner', 'SimpleCalendar\\plugin_deps\\Google\\Collection' => 'SimpleCalendar\\plugin_deps\Google_Collection', 'SimpleCalendar\\plugin_deps\\Google\\Service\\Exception' => 'SimpleCalendar\\plugin_deps\Google_Service_Exception', 'SimpleCalendar\\plugin_deps\\Google\\Service\\Resource' => 'SimpleCalendar\\plugin_deps\Google_Service_Resource', 'SimpleCalendar\\plugin_deps\\Google\\Exception' => 'SimpleCalendar\\plugin_deps\Google_Exception'];
11
+ foreach ($classMap as $class => $alias) {
12
+ \class_alias($class, $alias);
13
+ }
14
+ /**
15
+ * This class needs to be defined explicitly as scripts must be recognized by
16
+ * the autoloader.
17
+ */
18
+ class Google_Task_Composer extends \SimpleCalendar\plugin_deps\Google\Task\Composer
19
+ {
20
+ }
21
+ if (\false) {
22
+ class Google_AccessToken_Revoke extends \SimpleCalendar\plugin_deps\Google\AccessToken\Revoke
23
+ {
24
+ }
25
+ class Google_AccessToken_Verify extends \SimpleCalendar\plugin_deps\Google\AccessToken\Verify
26
+ {
27
+ }
28
+ class Google_AuthHandler_AuthHandlerFactory extends \SimpleCalendar\plugin_deps\Google\AuthHandler\AuthHandlerFactory
29
+ {
30
+ }
31
+ class Google_AuthHandler_Guzzle5AuthHandler extends \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle5AuthHandler
32
+ {
33
+ }
34
+ class Google_AuthHandler_Guzzle6AuthHandler extends \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle6AuthHandler
35
+ {
36
+ }
37
+ class Google_AuthHandler_Guzzle7AuthHandler extends \SimpleCalendar\plugin_deps\Google\AuthHandler\Guzzle7AuthHandler
38
+ {
39
+ }
40
+ class Google_Client extends \SimpleCalendar\plugin_deps\Google\Client
41
+ {
42
+ }
43
+ class Google_Collection extends \SimpleCalendar\plugin_deps\Google\Collection
44
+ {
45
+ }
46
+ class Google_Exception extends \SimpleCalendar\plugin_deps\Google\Exception
47
+ {
48
+ }
49
+ class Google_Http_Batch extends \SimpleCalendar\plugin_deps\Google\Http\Batch
50
+ {
51
+ }
52
+ class Google_Http_MediaFileUpload extends \SimpleCalendar\plugin_deps\Google\Http\MediaFileUpload
53
+ {
54
+ }
55
+ class Google_Http_REST extends \SimpleCalendar\plugin_deps\Google\Http\REST
56
+ {
57
+ }
58
+ class Google_Model extends \SimpleCalendar\plugin_deps\Google\Model
59
+ {
60
+ }
61
+ class Google_Service extends \SimpleCalendar\plugin_deps\Google\Service
62
+ {
63
+ }
64
+ class Google_Service_Exception extends \SimpleCalendar\plugin_deps\Google\Service\Exception
65
+ {
66
+ }
67
+ class Google_Service_Resource extends \SimpleCalendar\plugin_deps\Google\Service\Resource
68
+ {
69
+ }
70
+ class Google_Task_Exception extends \SimpleCalendar\plugin_deps\Google\Task\Exception
71
+ {
72
+ }
73
+ class Google_Task_Retryable extends \SimpleCalendar\plugin_deps\Google\Task\Retryable
74
+ {
75
+ }
76
+ class Google_Task_Runner extends \SimpleCalendar\plugin_deps\Google\Task\Runner
77
+ {
78
+ }
79
+ class Google_Utils_UriTemplate extends \SimpleCalendar\plugin_deps\Google\Utils\UriTemplate
80
+ {
81
+ }
82
+ }
{vendor → third-party}/google/auth/COPYING RENAMED
File without changes
third-party/google/auth/autoload.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps;
4
+
5
+ /*
6
+ * Copyright 2014 Google Inc.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+ function oauth2client_php_autoload($className)
21
+ {
22
+ $classPath = \explode('_', $className);
23
+ if ($classPath[0] != 'Google') {
24
+ return;
25
+ }
26
+ if (\count($classPath) > 3) {
27
+ // Maximum class file path depth in this project is 3.
28
+ $classPath = \array_slice($classPath, 0, 3);
29
+ }
30
+ $filePath = \dirname(__FILE__) . '/src/' . \implode('/', $classPath) . '.php';
31
+ if (\file_exists($filePath)) {
32
+ require_once $filePath;
33
+ }
34
+ }
35
+ \spl_autoload_register('oauth2client_php_autoload');
third-party/google/auth/src/AccessToken.php ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use DateTime;
21
+ use Exception;
22
+ use SimpleCalendar\plugin_deps\Firebase\JWT\ExpiredException;
23
+ use SimpleCalendar\plugin_deps\Firebase\JWT\JWT;
24
+ use SimpleCalendar\plugin_deps\Firebase\JWT\SignatureInvalidException;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\Cache\MemoryCacheItemPool;
26
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpClientCache;
27
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
28
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
29
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
30
+ use InvalidArgumentException;
31
+ use SimpleCalendar\plugin_deps\phpseclib\Crypt\RSA;
32
+ use SimpleCalendar\plugin_deps\phpseclib\Math\BigInteger;
33
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
34
+ use RuntimeException;
35
+ use SimpleCalendar\plugin_deps\SimpleJWT\InvalidTokenException;
36
+ use SimpleCalendar\plugin_deps\SimpleJWT\JWT as SimpleJWT;
37
+ use SimpleCalendar\plugin_deps\SimpleJWT\Keys\KeyFactory;
38
+ use SimpleCalendar\plugin_deps\SimpleJWT\Keys\KeySet;
39
+ use UnexpectedValueException;
40
+ /**
41
+ * Wrapper around Google Access Tokens which provides convenience functions.
42
+ *
43
+ * @experimental
44
+ */
45
+ class AccessToken
46
+ {
47
+ const FEDERATED_SIGNON_CERT_URL = 'https://www.googleapis.com/oauth2/v3/certs';
48
+ const IAP_CERT_URL = 'https://www.gstatic.com/iap/verify/public_key-jwk';
49
+ const IAP_ISSUER = 'https://cloud.google.com/iap';
50
+ const OAUTH2_ISSUER = 'accounts.google.com';
51
+ const OAUTH2_ISSUER_HTTPS = 'https://accounts.google.com';
52
+ const OAUTH2_REVOKE_URI = 'https://oauth2.googleapis.com/revoke';
53
+ /**
54
+ * @var callable
55
+ */
56
+ private $httpHandler;
57
+ /**
58
+ * @var CacheItemPoolInterface
59
+ */
60
+ private $cache;
61
+ /**
62
+ * @param callable $httpHandler [optional] An HTTP Handler to deliver PSR-7 requests.
63
+ * @param CacheItemPoolInterface $cache [optional] A PSR-6 compatible cache implementation.
64
+ */
65
+ public function __construct(callable $httpHandler = null, CacheItemPoolInterface $cache = null)
66
+ {
67
+ $this->httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
68
+ $this->cache = $cache ?: new MemoryCacheItemPool();
69
+ }
70
+ /**
71
+ * Verifies an id token and returns the authenticated apiLoginTicket.
72
+ * Throws an exception if the id token is not valid.
73
+ * The audience parameter can be used to control which id tokens are
74
+ * accepted. By default, the id token must have been issued to this OAuth2 client.
75
+ *
76
+ * @param string $token The JSON Web Token to be verified.
77
+ * @param array $options [optional] Configuration options.
78
+ * @param string $options.audience The indended recipient of the token.
79
+ * @param string $options.issuer The intended issuer of the token.
80
+ * @param string $options.cacheKey The cache key of the cached certs. Defaults to
81
+ * the sha1 of $certsLocation if provided, otherwise is set to
82
+ * "federated_signon_certs_v3".
83
+ * @param string $options.certsLocation The location (remote or local) from which
84
+ * to retrieve certificates, if not cached. This value should only be
85
+ * provided in limited circumstances in which you are sure of the
86
+ * behavior.
87
+ * @param bool $options.throwException Whether the function should throw an
88
+ * exception if the verification fails. This is useful for
89
+ * determining the reason verification failed.
90
+ * @return array|bool the token payload, if successful, or false if not.
91
+ * @throws InvalidArgumentException If certs could not be retrieved from a local file.
92
+ * @throws InvalidArgumentException If received certs are in an invalid format.
93
+ * @throws InvalidArgumentException If the cert alg is not supported.
94
+ * @throws RuntimeException If certs could not be retrieved from a remote location.
95
+ * @throws UnexpectedValueException If the token issuer does not match.
96
+ * @throws UnexpectedValueException If the token audience does not match.
97
+ */
98
+ public function verify($token, array $options = [])
99
+ {
100
+ $audience = isset($options['audience']) ? $options['audience'] : null;
101
+ $issuer = isset($options['issuer']) ? $options['issuer'] : null;
102
+ $certsLocation = isset($options['certsLocation']) ? $options['certsLocation'] : self::FEDERATED_SIGNON_CERT_URL;
103
+ $cacheKey = isset($options['cacheKey']) ? $options['cacheKey'] : $this->getCacheKeyFromCertLocation($certsLocation);
104
+ $throwException = isset($options['throwException']) ? $options['throwException'] : \false;
105
+ // for backwards compatibility
106
+ // Check signature against each available cert.
107
+ $certs = $this->getCerts($certsLocation, $cacheKey, $options);
108
+ $alg = $this->determineAlg($certs);
109
+ if (!\in_array($alg, ['RS256', 'ES256'])) {
110
+ throw new InvalidArgumentException('unrecognized "alg" in certs, expected ES256 or RS256');
111
+ }
112
+ try {
113
+ if ($alg == 'RS256') {
114
+ return $this->verifyRs256($token, $certs, $audience, $issuer);
115
+ }
116
+ return $this->verifyEs256($token, $certs, $audience, $issuer);
117
+ } catch (ExpiredException $e) {
118
+ // firebase/php-jwt 3+
119
+ } catch (\SimpleCalendar\plugin_deps\ExpiredException $e) {
120
+ // firebase/php-jwt 2
121
+ } catch (SignatureInvalidException $e) {
122
+ // firebase/php-jwt 3+
123
+ } catch (\SimpleCalendar\plugin_deps\SignatureInvalidException $e) {
124
+ // firebase/php-jwt 2
125
+ } catch (InvalidTokenException $e) {
126
+ // simplejwt
127
+ } catch (\SimpleCalendar\plugin_deps\Google\Auth\DomainException $e) {
128
+ } catch (InvalidArgumentException $e) {
129
+ } catch (UnexpectedValueException $e) {
130
+ }
131
+ if ($throwException) {
132
+ throw $e;
133
+ }
134
+ return \false;
135
+ }
136
+ /**
137
+ * Identifies the expected algorithm to verify by looking at the "alg" key
138
+ * of the provided certs.
139
+ *
140
+ * @param array $certs Certificate array according to the JWK spec (see
141
+ * https://tools.ietf.org/html/rfc7517).
142
+ * @return string The expected algorithm, such as "ES256" or "RS256".
143
+ */
144
+ private function determineAlg(array $certs)
145
+ {
146
+ $alg = null;
147
+ foreach ($certs as $cert) {
148
+ if (empty($cert['alg'])) {
149
+ throw new InvalidArgumentException('certs expects "alg" to be set');
150
+ }
151
+ $alg = $alg ?: $cert['alg'];
152
+ if ($alg != $cert['alg']) {
153
+ throw new InvalidArgumentException('More than one alg detected in certs');
154
+ }
155
+ }
156
+ return $alg;
157
+ }
158
+ /**
159
+ * Verifies an ES256-signed JWT.
160
+ *
161
+ * @param string $token The JSON Web Token to be verified.
162
+ * @param array $certs Certificate array according to the JWK spec (see
163
+ * https://tools.ietf.org/html/rfc7517).
164
+ * @param string|null $audience If set, returns false if the provided
165
+ * audience does not match the "aud" claim on the JWT.
166
+ * @param string|null $issuer If set, returns false if the provided
167
+ * issuer does not match the "iss" claim on the JWT.
168
+ * @return array|bool the token payload, if successful, or false if not.
169
+ */
170
+ private function verifyEs256($token, array $certs, $audience = null, $issuer = null)
171
+ {
172
+ $this->checkSimpleJwt();
173
+ $jwkset = new KeySet();
174
+ foreach ($certs as $cert) {
175
+ $jwkset->add(KeyFactory::create($cert, 'php'));
176
+ }
177
+ // Validate the signature using the key set and ES256 algorithm.
178
+ $jwt = $this->callSimpleJwtDecode([$token, $jwkset, 'ES256']);
179
+ $payload = $jwt->getClaims();
180
+ if (isset($payload['aud'])) {
181
+ if ($audience && $payload['aud'] != $audience) {
182
+ throw new UnexpectedValueException('Audience does not match');
183
+ }
184
+ }
185
+ // @see https://cloud.google.com/iap/docs/signed-headers-howto#verifying_the_jwt_payload
186
+ $issuer = $issuer ?: self::IAP_ISSUER;
187
+ if (!isset($payload['iss']) || $payload['iss'] !== $issuer) {
188
+ throw new UnexpectedValueException('Issuer does not match');
189
+ }
190
+ return $payload;
191
+ }
192
+ /**
193
+ * Verifies an RS256-signed JWT.
194
+ *
195
+ * @param string $token The JSON Web Token to be verified.
196
+ * @param array $certs Certificate array according to the JWK spec (see
197
+ * https://tools.ietf.org/html/rfc7517).
198
+ * @param string|null $audience If set, returns false if the provided
199
+ * audience does not match the "aud" claim on the JWT.
200
+ * @param string|null $issuer If set, returns false if the provided
201
+ * issuer does not match the "iss" claim on the JWT.
202
+ * @return array|bool the token payload, if successful, or false if not.
203
+ */
204
+ private function verifyRs256($token, array $certs, $audience = null, $issuer = null)
205
+ {
206
+ $this->checkAndInitializePhpsec();
207
+ $keys = [];
208
+ foreach ($certs as $cert) {
209
+ if (empty($cert['kid'])) {
210
+ throw new InvalidArgumentException('certs expects "kid" to be set');
211
+ }
212
+ if (empty($cert['n']) || empty($cert['e'])) {
213
+ throw new InvalidArgumentException('RSA certs expects "n" and "e" to be set');
214
+ }
215
+ $rsa = new RSA();
216
+ $rsa->loadKey(['n' => new BigInteger($this->callJwtStatic('urlsafeB64Decode', [$cert['n']]), 256), 'e' => new BigInteger($this->callJwtStatic('urlsafeB64Decode', [$cert['e']]), 256)]);
217
+ // create an array of key IDs to certs for the JWT library
218
+ $keys[$cert['kid']] = $rsa->getPublicKey();
219
+ }
220
+ $payload = $this->callJwtStatic('decode', [$token, $keys, ['RS256']]);
221
+ if (\property_exists($payload, 'aud')) {
222
+ if ($audience && $payload->aud != $audience) {
223
+ throw new UnexpectedValueException('Audience does not match');
224
+ }
225
+ }
226
+ // support HTTP and HTTPS issuers
227
+ // @see https://developers.google.com/identity/sign-in/web/backend-auth
228
+ $issuers = $issuer ? [$issuer] : [self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS];
229
+ if (!isset($payload->iss) || !\in_array($payload->iss, $issuers)) {
230
+ throw new UnexpectedValueException('Issuer does not match');
231
+ }
232
+ return (array) $payload;
233
+ }
234
+ /**
235
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
236
+ * token, if a token isn't provided.
237
+ *
238
+ * @param string|array $token The token (access token or a refresh token) that should be revoked.
239
+ * @param array $options [optional] Configuration options.
240
+ * @return bool Returns True if the revocation was successful, otherwise False.
241
+ */
242
+ public function revoke($token, array $options = [])
243
+ {
244
+ if (\is_array($token)) {
245
+ if (isset($token['refresh_token'])) {
246
+ $token = $token['refresh_token'];
247
+ } else {
248
+ $token = $token['access_token'];
249
+ }
250
+ }
251
+ $body = Psr7\stream_for(\http_build_query(['token' => $token]));
252
+ $request = new Request('POST', self::OAUTH2_REVOKE_URI, ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'], $body);
253
+ $httpHandler = $this->httpHandler;
254
+ $response = $httpHandler($request, $options);
255
+ return $response->getStatusCode() == 200;
256
+ }
257
+ /**
258
+ * Gets federated sign-on certificates to use for verifying identity tokens.
259
+ * Returns certs as array structure, where keys are key ids, and values
260
+ * are PEM encoded certificates.
261
+ *
262
+ * @param string $location The location from which to retrieve certs.
263
+ * @param string $cacheKey The key under which to cache the retrieved certs.
264
+ * @param array $options [optional] Configuration options.
265
+ * @return array
266
+ * @throws InvalidArgumentException If received certs are in an invalid format.
267
+ */
268
+ private function getCerts($location, $cacheKey, array $options = [])
269
+ {
270
+ $cacheItem = $this->cache->getItem($cacheKey);
271
+ $certs = $cacheItem ? $cacheItem->get() : null;
272
+ $gotNewCerts = \false;
273
+ if (!$certs) {
274
+ $certs = $this->retrieveCertsFromLocation($location, $options);
275
+ $gotNewCerts = \true;
276
+ }
277
+ if (!isset($certs['keys'])) {
278
+ if ($location !== self::IAP_CERT_URL) {
279
+ throw new InvalidArgumentException('federated sign-on certs expects "keys" to be set');
280
+ }
281
+ throw new InvalidArgumentException('certs expects "keys" to be set');
282
+ }
283
+ // Push caching off until after verifying certs are in a valid format.
284
+ // Don't want to cache bad data.
285
+ if ($gotNewCerts) {
286
+ $cacheItem->expiresAt(new DateTime('+1 hour'));
287
+ $cacheItem->set($certs);
288
+ $this->cache->save($cacheItem);
289
+ }
290
+ return $certs['keys'];
291
+ }
292
+ /**
293
+ * Retrieve and cache a certificates file.
294
+ *
295
+ * @param $url string location
296
+ * @param array $options [optional] Configuration options.
297
+ * @return array certificates
298
+ * @throws InvalidArgumentException If certs could not be retrieved from a local file.
299
+ * @throws RuntimeException If certs could not be retrieved from a remote location.
300
+ */
301
+ private function retrieveCertsFromLocation($url, array $options = [])
302
+ {
303
+ // If we're retrieving a local file, just grab it.
304
+ if (\strpos($url, 'http') !== 0) {
305
+ if (!\file_exists($url)) {
306
+ throw new InvalidArgumentException(\sprintf('Failed to retrieve verification certificates from path: %s.', $url));
307
+ }
308
+ return \json_decode(\file_get_contents($url), \true);
309
+ }
310
+ $httpHandler = $this->httpHandler;
311
+ $response = $httpHandler(new Request('GET', $url), $options);
312
+ if ($response->getStatusCode() == 200) {
313
+ return \json_decode((string) $response->getBody(), \true);
314
+ }
315
+ throw new RuntimeException(\sprintf('Failed to retrieve verification certificates: "%s".', $response->getBody()->getContents()), $response->getStatusCode());
316
+ }
317
+ private function checkAndInitializePhpsec()
318
+ {
319
+ // @codeCoverageIgnoreStart
320
+ if (!\class_exists('SimpleCalendar\\plugin_deps\\phpseclib\\Crypt\\RSA')) {
321
+ throw new RuntimeException('Please require phpseclib/phpseclib v2 to use this utility.');
322
+ }
323
+ // @codeCoverageIgnoreEnd
324
+ $this->setPhpsecConstants();
325
+ }
326
+ private function checkSimpleJwt()
327
+ {
328
+ // @codeCoverageIgnoreStart
329
+ if (!\class_exists('SimpleCalendar\\plugin_deps\\SimpleJWT\\JWT')) {
330
+ throw new RuntimeException('Please require kelvinmo/simplejwt ^0.2 to use this utility.');
331
+ }
332
+ // @codeCoverageIgnoreEnd
333
+ }
334
+ /**
335
+ * phpseclib calls "phpinfo" by default, which requires special
336
+ * whitelisting in the AppEngine VM environment. This function
337
+ * sets constants to bypass the need for phpseclib to check phpinfo
338
+ *
339
+ * @see phpseclib/Math/BigInteger
340
+ * @see https://github.com/GoogleCloudPlatform/getting-started-php/issues/85
341
+ * @codeCoverageIgnore
342
+ */
343
+ private function setPhpsecConstants()
344
+ {
345
+ if (\filter_var(\getenv('GAE_VM'), \FILTER_VALIDATE_BOOLEAN)) {
346
+ if (!\defined('SimpleCalendar\\plugin_deps\\MATH_BIGINTEGER_OPENSSL_ENABLED')) {
347
+ \define('SimpleCalendar\\plugin_deps\\MATH_BIGINTEGER_OPENSSL_ENABLED', \true);
348
+ }
349
+ if (!\defined('SimpleCalendar\\plugin_deps\\CRYPT_RSA_MODE')) {
350
+ \define('SimpleCalendar\\plugin_deps\\CRYPT_RSA_MODE', RSA::MODE_OPENSSL);
351
+ }
352
+ }
353
+ }
354
+ /**
355
+ * Provide a hook to mock calls to the JWT static methods.
356
+ *
357
+ * @param string $method
358
+ * @param array $args
359
+ * @return mixed
360
+ */
361
+ protected function callJwtStatic($method, array $args = [])
362
+ {
363
+ $class = \class_exists('SimpleCalendar\\plugin_deps\\Firebase\\JWT\\JWT') ? 'Firebase\\JWT\\JWT' : 'JWT';
364
+ return \call_user_func_array([$class, $method], $args);
365
+ }
366
+ /**
367
+ * Provide a hook to mock calls to the JWT static methods.
368
+ *
369
+ * @param array $args
370
+ * @return mixed
371
+ */
372
+ protected function callSimpleJwtDecode(array $args = [])
373
+ {
374
+ return \call_user_func_array(['SimpleJWT\\JWT', 'decode'], $args);
375
+ }
376
+ /**
377
+ * Generate a cache key based on the cert location using sha1 with the
378
+ * exception of using "federated_signon_certs_v3" to preserve BC.
379
+ *
380
+ * @param string $certsLocation
381
+ * @return string
382
+ */
383
+ private function getCacheKeyFromCertLocation($certsLocation)
384
+ {
385
+ $key = $certsLocation === self::FEDERATED_SIGNON_CERT_URL ? 'federated_signon_certs_v3' : \sha1($certsLocation);
386
+ return 'google_auth_certs_cache|' . $key;
387
+ }
388
+ }
third-party/google/auth/src/ApplicationDefaultCredentials.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use DomainException;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\AppIdentityCredentials;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\GCECredentials;
23
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\ServiceAccountCredentials;
24
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpClientCache;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
26
+ use SimpleCalendar\plugin_deps\Google\Auth\Middleware\AuthTokenMiddleware;
27
+ use SimpleCalendar\plugin_deps\Google\Auth\Subscriber\AuthTokenSubscriber;
28
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
29
+ use InvalidArgumentException;
30
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
31
+ /**
32
+ * ApplicationDefaultCredentials obtains the default credentials for
33
+ * authorizing a request to a Google service.
34
+ *
35
+ * Application Default Credentials are described here:
36
+ * https://developers.google.com/accounts/docs/application-default-credentials
37
+ *
38
+ * This class implements the search for the application default credentials as
39
+ * described in the link.
40
+ *
41
+ * It provides three factory methods:
42
+ * - #get returns the computed credentials object
43
+ * - #getSubscriber returns an AuthTokenSubscriber built from the credentials object
44
+ * - #getMiddleware returns an AuthTokenMiddleware built from the credentials object
45
+ *
46
+ * This allows it to be used as follows with GuzzleHttp\Client:
47
+ *
48
+ * ```
49
+ * use Google\Auth\ApplicationDefaultCredentials;
50
+ * use GuzzleHttp\Client;
51
+ * use GuzzleHttp\HandlerStack;
52
+ *
53
+ * $middleware = ApplicationDefaultCredentials::getMiddleware(
54
+ * 'https://www.googleapis.com/auth/taskqueue'
55
+ * );
56
+ * $stack = HandlerStack::create();
57
+ * $stack->push($middleware);
58
+ *
59
+ * $client = new Client([
60
+ * 'handler' => $stack,
61
+ * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
62
+ * 'auth' => 'google_auth' // authorize all requests
63
+ * ]);
64
+ *
65
+ * $res = $client->get('myproject/taskqueues/myqueue');
66
+ * ```
67
+ */
68
+ class ApplicationDefaultCredentials
69
+ {
70
+ /**
71
+ * Obtains an AuthTokenSubscriber that uses the default FetchAuthTokenInterface
72
+ * implementation to use in this environment.
73
+ *
74
+ * If supplied, $scope is used to in creating the credentials instance if
75
+ * this does not fallback to the compute engine defaults.
76
+ *
77
+ * @param string|array scope the scope of the access request, expressed
78
+ * either as an Array or as a space-delimited String.
79
+ * @param callable $httpHandler callback which delivers psr7 request
80
+ * @param array $cacheConfig configuration for the cache when it's present
81
+ * @param CacheItemPoolInterface $cache A cache implementation, may be
82
+ * provided if you have one already available for use.
83
+ * @return AuthTokenSubscriber
84
+ * @throws DomainException if no implementation can be obtained.
85
+ */
86
+ public static function getSubscriber($scope = null, callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
87
+ {
88
+ $creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache);
89
+ return new AuthTokenSubscriber($creds, $httpHandler);
90
+ }
91
+ /**
92
+ * Obtains an AuthTokenMiddleware that uses the default FetchAuthTokenInterface
93
+ * implementation to use in this environment.
94
+ *
95
+ * If supplied, $scope is used to in creating the credentials instance if
96
+ * this does not fallback to the compute engine defaults.
97
+ *
98
+ * @param string|array scope the scope of the access request, expressed
99
+ * either as an Array or as a space-delimited String.
100
+ * @param callable $httpHandler callback which delivers psr7 request
101
+ * @param array $cacheConfig configuration for the cache when it's present
102
+ * @param CacheItemPoolInterface $cache A cache implementation, may be
103
+ * provided if you have one already available for use.
104
+ * @param string $quotaProject specifies a project to bill for access
105
+ * charges associated with the request.
106
+ * @return AuthTokenMiddleware
107
+ * @throws DomainException if no implementation can be obtained.
108
+ */
109
+ public static function getMiddleware($scope = null, callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null, $quotaProject = null)
110
+ {
111
+ $creds = self::getCredentials($scope, $httpHandler, $cacheConfig, $cache, $quotaProject);
112
+ return new AuthTokenMiddleware($creds, $httpHandler);
113
+ }
114
+ /**
115
+ * Obtains an AuthTokenMiddleware which will fetch an access token to use in
116
+ * the Authorization header. The middleware is configured with the default
117
+ * FetchAuthTokenInterface implementation to use in this environment.
118
+ *
119
+ * If supplied, $scope is used to in creating the credentials instance if
120
+ * this does not fallback to the Compute Engine defaults.
121
+ *
122
+ * @param string|array $scope the scope of the access request, expressed
123
+ * either as an Array or as a space-delimited String.
124
+ * @param callable $httpHandler callback which delivers psr7 request
125
+ * @param array $cacheConfig configuration for the cache when it's present
126
+ * @param CacheItemPoolInterface $cache A cache implementation, may be
127
+ * provided if you have one already available for use.
128
+ * @param string $quotaProject specifies a project to bill for access
129
+ * charges associated with the request.
130
+ * @param string|array $defaultScope The default scope to use if no
131
+ * user-defined scopes exist, expressed either as an Array or as a
132
+ * space-delimited string.
133
+ *
134
+ * @return CredentialsLoader
135
+ * @throws DomainException if no implementation can be obtained.
136
+ */
137
+ public static function getCredentials($scope = null, callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null, $quotaProject = null, $defaultScope = null)
138
+ {
139
+ $creds = null;
140
+ $jsonKey = \SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader::fromEnv() ?: \SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader::fromWellKnownFile();
141
+ $anyScope = $scope ?: $defaultScope;
142
+ if (!$httpHandler) {
143
+ if (!($client = HttpClientCache::getHttpClient())) {
144
+ $client = new Client();
145
+ HttpClientCache::setHttpClient($client);
146
+ }
147
+ $httpHandler = HttpHandlerFactory::build($client);
148
+ }
149
+ if (!\is_null($jsonKey)) {
150
+ if ($quotaProject) {
151
+ $jsonKey['quota_project_id'] = $quotaProject;
152
+ }
153
+ $creds = \SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader::makeCredentials($scope, $jsonKey, $defaultScope);
154
+ } elseif (AppIdentityCredentials::onAppEngine() && !GCECredentials::onAppEngineFlexible()) {
155
+ $creds = new AppIdentityCredentials($anyScope);
156
+ } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) {
157
+ $creds = new GCECredentials(null, $anyScope, null, $quotaProject);
158
+ }
159
+ if (\is_null($creds)) {
160
+ throw new DomainException(self::notFound());
161
+ }
162
+ if (!\is_null($cache)) {
163
+ $creds = new \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenCache($creds, $cacheConfig, $cache);
164
+ }
165
+ return $creds;
166
+ }
167
+ /**
168
+ * Obtains an AuthTokenMiddleware which will fetch an ID token to use in the
169
+ * Authorization header. The middleware is configured with the default
170
+ * FetchAuthTokenInterface implementation to use in this environment.
171
+ *
172
+ * If supplied, $targetAudience is used to set the "aud" on the resulting
173
+ * ID token.
174
+ *
175
+ * @param string $targetAudience The audience for the ID token.
176
+ * @param callable $httpHandler callback which delivers psr7 request
177
+ * @param array $cacheConfig configuration for the cache when it's present
178
+ * @param CacheItemPoolInterface $cache A cache implementation, may be
179
+ * provided if you have one already available for use.
180
+ * @return AuthTokenMiddleware
181
+ * @throws DomainException if no implementation can be obtained.
182
+ */
183
+ public static function getIdTokenMiddleware($targetAudience, callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
184
+ {
185
+ $creds = self::getIdTokenCredentials($targetAudience, $httpHandler, $cacheConfig, $cache);
186
+ return new AuthTokenMiddleware($creds, $httpHandler);
187
+ }
188
+ /**
189
+ * Obtains the default FetchAuthTokenInterface implementation to use
190
+ * in this environment, configured with a $targetAudience for fetching an ID
191
+ * token.
192
+ *
193
+ * @param string $targetAudience The audience for the ID token.
194
+ * @param callable $httpHandler callback which delivers psr7 request
195
+ * @param array $cacheConfig configuration for the cache when it's present
196
+ * @param CacheItemPoolInterface $cache A cache implementation, may be
197
+ * provided if you have one already available for use.
198
+ * @return CredentialsLoader
199
+ * @throws DomainException if no implementation can be obtained.
200
+ * @throws InvalidArgumentException if JSON "type" key is invalid
201
+ */
202
+ public static function getIdTokenCredentials($targetAudience, callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
203
+ {
204
+ $creds = null;
205
+ $jsonKey = \SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader::fromEnv() ?: \SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader::fromWellKnownFile();
206
+ if (!$httpHandler) {
207
+ if (!($client = HttpClientCache::getHttpClient())) {
208
+ $client = new Client();
209
+ HttpClientCache::setHttpClient($client);
210
+ }
211
+ $httpHandler = HttpHandlerFactory::build($client);
212
+ }
213
+ if (!\is_null($jsonKey)) {
214
+ if (!\array_key_exists('type', $jsonKey)) {
215
+ throw new \InvalidArgumentException('json key is missing the type field');
216
+ }
217
+ if ($jsonKey['type'] == 'authorized_user') {
218
+ throw new InvalidArgumentException('ID tokens are not supported for end user credentials');
219
+ }
220
+ if ($jsonKey['type'] != 'service_account') {
221
+ throw new InvalidArgumentException('invalid value in the type field');
222
+ }
223
+ $creds = new ServiceAccountCredentials(null, $jsonKey, null, $targetAudience);
224
+ } elseif (self::onGce($httpHandler, $cacheConfig, $cache)) {
225
+ $creds = new GCECredentials(null, null, $targetAudience);
226
+ }
227
+ if (\is_null($creds)) {
228
+ throw new DomainException(self::notFound());
229
+ }
230
+ if (!\is_null($cache)) {
231
+ $creds = new \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenCache($creds, $cacheConfig, $cache);
232
+ }
233
+ return $creds;
234
+ }
235
+ private static function notFound()
236
+ {
237
+ $msg = 'Could not load the default credentials. Browse to ';
238
+ $msg .= 'https://developers.google.com';
239
+ $msg .= '/accounts/docs/application-default-credentials';
240
+ $msg .= ' for more information';
241
+ return $msg;
242
+ }
243
+ private static function onGce(callable $httpHandler = null, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
244
+ {
245
+ $gceCacheConfig = [];
246
+ foreach (['lifetime', 'prefix'] as $key) {
247
+ if (isset($cacheConfig['gce_' . $key])) {
248
+ $gceCacheConfig[$key] = $cacheConfig['gce_' . $key];
249
+ }
250
+ }
251
+ return (new \SimpleCalendar\plugin_deps\Google\Auth\GCECache($gceCacheConfig, $cache))->onGce($httpHandler);
252
+ }
253
+ }
third-party/google/auth/src/Cache/InvalidArgumentException.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2016 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Cache;
19
+
20
+ use SimpleCalendar\plugin_deps\Psr\Cache\InvalidArgumentException as PsrInvalidArgumentException;
21
+ class InvalidArgumentException extends \InvalidArgumentException implements PsrInvalidArgumentException
22
+ {
23
+ }
third-party/google/auth/src/Cache/Item.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2016 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Cache;
19
+
20
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemInterface;
21
+ /**
22
+ * A cache item.
23
+ */
24
+ final class Item implements CacheItemInterface
25
+ {
26
+ /**
27
+ * @var string
28
+ */
29
+ private $key;
30
+ /**
31
+ * @var mixed
32
+ */
33
+ private $value;
34
+ /**
35
+ * @var \DateTime|null
36
+ */
37
+ private $expiration;
38
+ /**
39
+ * @var bool
40
+ */
41
+ private $isHit = \false;
42
+ /**
43
+ * @param string $key
44
+ */
45
+ public function __construct($key)
46
+ {
47
+ $this->key = $key;
48
+ }
49
+ /**
50
+ * {@inheritdoc}
51
+ */
52
+ public function getKey()
53
+ {
54
+ return $this->key;
55
+ }
56
+ /**
57
+ * {@inheritdoc}
58
+ */
59
+ public function get()
60
+ {
61
+ return $this->isHit() ? $this->value : null;
62
+ }
63
+ /**
64
+ * {@inheritdoc}
65
+ */
66
+ public function isHit()
67
+ {
68
+ if (!$this->isHit) {
69
+ return \false;
70
+ }
71
+ if ($this->expiration === null) {
72
+ return \true;
73
+ }
74
+ return $this->currentTime()->getTimestamp() < $this->expiration->getTimestamp();
75
+ }
76
+ /**
77
+ * {@inheritdoc}
78
+ */
79
+ public function set($value)
80
+ {
81
+ $this->isHit = \true;
82
+ $this->value = $value;
83
+ return $this;
84
+ }
85
+ /**
86
+ * {@inheritdoc}
87
+ */
88
+ public function expiresAt($expiration)
89
+ {
90
+ if ($this->isValidExpiration($expiration)) {
91
+ $this->expiration = $expiration;
92
+ return $this;
93
+ }
94
+ $implementationMessage = \interface_exists('DateTimeInterface') ? 'implement interface DateTimeInterface' : 'be an instance of DateTime';
95
+ $error = \sprintf('Argument 1 passed to %s::expiresAt() must %s, %s given', \get_class($this), $implementationMessage, \gettype($expiration));
96
+ $this->handleError($error);
97
+ }
98
+ /**
99
+ * {@inheritdoc}
100
+ */
101
+ public function expiresAfter($time)
102
+ {
103
+ if (\is_int($time)) {
104
+ $this->expiration = $this->currentTime()->add(new \DateInterval("PT{$time}S"));
105
+ } elseif ($time instanceof \DateInterval) {
106
+ $this->expiration = $this->currentTime()->add($time);
107
+ } elseif ($time === null) {
108
+ $this->expiration = $time;
109
+ } else {
110
+ $message = 'Argument 1 passed to %s::expiresAfter() must be an ' . 'instance of DateInterval or of the type integer, %s given';
111
+ $error = \sprintf($message, \get_class($this), \gettype($time));
112
+ $this->handleError($error);
113
+ }
114
+ return $this;
115
+ }
116
+ /**
117
+ * Handles an error.
118
+ *
119
+ * @param string $error
120
+ * @throws \TypeError
121
+ */
122
+ private function handleError($error)
123
+ {
124
+ if (\class_exists('TypeError')) {
125
+ throw new \TypeError($error);
126
+ }
127
+ \trigger_error($error, \E_USER_ERROR);
128
+ }
129
+ /**
130
+ * Determines if an expiration is valid based on the rules defined by PSR6.
131
+ *
132
+ * @param mixed $expiration
133
+ * @return bool
134
+ */
135
+ private function isValidExpiration($expiration)
136
+ {
137
+ if ($expiration === null) {
138
+ return \true;
139
+ }
140
+ // We test for two types here due to the fact the DateTimeInterface
141
+ // was not introduced until PHP 5.5. Checking for the DateTime type as
142
+ // well allows us to support 5.4.
143
+ if ($expiration instanceof \DateTimeInterface) {
144
+ return \true;
145
+ }
146
+ if ($expiration instanceof \DateTime) {
147
+ return \true;
148
+ }
149
+ return \false;
150
+ }
151
+ protected function currentTime()
152
+ {
153
+ return new \DateTime('now', new \DateTimeZone('UTC'));
154
+ }
155
+ }
third-party/google/auth/src/Cache/MemoryCacheItemPool.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2016 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Cache;
19
+
20
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemInterface;
21
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
22
+ /**
23
+ * Simple in-memory cache implementation.
24
+ */
25
+ final class MemoryCacheItemPool implements CacheItemPoolInterface
26
+ {
27
+ /**
28
+ * @var CacheItemInterface[]
29
+ */
30
+ private $items;
31
+ /**
32
+ * @var CacheItemInterface[]
33
+ */
34
+ private $deferredItems;
35
+ /**
36
+ * {@inheritdoc}
37
+ */
38
+ public function getItem($key)
39
+ {
40
+ return \current($this->getItems([$key]));
41
+ }
42
+ /**
43
+ * {@inheritdoc}
44
+ */
45
+ public function getItems(array $keys = [])
46
+ {
47
+ $items = [];
48
+ foreach ($keys as $key) {
49
+ $items[$key] = $this->hasItem($key) ? clone $this->items[$key] : new \SimpleCalendar\plugin_deps\Google\Auth\Cache\Item($key);
50
+ }
51
+ return $items;
52
+ }
53
+ /**
54
+ * {@inheritdoc}
55
+ */
56
+ public function hasItem($key)
57
+ {
58
+ $this->isValidKey($key);
59
+ return isset($this->items[$key]) && $this->items[$key]->isHit();
60
+ }
61
+ /**
62
+ * {@inheritdoc}
63
+ */
64
+ public function clear()
65
+ {
66
+ $this->items = [];
67
+ $this->deferredItems = [];
68
+ return \true;
69
+ }
70
+ /**
71
+ * {@inheritdoc}
72
+ */
73
+ public function deleteItem($key)
74
+ {
75
+ return $this->deleteItems([$key]);
76
+ }
77
+ /**
78
+ * {@inheritdoc}
79
+ */
80
+ public function deleteItems(array $keys)
81
+ {
82
+ \array_walk($keys, [$this, 'isValidKey']);
83
+ foreach ($keys as $key) {
84
+ unset($this->items[$key]);
85
+ }
86
+ return \true;
87
+ }
88
+ /**
89
+ * {@inheritdoc}
90
+ */
91
+ public function save(CacheItemInterface $item)
92
+ {
93
+ $this->items[$item->getKey()] = $item;
94
+ return \true;
95
+ }
96
+ /**
97
+ * {@inheritdoc}
98
+ */
99
+ public function saveDeferred(CacheItemInterface $item)
100
+ {
101
+ $this->deferredItems[$item->getKey()] = $item;
102
+ return \true;
103
+ }
104
+ /**
105
+ * {@inheritdoc}
106
+ */
107
+ public function commit()
108
+ {
109
+ foreach ($this->deferredItems as $item) {
110
+ $this->save($item);
111
+ }
112
+ $this->deferredItems = [];
113
+ return \true;
114
+ }
115
+ /**
116
+ * Determines if the provided key is valid.
117
+ *
118
+ * @param string $key
119
+ * @return bool
120
+ * @throws InvalidArgumentException
121
+ */
122
+ private function isValidKey($key)
123
+ {
124
+ $invalidCharacters = '{}()/\\\\@:';
125
+ if (!\is_string($key) || \preg_match("#[{$invalidCharacters}]#", $key)) {
126
+ throw new \SimpleCalendar\plugin_deps\Google\Auth\Cache\InvalidArgumentException('The provided key is not valid: ' . \var_export($key, \true));
127
+ }
128
+ return \true;
129
+ }
130
+ }
third-party/google/auth/src/Cache/SysVCacheItemPool.php ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2018 Google Inc. All Rights Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Cache;
19
+
20
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemInterface;
21
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
22
+ /**
23
+ * SystemV shared memory based CacheItemPool implementation.
24
+ *
25
+ * This CacheItemPool implementation can be used among multiple processes, but
26
+ * it doesn't provide any locking mechanism. If multiple processes write to
27
+ * this ItemPool, you have to avoid race condition manually in your code.
28
+ */
29
+ class SysVCacheItemPool implements CacheItemPoolInterface
30
+ {
31
+ const VAR_KEY = 1;
32
+ const DEFAULT_PROJ = 'A';
33
+ const DEFAULT_MEMSIZE = 10000;
34
+ const DEFAULT_PERM = 0600;
35
+ /** @var int */
36
+ private $sysvKey;
37
+ /**
38
+ * @var CacheItemInterface[]
39
+ */
40
+ private $items;
41
+ /**
42
+ * @var CacheItemInterface[]
43
+ */
44
+ private $deferredItems;
45
+ /**
46
+ * @var array
47
+ */
48
+ private $options;
49
+ /*
50
+ * @var bool
51
+ */
52
+ private $hasLoadedItems = \false;
53
+ /**
54
+ * Create a SystemV shared memory based CacheItemPool.
55
+ *
56
+ * @param array $options [optional] Configuration options.
57
+ * @param int $options.variableKey The variable key for getting the data from
58
+ * the shared memory. **Defaults to** 1.
59
+ * @param $options.proj string The project identifier for ftok. This needs to
60
+ * be a one character string. **Defaults to** 'A'.
61
+ * @param $options.memsize int The memory size in bytes for shm_attach.
62
+ * **Defaults to** 10000.
63
+ * @param $options.perm int The permission for shm_attach. **Defaults to**
64
+ * 0600.
65
+ */
66
+ public function __construct($options = [])
67
+ {
68
+ if (!\extension_loaded('sysvshm')) {
69
+ throw new \RuntimeException('sysvshm extension is required to use this ItemPool');
70
+ }
71
+ $this->options = $options + ['variableKey' => self::VAR_KEY, 'proj' => self::DEFAULT_PROJ, 'memsize' => self::DEFAULT_MEMSIZE, 'perm' => self::DEFAULT_PERM];
72
+ $this->items = [];
73
+ $this->deferredItems = [];
74
+ $this->sysvKey = \ftok(__FILE__, $this->options['proj']);
75
+ }
76
+ public function getItem($key)
77
+ {
78
+ $this->loadItems();
79
+ return \current($this->getItems([$key]));
80
+ }
81
+ /**
82
+ * {@inheritdoc}
83
+ */
84
+ public function getItems(array $keys = [])
85
+ {
86
+ $this->loadItems();
87
+ $items = [];
88
+ foreach ($keys as $key) {
89
+ $items[$key] = $this->hasItem($key) ? clone $this->items[$key] : new \SimpleCalendar\plugin_deps\Google\Auth\Cache\Item($key);
90
+ }
91
+ return $items;
92
+ }
93
+ /**
94
+ * {@inheritdoc}
95
+ */
96
+ public function hasItem($key)
97
+ {
98
+ $this->loadItems();
99
+ return isset($this->items[$key]) && $this->items[$key]->isHit();
100
+ }
101
+ /**
102
+ * {@inheritdoc}
103
+ */
104
+ public function clear()
105
+ {
106
+ $this->items = [];
107
+ $this->deferredItems = [];
108
+ return $this->saveCurrentItems();
109
+ }
110
+ /**
111
+ * {@inheritdoc}
112
+ */
113
+ public function deleteItem($key)
114
+ {
115
+ return $this->deleteItems([$key]);
116
+ }
117
+ /**
118
+ * {@inheritdoc}
119
+ */
120
+ public function deleteItems(array $keys)
121
+ {
122
+ if (!$this->hasLoadedItems) {
123
+ $this->loadItems();
124
+ }
125
+ foreach ($keys as $key) {
126
+ unset($this->items[$key]);
127
+ }
128
+ return $this->saveCurrentItems();
129
+ }
130
+ /**
131
+ * {@inheritdoc}
132
+ */
133
+ public function save(CacheItemInterface $item)
134
+ {
135
+ if (!$this->hasLoadedItems) {
136
+ $this->loadItems();
137
+ }
138
+ $this->items[$item->getKey()] = $item;
139
+ return $this->saveCurrentItems();
140
+ }
141
+ /**
142
+ * {@inheritdoc}
143
+ */
144
+ public function saveDeferred(CacheItemInterface $item)
145
+ {
146
+ $this->deferredItems[$item->getKey()] = $item;
147
+ return \true;
148
+ }
149
+ /**
150
+ * {@inheritdoc}
151
+ */
152
+ public function commit()
153
+ {
154
+ foreach ($this->deferredItems as $item) {
155
+ if ($this->save($item) === \false) {
156
+ return \false;
157
+ }
158
+ }
159
+ $this->deferredItems = [];
160
+ return \true;
161
+ }
162
+ /**
163
+ * Save the current items.
164
+ *
165
+ * @return bool true when success, false upon failure
166
+ */
167
+ private function saveCurrentItems()
168
+ {
169
+ $shmid = \shm_attach($this->sysvKey, $this->options['memsize'], $this->options['perm']);
170
+ if ($shmid !== \false) {
171
+ $ret = \shm_put_var($shmid, $this->options['variableKey'], $this->items);
172
+ \shm_detach($shmid);
173
+ return $ret;
174
+ }
175
+ return \false;
176
+ }
177
+ /**
178
+ * Load the items from the shared memory.
179
+ *
180
+ * @return bool true when success, false upon failure
181
+ */
182
+ private function loadItems()
183
+ {
184
+ $shmid = \shm_attach($this->sysvKey, $this->options['memsize'], $this->options['perm']);
185
+ if ($shmid !== \false) {
186
+ $data = @\shm_get_var($shmid, $this->options['variableKey']);
187
+ if (!empty($data)) {
188
+ $this->items = $data;
189
+ } else {
190
+ $this->items = [];
191
+ }
192
+ \shm_detach($shmid);
193
+ $this->hasLoadedItems = \true;
194
+ return \true;
195
+ }
196
+ return \false;
197
+ }
198
+ }
third-party/google/auth/src/CacheTrait.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ trait CacheTrait
21
+ {
22
+ private $maxKeyLength = 64;
23
+ /**
24
+ * Gets the cached value if it is present in the cache when that is
25
+ * available.
26
+ */
27
+ private function getCachedValue($k)
28
+ {
29
+ if (\is_null($this->cache)) {
30
+ return;
31
+ }
32
+ $key = $this->getFullCacheKey($k);
33
+ if (\is_null($key)) {
34
+ return;
35
+ }
36
+ $cacheItem = $this->cache->getItem($key);
37
+ if ($cacheItem->isHit()) {
38
+ return $cacheItem->get();
39
+ }
40
+ }
41
+ /**
42
+ * Saves the value in the cache when that is available.
43
+ */
44
+ private function setCachedValue($k, $v)
45
+ {
46
+ if (\is_null($this->cache)) {
47
+ return;
48
+ }
49
+ $key = $this->getFullCacheKey($k);
50
+ if (\is_null($key)) {
51
+ return;
52
+ }
53
+ $cacheItem = $this->cache->getItem($key);
54
+ $cacheItem->set($v);
55
+ $cacheItem->expiresAfter($this->cacheConfig['lifetime']);
56
+ return $this->cache->save($cacheItem);
57
+ }
58
+ private function getFullCacheKey($key)
59
+ {
60
+ if (\is_null($key)) {
61
+ return;
62
+ }
63
+ $key = $this->cacheConfig['prefix'] . $key;
64
+ // ensure we do not have illegal characters
65
+ $key = \preg_replace('|[^a-zA-Z0-9_\\.!]|', '', $key);
66
+ // Hash keys if they exceed $maxKeyLength (defaults to 64)
67
+ if ($this->maxKeyLength && \strlen($key) > $this->maxKeyLength) {
68
+ $key = \substr(\hash('sha256', $key), 0, $this->maxKeyLength);
69
+ }
70
+ return $key;
71
+ }
72
+ }
third-party/google/auth/src/Credentials/AppIdentityCredentials.php ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ /*
21
+ * The AppIdentityService class is automatically defined on App Engine,
22
+ * so including this dependency is not necessary, and will result in a
23
+ * PHP fatal error in the App Engine environment.
24
+ */
25
+ use SimpleCalendar\plugin_deps\google\appengine\api\app_identity\AppIdentityService;
26
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
27
+ use SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface;
28
+ use SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface;
29
+ /**
30
+ * AppIdentityCredentials supports authorization on Google App Engine.
31
+ *
32
+ * It can be used to authorize requests using the AuthTokenMiddleware or
33
+ * AuthTokenSubscriber, but will only succeed if being run on App Engine:
34
+ *
35
+ * Example:
36
+ * ```
37
+ * use Google\Auth\Credentials\AppIdentityCredentials;
38
+ * use Google\Auth\Middleware\AuthTokenMiddleware;
39
+ * use GuzzleHttp\Client;
40
+ * use GuzzleHttp\HandlerStack;
41
+ *
42
+ * $gae = new AppIdentityCredentials('https://www.googleapis.com/auth/books');
43
+ * $middleware = new AuthTokenMiddleware($gae);
44
+ * $stack = HandlerStack::create();
45
+ * $stack->push($middleware);
46
+ *
47
+ * $client = new Client([
48
+ * 'handler' => $stack,
49
+ * 'base_uri' => 'https://www.googleapis.com/books/v1',
50
+ * 'auth' => 'google_auth'
51
+ * ]);
52
+ *
53
+ * $res = $client->get('volumes?q=Henry+David+Thoreau&country=US');
54
+ * ```
55
+ */
56
+ class AppIdentityCredentials extends CredentialsLoader implements SignBlobInterface, ProjectIdProviderInterface
57
+ {
58
+ /**
59
+ * Result of fetchAuthToken.
60
+ *
61
+ * @var array
62
+ */
63
+ protected $lastReceivedToken;
64
+ /**
65
+ * Array of OAuth2 scopes to be requested.
66
+ *
67
+ * @var array
68
+ */
69
+ private $scope;
70
+ /**
71
+ * @var string
72
+ */
73
+ private $clientName;
74
+ /**
75
+ * @param array $scope One or more scopes.
76
+ */
77
+ public function __construct($scope = array())
78
+ {
79
+ $this->scope = $scope;
80
+ }
81
+ /**
82
+ * Determines if this an App Engine instance, by accessing the
83
+ * SERVER_SOFTWARE environment variable (prod) or the APPENGINE_RUNTIME
84
+ * environment variable (dev).
85
+ *
86
+ * @return bool true if this an App Engine Instance, false otherwise
87
+ */
88
+ public static function onAppEngine()
89
+ {
90
+ $appEngineProduction = isset($_SERVER['SERVER_SOFTWARE']) && 0 === \strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine');
91
+ if ($appEngineProduction) {
92
+ return \true;
93
+ }
94
+ $appEngineDevAppServer = isset($_SERVER['APPENGINE_RUNTIME']) && $_SERVER['APPENGINE_RUNTIME'] == 'php';
95
+ if ($appEngineDevAppServer) {
96
+ return \true;
97
+ }
98
+ return \false;
99
+ }
100
+ /**
101
+ * Implements FetchAuthTokenInterface#fetchAuthToken.
102
+ *
103
+ * Fetches the auth tokens using the AppIdentityService if available.
104
+ * As the AppIdentityService uses protobufs to fetch the access token,
105
+ * the GuzzleHttp\ClientInterface instance passed in will not be used.
106
+ *
107
+ * @param callable $httpHandler callback which delivers psr7 request
108
+ * @return array A set of auth related metadata, containing the following
109
+ * keys:
110
+ * - access_token (string)
111
+ * - expiration_time (string)
112
+ */
113
+ public function fetchAuthToken(callable $httpHandler = null)
114
+ {
115
+ try {
116
+ $this->checkAppEngineContext();
117
+ } catch (\Exception $e) {
118
+ return [];
119
+ }
120
+ // AppIdentityService expects an array when multiple scopes are supplied
121
+ $scope = \is_array($this->scope) ? $this->scope : \explode(' ', $this->scope);
122
+ $token = AppIdentityService::getAccessToken($scope);
123
+ $this->lastReceivedToken = $token;
124
+ return $token;
125
+ }
126
+ /**
127
+ * Sign a string using AppIdentityService.
128
+ *
129
+ * @param string $stringToSign The string to sign.
130
+ * @param bool $forceOpenSsl [optional] Does not apply to this credentials
131
+ * type.
132
+ * @return string The signature, base64-encoded.
133
+ * @throws \Exception If AppEngine SDK or mock is not available.
134
+ */
135
+ public function signBlob($stringToSign, $forceOpenSsl = \false)
136
+ {
137
+ $this->checkAppEngineContext();
138
+ return \base64_encode(AppIdentityService::signForApp($stringToSign)['signature']);
139
+ }
140
+ /**
141
+ * Get the project ID from AppIdentityService.
142
+ *
143
+ * Returns null if AppIdentityService is unavailable.
144
+ *
145
+ * @param callable $httpHandler Not used by this type.
146
+ * @return string|null
147
+ */
148
+ public function getProjectId(callable $httpHander = null)
149
+ {
150
+ try {
151
+ $this->checkAppEngineContext();
152
+ } catch (\Exception $e) {
153
+ return null;
154
+ }
155
+ return AppIdentityService::getApplicationId();
156
+ }
157
+ /**
158
+ * Get the client name from AppIdentityService.
159
+ *
160
+ * Subsequent calls to this method will return a cached value.
161
+ *
162
+ * @param callable $httpHandler Not used in this implementation.
163
+ * @return string
164
+ * @throws \Exception If AppEngine SDK or mock is not available.
165
+ */
166
+ public function getClientName(callable $httpHandler = null)
167
+ {
168
+ $this->checkAppEngineContext();
169
+ if (!$this->clientName) {
170
+ $this->clientName = AppIdentityService::getServiceAccountName();
171
+ }
172
+ return $this->clientName;
173
+ }
174
+ /**
175
+ * @return array|null
176
+ */
177
+ public function getLastReceivedToken()
178
+ {
179
+ if ($this->lastReceivedToken) {
180
+ return ['access_token' => $this->lastReceivedToken['access_token'], 'expires_at' => $this->lastReceivedToken['expiration_time']];
181
+ }
182
+ return null;
183
+ }
184
+ /**
185
+ * Caching is handled by the underlying AppIdentityService, return empty string
186
+ * to prevent caching.
187
+ *
188
+ * @return string
189
+ */
190
+ public function getCacheKey()
191
+ {
192
+ return '';
193
+ }
194
+ private function checkAppEngineContext()
195
+ {
196
+ if (!self::onAppEngine() || !\class_exists('SimpleCalendar\\plugin_deps\\google\\appengine\\api\\app_identity\\AppIdentityService')) {
197
+ throw new \Exception('This class must be run in App Engine, or you must include the AppIdentityService ' . 'mock class defined in tests/mocks/AppIdentityService.php');
198
+ }
199
+ }
200
+ }
third-party/google/auth/src/Credentials/GCECredentials.php ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpClientCache;
23
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
24
+ use SimpleCalendar\plugin_deps\Google\Auth\Iam;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface;
26
+ use SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface;
27
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\ClientException;
28
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\ConnectException;
29
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\RequestException;
30
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\ServerException;
31
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
32
+ use InvalidArgumentException;
33
+ /**
34
+ * GCECredentials supports authorization on Google Compute Engine.
35
+ *
36
+ * It can be used to authorize requests using the AuthTokenMiddleware, but will
37
+ * only succeed if being run on GCE:
38
+ *
39
+ * use Google\Auth\Credentials\GCECredentials;
40
+ * use Google\Auth\Middleware\AuthTokenMiddleware;
41
+ * use GuzzleHttp\Client;
42
+ * use GuzzleHttp\HandlerStack;
43
+ *
44
+ * $gce = new GCECredentials();
45
+ * $middleware = new AuthTokenMiddleware($gce);
46
+ * $stack = HandlerStack::create();
47
+ * $stack->push($middleware);
48
+ *
49
+ * $client = new Client([
50
+ * 'handler' => $stack,
51
+ * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
52
+ * 'auth' => 'google_auth'
53
+ * ]);
54
+ *
55
+ * $res = $client->get('myproject/taskqueues/myqueue');
56
+ */
57
+ class GCECredentials extends CredentialsLoader implements SignBlobInterface, ProjectIdProviderInterface, GetQuotaProjectInterface
58
+ {
59
+ // phpcs:disable
60
+ const cacheKey = 'GOOGLE_AUTH_PHP_GCE';
61
+ // phpcs:enable
62
+ /**
63
+ * The metadata IP address on appengine instances.
64
+ *
65
+ * The IP is used instead of the domain 'metadata' to avoid slow responses
66
+ * when not on Compute Engine.
67
+ */
68
+ const METADATA_IP = '169.254.169.254';
69
+ /**
70
+ * The metadata path of the default token.
71
+ */
72
+ const TOKEN_URI_PATH = 'v1/instance/service-accounts/default/token';
73
+ /**
74
+ * The metadata path of the default id token.
75
+ */
76
+ const ID_TOKEN_URI_PATH = 'v1/instance/service-accounts/default/identity';
77
+ /**
78
+ * The metadata path of the client ID.
79
+ */
80
+ const CLIENT_ID_URI_PATH = 'v1/instance/service-accounts/default/email';
81
+ /**
82
+ * The metadata path of the project ID.
83
+ */
84
+ const PROJECT_ID_URI_PATH = 'v1/project/project-id';
85
+ /**
86
+ * The header whose presence indicates GCE presence.
87
+ */
88
+ const FLAVOR_HEADER = 'Metadata-Flavor';
89
+ /**
90
+ * Note: the explicit `timeout` and `tries` below is a workaround. The underlying
91
+ * issue is that resolving an unknown host on some networks will take
92
+ * 20-30 seconds; making this timeout short fixes the issue, but
93
+ * could lead to false negatives in the event that we are on GCE, but
94
+ * the metadata resolution was particularly slow. The latter case is
95
+ * "unlikely" since the expected 4-nines time is about 0.5 seconds.
96
+ * This allows us to limit the total ping maximum timeout to 1.5 seconds
97
+ * for developer desktop scenarios.
98
+ */
99
+ const MAX_COMPUTE_PING_TRIES = 3;
100
+ const COMPUTE_PING_CONNECTION_TIMEOUT_S = 0.5;
101
+ /**
102
+ * Flag used to ensure that the onGCE test is only done once;.
103
+ *
104
+ * @var bool
105
+ */
106
+ private $hasCheckedOnGce = \false;
107
+ /**
108
+ * Flag that stores the value of the onGCE check.
109
+ *
110
+ * @var bool
111
+ */
112
+ private $isOnGce = \false;
113
+ /**
114
+ * Result of fetchAuthToken.
115
+ */
116
+ protected $lastReceivedToken;
117
+ /**
118
+ * @var string|null
119
+ */
120
+ private $clientName;
121
+ /**
122
+ * @var string|null
123
+ */
124
+ private $projectId;
125
+ /**
126
+ * @var Iam|null
127
+ */
128
+ private $iam;
129
+ /**
130
+ * @var string
131
+ */
132
+ private $tokenUri;
133
+ /**
134
+ * @var string
135
+ */
136
+ private $targetAudience;
137
+ /**
138
+ * @var string|null
139
+ */
140
+ private $quotaProject;
141
+ /**
142
+ * @var string|null
143
+ */
144
+ private $serviceAccountIdentity;
145
+ /**
146
+ * @param Iam $iam [optional] An IAM instance.
147
+ * @param string|array $scope [optional] the scope of the access request,
148
+ * expressed either as an array or as a space-delimited string.
149
+ * @param string $targetAudience [optional] The audience for the ID token.
150
+ * @param string $quotaProject [optional] Specifies a project to bill for access
151
+ * charges associated with the request.
152
+ * @param string $serviceAccountIdentity [optional] Specify a service
153
+ * account identity name to use instead of "default".
154
+ */
155
+ public function __construct(Iam $iam = null, $scope = null, $targetAudience = null, $quotaProject = null, $serviceAccountIdentity = null)
156
+ {
157
+ $this->iam = $iam;
158
+ if ($scope && $targetAudience) {
159
+ throw new InvalidArgumentException('Scope and targetAudience cannot both be supplied');
160
+ }
161
+ $tokenUri = self::getTokenUri($serviceAccountIdentity);
162
+ if ($scope) {
163
+ if (\is_string($scope)) {
164
+ $scope = \explode(' ', $scope);
165
+ }
166
+ $scope = \implode(',', $scope);
167
+ $tokenUri = $tokenUri . '?scopes=' . $scope;
168
+ } elseif ($targetAudience) {
169
+ $tokenUri = self::getIdTokenUri($serviceAccountIdentity);
170
+ $tokenUri = $tokenUri . '?audience=' . $targetAudience;
171
+ $this->targetAudience = $targetAudience;
172
+ }
173
+ $this->tokenUri = $tokenUri;
174
+ $this->quotaProject = $quotaProject;
175
+ $this->serviceAccountIdentity = $serviceAccountIdentity;
176
+ }
177
+ /**
178
+ * The full uri for accessing the default token.
179
+ *
180
+ * @param string $serviceAccountIdentity [optional] Specify a service
181
+ * account identity name to use instead of "default".
182
+ * @return string
183
+ */
184
+ public static function getTokenUri($serviceAccountIdentity = null)
185
+ {
186
+ $base = 'http://' . self::METADATA_IP . '/computeMetadata/';
187
+ $base .= self::TOKEN_URI_PATH;
188
+ if ($serviceAccountIdentity) {
189
+ return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base);
190
+ }
191
+ return $base;
192
+ }
193
+ /**
194
+ * The full uri for accessing the default service account.
195
+ *
196
+ * @param string $serviceAccountIdentity [optional] Specify a service
197
+ * account identity name to use instead of "default".
198
+ * @return string
199
+ */
200
+ public static function getClientNameUri($serviceAccountIdentity = null)
201
+ {
202
+ $base = 'http://' . self::METADATA_IP . '/computeMetadata/';
203
+ $base .= self::CLIENT_ID_URI_PATH;
204
+ if ($serviceAccountIdentity) {
205
+ return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base);
206
+ }
207
+ return $base;
208
+ }
209
+ /**
210
+ * The full uri for accesesing the default identity token.
211
+ *
212
+ * @param string $serviceAccountIdentity [optional] Specify a service
213
+ * account identity name to use instead of "default".
214
+ * @return string
215
+ */
216
+ private static function getIdTokenUri($serviceAccountIdentity = null)
217
+ {
218
+ $base = 'http://' . self::METADATA_IP . '/computeMetadata/';
219
+ $base .= self::ID_TOKEN_URI_PATH;
220
+ if ($serviceAccountIdentity) {
221
+ return \str_replace('/default/', '/' . $serviceAccountIdentity . '/', $base);
222
+ }
223
+ return $base;
224
+ }
225
+ /**
226
+ * The full uri for accessing the default project ID.
227
+ *
228
+ * @return string
229
+ */
230
+ private static function getProjectIdUri()
231
+ {
232
+ $base = 'http://' . self::METADATA_IP . '/computeMetadata/';
233
+ return $base . self::PROJECT_ID_URI_PATH;
234
+ }
235
+ /**
236
+ * Determines if this an App Engine Flexible instance, by accessing the
237
+ * GAE_INSTANCE environment variable.
238
+ *
239
+ * @return bool true if this an App Engine Flexible Instance, false otherwise
240
+ */
241
+ public static function onAppEngineFlexible()
242
+ {
243
+ return \substr(\getenv('GAE_INSTANCE'), 0, 4) === 'aef-';
244
+ }
245
+ /**
246
+ * Determines if this a GCE instance, by accessing the expected metadata
247
+ * host.
248
+ * If $httpHandler is not specified a the default HttpHandler is used.
249
+ *
250
+ * @param callable $httpHandler callback which delivers psr7 request
251
+ * @return bool True if this a GCEInstance, false otherwise
252
+ */
253
+ public static function onGce(callable $httpHandler = null)
254
+ {
255
+ $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
256
+ $checkUri = 'http://' . self::METADATA_IP;
257
+ for ($i = 1; $i <= self::MAX_COMPUTE_PING_TRIES; $i++) {
258
+ try {
259
+ // Comment from: oauth2client/client.py
260
+ //
261
+ // Note: the explicit `timeout` below is a workaround. The underlying
262
+ // issue is that resolving an unknown host on some networks will take
263
+ // 20-30 seconds; making this timeout short fixes the issue, but
264
+ // could lead to false negatives in the event that we are on GCE, but
265
+ // the metadata resolution was particularly slow. The latter case is
266
+ // "unlikely".
267
+ $resp = $httpHandler(new Request('GET', $checkUri, [self::FLAVOR_HEADER => 'Google']), ['timeout' => self::COMPUTE_PING_CONNECTION_TIMEOUT_S]);
268
+ return $resp->getHeaderLine(self::FLAVOR_HEADER) == 'Google';
269
+ } catch (ClientException $e) {
270
+ } catch (ServerException $e) {
271
+ } catch (RequestException $e) {
272
+ } catch (ConnectException $e) {
273
+ }
274
+ }
275
+ return \false;
276
+ }
277
+ /**
278
+ * Implements FetchAuthTokenInterface#fetchAuthToken.
279
+ *
280
+ * Fetches the auth tokens from the GCE metadata host if it is available.
281
+ * If $httpHandler is not specified a the default HttpHandler is used.
282
+ *
283
+ * @param callable $httpHandler callback which delivers psr7 request
284
+ *
285
+ * @return array A set of auth related metadata, based on the token type.
286
+ *
287
+ * Access tokens have the following keys:
288
+ * - access_token (string)
289
+ * - expires_in (int)
290
+ * - token_type (string)
291
+ * ID tokens have the following keys:
292
+ * - id_token (string)
293
+ *
294
+ * @throws \Exception
295
+ */
296
+ public function fetchAuthToken(callable $httpHandler = null)
297
+ {
298
+ $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
299
+ if (!$this->hasCheckedOnGce) {
300
+ $this->isOnGce = self::onGce($httpHandler);
301
+ $this->hasCheckedOnGce = \true;
302
+ }
303
+ if (!$this->isOnGce) {
304
+ return array();
305
+ // return an empty array with no access token
306
+ }
307
+ $response = $this->getFromMetadata($httpHandler, $this->tokenUri);
308
+ if ($this->targetAudience) {
309
+ return ['id_token' => $response];
310
+ }
311
+ if (null === ($json = \json_decode($response, \true))) {
312
+ throw new \Exception('Invalid JSON response');
313
+ }
314
+ $json['expires_at'] = \time() + $json['expires_in'];
315
+ // store this so we can retrieve it later
316
+ $this->lastReceivedToken = $json;
317
+ return $json;
318
+ }
319
+ /**
320
+ * @return string
321
+ */
322
+ public function getCacheKey()
323
+ {
324
+ return self::cacheKey;
325
+ }
326
+ /**
327
+ * @return array|null
328
+ */
329
+ public function getLastReceivedToken()
330
+ {
331
+ if ($this->lastReceivedToken) {
332
+ return ['access_token' => $this->lastReceivedToken['access_token'], 'expires_at' => $this->lastReceivedToken['expires_at']];
333
+ }
334
+ return null;
335
+ }
336
+ /**
337
+ * Get the client name from GCE metadata.
338
+ *
339
+ * Subsequent calls will return a cached value.
340
+ *
341
+ * @param callable $httpHandler callback which delivers psr7 request
342
+ * @return string
343
+ */
344
+ public function getClientName(callable $httpHandler = null)
345
+ {
346
+ if ($this->clientName) {
347
+ return $this->clientName;
348
+ }
349
+ $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
350
+ if (!$this->hasCheckedOnGce) {
351
+ $this->isOnGce = self::onGce($httpHandler);
352
+ $this->hasCheckedOnGce = \true;
353
+ }
354
+ if (!$this->isOnGce) {
355
+ return '';
356
+ }
357
+ $this->clientName = $this->getFromMetadata($httpHandler, self::getClientNameUri($this->serviceAccountIdentity));
358
+ return $this->clientName;
359
+ }
360
+ /**
361
+ * Sign a string using the default service account private key.
362
+ *
363
+ * This implementation uses IAM's signBlob API.
364
+ *
365
+ * @see https://cloud.google.com/iam/credentials/reference/rest/v1/projects.serviceAccounts/signBlob SignBlob
366
+ *
367
+ * @param string $stringToSign The string to sign.
368
+ * @param bool $forceOpenSsl [optional] Does not apply to this credentials
369
+ * type.
370
+ * @return string
371
+ */
372
+ public function signBlob($stringToSign, $forceOpenSsl = \false)
373
+ {
374
+ $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
375
+ // Providing a signer is useful for testing, but it's undocumented
376
+ // because it's not something a user would generally need to do.
377
+ $signer = $this->iam ?: new Iam($httpHandler);
378
+ $email = $this->getClientName($httpHandler);
379
+ $previousToken = $this->getLastReceivedToken();
380
+ $accessToken = $previousToken ? $previousToken['access_token'] : $this->fetchAuthToken($httpHandler)['access_token'];
381
+ return $signer->signBlob($email, $accessToken, $stringToSign);
382
+ }
383
+ /**
384
+ * Fetch the default Project ID from compute engine.
385
+ *
386
+ * Returns null if called outside GCE.
387
+ *
388
+ * @param callable $httpHandler Callback which delivers psr7 request
389
+ * @return string|null
390
+ */
391
+ public function getProjectId(callable $httpHandler = null)
392
+ {
393
+ if ($this->projectId) {
394
+ return $this->projectId;
395
+ }
396
+ $httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
397
+ if (!$this->hasCheckedOnGce) {
398
+ $this->isOnGce = self::onGce($httpHandler);
399
+ $this->hasCheckedOnGce = \true;
400
+ }
401
+ if (!$this->isOnGce) {
402
+ return null;
403
+ }
404
+ $this->projectId = $this->getFromMetadata($httpHandler, self::getProjectIdUri());
405
+ return $this->projectId;
406
+ }
407
+ /**
408
+ * Fetch the value of a GCE metadata server URI.
409
+ *
410
+ * @param callable $httpHandler An HTTP Handler to deliver PSR7 requests.
411
+ * @param string $uri The metadata URI.
412
+ * @return string
413
+ */
414
+ private function getFromMetadata(callable $httpHandler, $uri)
415
+ {
416
+ $resp = $httpHandler(new Request('GET', $uri, [self::FLAVOR_HEADER => 'Google']));
417
+ return (string) $resp->getBody();
418
+ }
419
+ /**
420
+ * Get the quota project used for this API request
421
+ *
422
+ * @return string|null
423
+ */
424
+ public function getQuotaProject()
425
+ {
426
+ return $this->quotaProject;
427
+ }
428
+ }
third-party/google/auth/src/Credentials/IAMCredentials.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ /**
21
+ * Authenticates requests using IAM credentials.
22
+ */
23
+ class IAMCredentials
24
+ {
25
+ const SELECTOR_KEY = 'x-goog-iam-authority-selector';
26
+ const TOKEN_KEY = 'x-goog-iam-authorization-token';
27
+ /**
28
+ * @var string
29
+ */
30
+ private $selector;
31
+ /**
32
+ * @var string
33
+ */
34
+ private $token;
35
+ /**
36
+ * @param $selector string the IAM selector
37
+ * @param $token string the IAM token
38
+ */
39
+ public function __construct($selector, $token)
40
+ {
41
+ if (!\is_string($selector)) {
42
+ throw new \InvalidArgumentException('selector must be a string');
43
+ }
44
+ if (!\is_string($token)) {
45
+ throw new \InvalidArgumentException('token must be a string');
46
+ }
47
+ $this->selector = $selector;
48
+ $this->token = $token;
49
+ }
50
+ /**
51
+ * export a callback function which updates runtime metadata.
52
+ *
53
+ * @return array updateMetadata function
54
+ */
55
+ public function getUpdateMetadataFunc()
56
+ {
57
+ return array($this, 'updateMetadata');
58
+ }
59
+ /**
60
+ * Updates metadata with the appropriate header metadata.
61
+ *
62
+ * @param array $metadata metadata hashmap
63
+ * @param string $unusedAuthUri optional auth uri
64
+ * @param callable $httpHandler callback which delivers psr7 request
65
+ * Note: this param is unused here, only included here for
66
+ * consistency with other credentials class
67
+ *
68
+ * @return array updated metadata hashmap
69
+ */
70
+ public function updateMetadata($metadata, $unusedAuthUri = null, callable $httpHandler = null)
71
+ {
72
+ $metadata_copy = $metadata;
73
+ $metadata_copy[self::SELECTOR_KEY] = $this->selector;
74
+ $metadata_copy[self::TOKEN_KEY] = $this->token;
75
+ return $metadata_copy;
76
+ }
77
+ }
third-party/google/auth/src/Credentials/InsecureCredentials.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2018 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface;
21
+ /**
22
+ * Provides a set of credentials that will always return an empty access token.
23
+ * This is useful for APIs which do not require authentication, for local
24
+ * service emulators, and for testing.
25
+ */
26
+ class InsecureCredentials implements FetchAuthTokenInterface
27
+ {
28
+ /**
29
+ * @var array
30
+ */
31
+ private $token = ['access_token' => ''];
32
+ /**
33
+ * Fetches the auth token. In this case it returns an empty string.
34
+ *
35
+ * @param callable $httpHandler
36
+ * @return array A set of auth related metadata, containing the following
37
+ * keys:
38
+ * - access_token (string)
39
+ */
40
+ public function fetchAuthToken(callable $httpHandler = null)
41
+ {
42
+ return $this->token;
43
+ }
44
+ /**
45
+ * Returns the cache key. In this case it returns a null value, disabling
46
+ * caching.
47
+ *
48
+ * @return string|null
49
+ */
50
+ public function getCacheKey()
51
+ {
52
+ return null;
53
+ }
54
+ /**
55
+ * Fetches the last received token. In this case, it returns the same empty string
56
+ * auth token.
57
+ *
58
+ * @return array
59
+ */
60
+ public function getLastReceivedToken()
61
+ {
62
+ return $this->token;
63
+ }
64
+ }
third-party/google/auth/src/Credentials/ServiceAccountCredentials.php ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\OAuth2;
23
+ use SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface;
24
+ use SimpleCalendar\plugin_deps\Google\Auth\ServiceAccountSignerTrait;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface;
26
+ use InvalidArgumentException;
27
+ /**
28
+ * ServiceAccountCredentials supports authorization using a Google service
29
+ * account.
30
+ *
31
+ * (cf https://developers.google.com/accounts/docs/OAuth2ServiceAccount)
32
+ *
33
+ * It's initialized using the json key file that's downloadable from developer
34
+ * console, which should contain a private_key and client_email fields that it
35
+ * uses.
36
+ *
37
+ * Use it with AuthTokenMiddleware to authorize http requests:
38
+ *
39
+ * use Google\Auth\Credentials\ServiceAccountCredentials;
40
+ * use Google\Auth\Middleware\AuthTokenMiddleware;
41
+ * use GuzzleHttp\Client;
42
+ * use GuzzleHttp\HandlerStack;
43
+ *
44
+ * $sa = new ServiceAccountCredentials(
45
+ * 'https://www.googleapis.com/auth/taskqueue',
46
+ * '/path/to/your/json/key_file.json'
47
+ * );
48
+ * $middleware = new AuthTokenMiddleware($sa);
49
+ * $stack = HandlerStack::create();
50
+ * $stack->push($middleware);
51
+ *
52
+ * $client = new Client([
53
+ * 'handler' => $stack,
54
+ * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
55
+ * 'auth' => 'google_auth' // authorize all requests
56
+ * ]);
57
+ *
58
+ * $res = $client->get('myproject/taskqueues/myqueue');
59
+ */
60
+ class ServiceAccountCredentials extends CredentialsLoader implements GetQuotaProjectInterface, SignBlobInterface, ProjectIdProviderInterface
61
+ {
62
+ use ServiceAccountSignerTrait;
63
+ /**
64
+ * The OAuth2 instance used to conduct authorization.
65
+ *
66
+ * @var OAuth2
67
+ */
68
+ protected $auth;
69
+ /**
70
+ * The quota project associated with the JSON credentials
71
+ *
72
+ * @var string
73
+ */
74
+ protected $quotaProject;
75
+ /*
76
+ * @var string|null
77
+ */
78
+ protected $projectId;
79
+ /*
80
+ * @var array|null
81
+ */
82
+ private $lastReceivedJwtAccessToken;
83
+ /**
84
+ * Create a new ServiceAccountCredentials.
85
+ *
86
+ * @param string|array $scope the scope of the access request, expressed
87
+ * either as an Array or as a space-delimited String.
88
+ * @param string|array $jsonKey JSON credential file path or JSON credentials
89
+ * as an associative array
90
+ * @param string $sub an email address account to impersonate, in situations when
91
+ * the service account has been delegated domain wide access.
92
+ * @param string $targetAudience The audience for the ID token.
93
+ */
94
+ public function __construct($scope, $jsonKey, $sub = null, $targetAudience = null)
95
+ {
96
+ if (\is_string($jsonKey)) {
97
+ if (!\file_exists($jsonKey)) {
98
+ throw new \InvalidArgumentException('file does not exist');
99
+ }
100
+ $jsonKeyStream = \file_get_contents($jsonKey);
101
+ if (!($jsonKey = \json_decode($jsonKeyStream, \true))) {
102
+ throw new \LogicException('invalid json for auth config');
103
+ }
104
+ }
105
+ if (!\array_key_exists('client_email', $jsonKey)) {
106
+ throw new \InvalidArgumentException('json key is missing the client_email field');
107
+ }
108
+ if (!\array_key_exists('private_key', $jsonKey)) {
109
+ throw new \InvalidArgumentException('json key is missing the private_key field');
110
+ }
111
+ if (\array_key_exists('quota_project_id', $jsonKey)) {
112
+ $this->quotaProject = (string) $jsonKey['quota_project_id'];
113
+ }
114
+ if ($scope && $targetAudience) {
115
+ throw new InvalidArgumentException('Scope and targetAudience cannot both be supplied');
116
+ }
117
+ $additionalClaims = [];
118
+ if ($targetAudience) {
119
+ $additionalClaims = ['target_audience' => $targetAudience];
120
+ }
121
+ $this->auth = new OAuth2(['audience' => self::TOKEN_CREDENTIAL_URI, 'issuer' => $jsonKey['client_email'], 'scope' => $scope, 'signingAlgorithm' => 'RS256', 'signingKey' => $jsonKey['private_key'], 'sub' => $sub, 'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI, 'additionalClaims' => $additionalClaims]);
122
+ $this->projectId = isset($jsonKey['project_id']) ? $jsonKey['project_id'] : null;
123
+ }
124
+ /**
125
+ * @param callable $httpHandler
126
+ *
127
+ * @return array A set of auth related metadata, containing the following
128
+ * keys:
129
+ * - access_token (string)
130
+ * - expires_in (int)
131
+ * - token_type (string)
132
+ */
133
+ public function fetchAuthToken(callable $httpHandler = null)
134
+ {
135
+ return $this->auth->fetchAuthToken($httpHandler);
136
+ }
137
+ /**
138
+ * @return string
139
+ */
140
+ public function getCacheKey()
141
+ {
142
+ $key = $this->auth->getIssuer() . ':' . $this->auth->getCacheKey();
143
+ if ($sub = $this->auth->getSub()) {
144
+ $key .= ':' . $sub;
145
+ }
146
+ return $key;
147
+ }
148
+ /**
149
+ * @return array
150
+ */
151
+ public function getLastReceivedToken()
152
+ {
153
+ // If self-signed JWTs are being used, fetch the last received token
154
+ // from memory. Else, fetch it from OAuth2
155
+ return $this->useSelfSignedJwt() ? $this->lastReceivedJwtAccessToken : $this->auth->getLastReceivedToken();
156
+ }
157
+ /**
158
+ * Get the project ID from the service account keyfile.
159
+ *
160
+ * Returns null if the project ID does not exist in the keyfile.
161
+ *
162
+ * @param callable $httpHandler Not used by this credentials type.
163
+ * @return string|null
164
+ */
165
+ public function getProjectId(callable $httpHandler = null)
166
+ {
167
+ return $this->projectId;
168
+ }
169
+ /**
170
+ * Updates metadata with the authorization token.
171
+ *
172
+ * @param array $metadata metadata hashmap
173
+ * @param string $authUri optional auth uri
174
+ * @param callable $httpHandler callback which delivers psr7 request
175
+ * @return array updated metadata hashmap
176
+ */
177
+ public function updateMetadata($metadata, $authUri = null, callable $httpHandler = null)
178
+ {
179
+ // scope exists. use oauth implementation
180
+ if (!$this->useSelfSignedJwt()) {
181
+ return parent::updateMetadata($metadata, $authUri, $httpHandler);
182
+ }
183
+ // no scope found. create jwt with the auth uri
184
+ $credJson = array('private_key' => $this->auth->getSigningKey(), 'client_email' => $this->auth->getIssuer());
185
+ $jwtCreds = new \SimpleCalendar\plugin_deps\Google\Auth\Credentials\ServiceAccountJwtAccessCredentials($credJson);
186
+ $updatedMetadata = $jwtCreds->updateMetadata($metadata, $authUri, $httpHandler);
187
+ if ($lastReceivedToken = $jwtCreds->getLastReceivedToken()) {
188
+ // Keep self-signed JWTs in memory as the last received token
189
+ $this->lastReceivedJwtAccessToken = $lastReceivedToken;
190
+ }
191
+ return $updatedMetadata;
192
+ }
193
+ /**
194
+ * @param string $sub an email address account to impersonate, in situations when
195
+ * the service account has been delegated domain wide access.
196
+ */
197
+ public function setSub($sub)
198
+ {
199
+ $this->auth->setSub($sub);
200
+ }
201
+ /**
202
+ * Get the client name from the keyfile.
203
+ *
204
+ * In this case, it returns the keyfile's client_email key.
205
+ *
206
+ * @param callable $httpHandler Not used by this credentials type.
207
+ * @return string
208
+ */
209
+ public function getClientName(callable $httpHandler = null)
210
+ {
211
+ return $this->auth->getIssuer();
212
+ }
213
+ /**
214
+ * Get the quota project used for this API request
215
+ *
216
+ * @return string|null
217
+ */
218
+ public function getQuotaProject()
219
+ {
220
+ return $this->quotaProject;
221
+ }
222
+ private function useSelfSignedJwt()
223
+ {
224
+ return \is_null($this->auth->getScope());
225
+ }
226
+ }
third-party/google/auth/src/Credentials/ServiceAccountJwtAccessCredentials.php ADDED
@@ -0,0 +1,160 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\OAuth2;
23
+ use SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface;
24
+ use SimpleCalendar\plugin_deps\Google\Auth\ServiceAccountSignerTrait;
25
+ use SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface;
26
+ /**
27
+ * Authenticates requests using Google's Service Account credentials via
28
+ * JWT Access.
29
+ *
30
+ * This class allows authorizing requests for service accounts directly
31
+ * from credentials from a json key file downloaded from the developer
32
+ * console (via 'Generate new Json Key'). It is not part of any OAuth2
33
+ * flow, rather it creates a JWT and sends that as a credential.
34
+ */
35
+ class ServiceAccountJwtAccessCredentials extends CredentialsLoader implements GetQuotaProjectInterface, SignBlobInterface, ProjectIdProviderInterface
36
+ {
37
+ use ServiceAccountSignerTrait;
38
+ /**
39
+ * The OAuth2 instance used to conduct authorization.
40
+ *
41
+ * @var OAuth2
42
+ */
43
+ protected $auth;
44
+ /**
45
+ * The quota project associated with the JSON credentials
46
+ */
47
+ protected $quotaProject;
48
+ /**
49
+ * Create a new ServiceAccountJwtAccessCredentials.
50
+ *
51
+ * @param string|array $jsonKey JSON credential file path or JSON credentials
52
+ * as an associative array
53
+ */
54
+ public function __construct($jsonKey)
55
+ {
56
+ if (\is_string($jsonKey)) {
57
+ if (!\file_exists($jsonKey)) {
58
+ throw new \InvalidArgumentException('file does not exist');
59
+ }
60
+ $jsonKeyStream = \file_get_contents($jsonKey);
61
+ if (!($jsonKey = \json_decode($jsonKeyStream, \true))) {
62
+ throw new \LogicException('invalid json for auth config');
63
+ }
64
+ }
65
+ if (!\array_key_exists('client_email', $jsonKey)) {
66
+ throw new \InvalidArgumentException('json key is missing the client_email field');
67
+ }
68
+ if (!\array_key_exists('private_key', $jsonKey)) {
69
+ throw new \InvalidArgumentException('json key is missing the private_key field');
70
+ }
71
+ if (\array_key_exists('quota_project_id', $jsonKey)) {
72
+ $this->quotaProject = (string) $jsonKey['quota_project_id'];
73
+ }
74
+ $this->auth = new OAuth2(['issuer' => $jsonKey['client_email'], 'sub' => $jsonKey['client_email'], 'signingAlgorithm' => 'RS256', 'signingKey' => $jsonKey['private_key']]);
75
+ $this->projectId = isset($jsonKey['project_id']) ? $jsonKey['project_id'] : null;
76
+ }
77
+ /**
78
+ * Updates metadata with the authorization token.
79
+ *
80
+ * @param array $metadata metadata hashmap
81
+ * @param string $authUri optional auth uri
82
+ * @param callable $httpHandler callback which delivers psr7 request
83
+ * @return array updated metadata hashmap
84
+ */
85
+ public function updateMetadata($metadata, $authUri = null, callable $httpHandler = null)
86
+ {
87
+ if (empty($authUri)) {
88
+ return $metadata;
89
+ }
90
+ $this->auth->setAudience($authUri);
91
+ return parent::updateMetadata($metadata, $authUri, $httpHandler);
92
+ }
93
+ /**
94
+ * Implements FetchAuthTokenInterface#fetchAuthToken.
95
+ *
96
+ * @param callable $httpHandler
97
+ *
98
+ * @return array|void A set of auth related metadata, containing the
99
+ * following keys:
100
+ * - access_token (string)
101
+ */
102
+ public function fetchAuthToken(callable $httpHandler = null)
103
+ {
104
+ $audience = $this->auth->getAudience();
105
+ if (empty($audience)) {
106
+ return null;
107
+ }
108
+ $access_token = $this->auth->toJwt();
109
+ // Set the self-signed access token in OAuth2 for getLastReceivedToken
110
+ $this->auth->setAccessToken($access_token);
111
+ return array('access_token' => $access_token);
112
+ }
113
+ /**
114
+ * @return string
115
+ */
116
+ public function getCacheKey()
117
+ {
118
+ return $this->auth->getCacheKey();
119
+ }
120
+ /**
121
+ * @return array
122
+ */
123
+ public function getLastReceivedToken()
124
+ {
125
+ return $this->auth->getLastReceivedToken();
126
+ }
127
+ /**
128
+ * Get the project ID from the service account keyfile.
129
+ *
130
+ * Returns null if the project ID does not exist in the keyfile.
131
+ *
132
+ * @param callable $httpHandler Not used by this credentials type.
133
+ * @return string|null
134
+ */
135
+ public function getProjectId(callable $httpHandler = null)
136
+ {
137
+ return $this->projectId;
138
+ }
139
+ /**
140
+ * Get the client name from the keyfile.
141
+ *
142
+ * In this case, it returns the keyfile's client_email key.
143
+ *
144
+ * @param callable $httpHandler Not used by this credentials type.
145
+ * @return string
146
+ */
147
+ public function getClientName(callable $httpHandler = null)
148
+ {
149
+ return $this->auth->getIssuer();
150
+ }
151
+ /**
152
+ * Get the quota project used for this API request
153
+ *
154
+ * @return string|null
155
+ */
156
+ public function getQuotaProject()
157
+ {
158
+ return $this->quotaProject;
159
+ }
160
+ }
third-party/google/auth/src/Credentials/UserRefreshCredentials.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Credentials;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CredentialsLoader;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\OAuth2;
23
+ /**
24
+ * Authenticates requests using User Refresh credentials.
25
+ *
26
+ * This class allows authorizing requests from user refresh tokens.
27
+ *
28
+ * This the end of the result of a 3LO flow. E.g, the end result of
29
+ * 'gcloud auth login' saves a file with these contents in well known
30
+ * location
31
+ *
32
+ * @see [Application Default Credentials](http://goo.gl/mkAHpZ)
33
+ */
34
+ class UserRefreshCredentials extends CredentialsLoader implements GetQuotaProjectInterface
35
+ {
36
+ /**
37
+ * The OAuth2 instance used to conduct authorization.
38
+ *
39
+ * @var OAuth2
40
+ */
41
+ protected $auth;
42
+ /**
43
+ * The quota project associated with the JSON credentials
44
+ */
45
+ protected $quotaProject;
46
+ /**
47
+ * Create a new UserRefreshCredentials.
48
+ *
49
+ * @param string|array $scope the scope of the access request, expressed
50
+ * either as an Array or as a space-delimited String.
51
+ * @param string|array $jsonKey JSON credential file path or JSON credentials
52
+ * as an associative array
53
+ */
54
+ public function __construct($scope, $jsonKey)
55
+ {
56
+ if (\is_string($jsonKey)) {
57
+ if (!\file_exists($jsonKey)) {
58
+ throw new \InvalidArgumentException('file does not exist');
59
+ }
60
+ $jsonKeyStream = \file_get_contents($jsonKey);
61
+ if (!($jsonKey = \json_decode($jsonKeyStream, \true))) {
62
+ throw new \LogicException('invalid json for auth config');
63
+ }
64
+ }
65
+ if (!\array_key_exists('client_id', $jsonKey)) {
66
+ throw new \InvalidArgumentException('json key is missing the client_id field');
67
+ }
68
+ if (!\array_key_exists('client_secret', $jsonKey)) {
69
+ throw new \InvalidArgumentException('json key is missing the client_secret field');
70
+ }
71
+ if (!\array_key_exists('refresh_token', $jsonKey)) {
72
+ throw new \InvalidArgumentException('json key is missing the refresh_token field');
73
+ }
74
+ $this->auth = new OAuth2(['clientId' => $jsonKey['client_id'], 'clientSecret' => $jsonKey['client_secret'], 'refresh_token' => $jsonKey['refresh_token'], 'scope' => $scope, 'tokenCredentialUri' => self::TOKEN_CREDENTIAL_URI]);
75
+ if (\array_key_exists('quota_project_id', $jsonKey)) {
76
+ $this->quotaProject = (string) $jsonKey['quota_project_id'];
77
+ }
78
+ }
79
+ /**
80
+ * @param callable $httpHandler
81
+ *
82
+ * @return array A set of auth related metadata, containing the following
83
+ * keys:
84
+ * - access_token (string)
85
+ * - expires_in (int)
86
+ * - scope (string)
87
+ * - token_type (string)
88
+ * - id_token (string)
89
+ */
90
+ public function fetchAuthToken(callable $httpHandler = null)
91
+ {
92
+ return $this->auth->fetchAuthToken($httpHandler);
93
+ }
94
+ /**
95
+ * @return string
96
+ */
97
+ public function getCacheKey()
98
+ {
99
+ return $this->auth->getClientId() . ':' . $this->auth->getCacheKey();
100
+ }
101
+ /**
102
+ * @return array
103
+ */
104
+ public function getLastReceivedToken()
105
+ {
106
+ return $this->auth->getLastReceivedToken();
107
+ }
108
+ /**
109
+ * Get the quota project used for this API request
110
+ *
111
+ * @return string|null
112
+ */
113
+ public function getQuotaProject()
114
+ {
115
+ return $this->quotaProject;
116
+ }
117
+ }
third-party/google/auth/src/CredentialsLoader.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\InsecureCredentials;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\ServiceAccountCredentials;
22
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\UserRefreshCredentials;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
24
+ /**
25
+ * CredentialsLoader contains the behaviour used to locate and find default
26
+ * credentials files on the file system.
27
+ */
28
+ abstract class CredentialsLoader implements \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface, \SimpleCalendar\plugin_deps\Google\Auth\UpdateMetadataInterface
29
+ {
30
+ const TOKEN_CREDENTIAL_URI = 'https://oauth2.googleapis.com/token';
31
+ const ENV_VAR = 'GOOGLE_APPLICATION_CREDENTIALS';
32
+ const WELL_KNOWN_PATH = 'gcloud/application_default_credentials.json';
33
+ const NON_WINDOWS_WELL_KNOWN_PATH_BASE = '.config';
34
+ /**
35
+ * @param string $cause
36
+ * @return string
37
+ */
38
+ private static function unableToReadEnv($cause)
39
+ {
40
+ $msg = 'Unable to read the credential file specified by ';
41
+ $msg .= ' GOOGLE_APPLICATION_CREDENTIALS: ';
42
+ $msg .= $cause;
43
+ return $msg;
44
+ }
45
+ /**
46
+ * @return bool
47
+ */
48
+ private static function isOnWindows()
49
+ {
50
+ return \strtoupper(\substr(\PHP_OS, 0, 3)) === 'WIN';
51
+ }
52
+ /**
53
+ * Returns the currently available major Guzzle version.
54
+ *
55
+ * @return int
56
+ */
57
+ private static function getGuzzleMajorVersion()
58
+ {
59
+ if (\defined('SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) {
60
+ return ClientInterface::MAJOR_VERSION;
61
+ }
62
+ if (\defined('SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::VERSION')) {
63
+ return (int) \substr(ClientInterface::VERSION, 0, 1);
64
+ }
65
+ throw new \Exception('Version not supported');
66
+ }
67
+ /**
68
+ * Load a JSON key from the path specified in the environment.
69
+ *
70
+ * Load a JSON key from the path specified in the environment
71
+ * variable GOOGLE_APPLICATION_CREDENTIALS. Return null if
72
+ * GOOGLE_APPLICATION_CREDENTIALS is not specified.
73
+ *
74
+ * @return array|null JSON key | null
75
+ */
76
+ public static function fromEnv()
77
+ {
78
+ $path = \getenv(self::ENV_VAR);
79
+ if (empty($path)) {
80
+ return;
81
+ }
82
+ if (!\file_exists($path)) {
83
+ $cause = 'file ' . $path . ' does not exist';
84
+ throw new \DomainException(self::unableToReadEnv($cause));
85
+ }
86
+ $jsonKey = \file_get_contents($path);
87
+ return \json_decode($jsonKey, \true);
88
+ }
89
+ /**
90
+ * Load a JSON key from a well known path.
91
+ *
92
+ * The well known path is OS dependent:
93
+ *
94
+ * * windows: %APPDATA%/gcloud/application_default_credentials.json
95
+ * * others: $HOME/.config/gcloud/application_default_credentials.json
96
+ *
97
+ * If the file does not exist, this returns null.
98
+ *
99
+ * @return array|null JSON key | null
100
+ */
101
+ public static function fromWellKnownFile()
102
+ {
103
+ $rootEnv = self::isOnWindows() ? 'APPDATA' : 'HOME';
104
+ $path = [\getenv($rootEnv)];
105
+ if (!self::isOnWindows()) {
106
+ $path[] = self::NON_WINDOWS_WELL_KNOWN_PATH_BASE;
107
+ }
108
+ $path[] = self::WELL_KNOWN_PATH;
109
+ $path = \implode(\DIRECTORY_SEPARATOR, $path);
110
+ if (!\file_exists($path)) {
111
+ return;
112
+ }
113
+ $jsonKey = \file_get_contents($path);
114
+ return \json_decode($jsonKey, \true);
115
+ }
116
+ /**
117
+ * Create a new Credentials instance.
118
+ *
119
+ * @param string|array $scope the scope of the access request, expressed
120
+ * either as an Array or as a space-delimited String.
121
+ * @param array $jsonKey the JSON credentials.
122
+ * @param string|array $defaultScope The default scope to use if no
123
+ * user-defined scopes exist, expressed either as an Array or as a
124
+ * space-delimited string.
125
+ *
126
+ * @return ServiceAccountCredentials|UserRefreshCredentials
127
+ */
128
+ public static function makeCredentials($scope, array $jsonKey, $defaultScope = null)
129
+ {
130
+ if (!\array_key_exists('type', $jsonKey)) {
131
+ throw new \InvalidArgumentException('json key is missing the type field');
132
+ }
133
+ if ($jsonKey['type'] == 'service_account') {
134
+ // Do not pass $defaultScope to ServiceAccountCredentials
135
+ return new ServiceAccountCredentials($scope, $jsonKey);
136
+ }
137
+ if ($jsonKey['type'] == 'authorized_user') {
138
+ $anyScope = $scope ?: $defaultScope;
139
+ return new UserRefreshCredentials($anyScope, $jsonKey);
140
+ }
141
+ throw new \InvalidArgumentException('invalid value in the type field');
142
+ }
143
+ /**
144
+ * Create an authorized HTTP Client from an instance of FetchAuthTokenInterface.
145
+ *
146
+ * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
147
+ * @param array $httpClientOptions (optional) Array of request options to apply.
148
+ * @param callable $httpHandler (optional) http client to fetch the token.
149
+ * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
150
+ * @return \GuzzleHttp\Client
151
+ */
152
+ public static function makeHttpClient(\SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface $fetcher, array $httpClientOptions = [], callable $httpHandler = null, callable $tokenCallback = null)
153
+ {
154
+ if (self::getGuzzleMajorVersion() === 5) {
155
+ $client = new \SimpleCalendar\plugin_deps\GuzzleHttp\Client($httpClientOptions);
156
+ $client->setDefaultOption('auth', 'google_auth');
157
+ $subscriber = new \SimpleCalendar\plugin_deps\Google\Auth\Subscriber\AuthTokenSubscriber($fetcher, $httpHandler, $tokenCallback);
158
+ $client->getEmitter()->attach($subscriber);
159
+ return $client;
160
+ }
161
+ $middleware = new \SimpleCalendar\plugin_deps\Google\Auth\Middleware\AuthTokenMiddleware($fetcher, $httpHandler, $tokenCallback);
162
+ $stack = \SimpleCalendar\plugin_deps\GuzzleHttp\HandlerStack::create();
163
+ $stack->push($middleware);
164
+ return new \SimpleCalendar\plugin_deps\GuzzleHttp\Client(['handler' => $stack, 'auth' => 'google_auth'] + $httpClientOptions);
165
+ }
166
+ /**
167
+ * Create a new instance of InsecureCredentials.
168
+ *
169
+ * @return InsecureCredentials
170
+ */
171
+ public static function makeInsecureCredentials()
172
+ {
173
+ return new InsecureCredentials();
174
+ }
175
+ /**
176
+ * export a callback function which updates runtime metadata.
177
+ *
178
+ * @return array updateMetadata function
179
+ * @deprecated
180
+ */
181
+ public function getUpdateMetadataFunc()
182
+ {
183
+ return array($this, 'updateMetadata');
184
+ }
185
+ /**
186
+ * Updates metadata with the authorization token.
187
+ *
188
+ * @param array $metadata metadata hashmap
189
+ * @param string $authUri optional auth uri
190
+ * @param callable $httpHandler callback which delivers psr7 request
191
+ * @return array updated metadata hashmap
192
+ */
193
+ public function updateMetadata($metadata, $authUri = null, callable $httpHandler = null)
194
+ {
195
+ if (isset($metadata[self::AUTH_METADATA_KEY])) {
196
+ // Auth metadata has already been set
197
+ return $metadata;
198
+ }
199
+ $result = $this->fetchAuthToken($httpHandler);
200
+ if (!isset($result['access_token'])) {
201
+ return $metadata;
202
+ }
203
+ $metadata_copy = $metadata;
204
+ $metadata_copy[self::AUTH_METADATA_KEY] = array('Bearer ' . $result['access_token']);
205
+ return $metadata_copy;
206
+ }
207
+ }
third-party/google/auth/src/FetchAuthTokenCache.php ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
21
+ /**
22
+ * A class to implement caching for any object implementing
23
+ * FetchAuthTokenInterface
24
+ */
25
+ class FetchAuthTokenCache implements \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface, \SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface, \SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface, \SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface, \SimpleCalendar\plugin_deps\Google\Auth\UpdateMetadataInterface
26
+ {
27
+ use CacheTrait;
28
+ /**
29
+ * @var FetchAuthTokenInterface
30
+ */
31
+ private $fetcher;
32
+ /**
33
+ * @var array
34
+ */
35
+ private $cacheConfig;
36
+ /**
37
+ * @var CacheItemPoolInterface
38
+ */
39
+ private $cache;
40
+ /**
41
+ * @param FetchAuthTokenInterface $fetcher A credentials fetcher
42
+ * @param array $cacheConfig Configuration for the cache
43
+ * @param CacheItemPoolInterface $cache
44
+ */
45
+ public function __construct(\SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface $fetcher, array $cacheConfig = null, CacheItemPoolInterface $cache)
46
+ {
47
+ $this->fetcher = $fetcher;
48
+ $this->cache = $cache;
49
+ $this->cacheConfig = \array_merge(['lifetime' => 1500, 'prefix' => ''], (array) $cacheConfig);
50
+ }
51
+ /**
52
+ * Implements FetchAuthTokenInterface#fetchAuthToken.
53
+ *
54
+ * Checks the cache for a valid auth token and fetches the auth tokens
55
+ * from the supplied fetcher.
56
+ *
57
+ * @param callable $httpHandler callback which delivers psr7 request
58
+ * @return array the response
59
+ * @throws \Exception
60
+ */
61
+ public function fetchAuthToken(callable $httpHandler = null)
62
+ {
63
+ if ($cached = $this->fetchAuthTokenFromCache()) {
64
+ return $cached;
65
+ }
66
+ $auth_token = $this->fetcher->fetchAuthToken($httpHandler);
67
+ $this->saveAuthTokenInCache($auth_token);
68
+ return $auth_token;
69
+ }
70
+ /**
71
+ * @return string
72
+ */
73
+ public function getCacheKey()
74
+ {
75
+ return $this->getFullCacheKey($this->fetcher->getCacheKey());
76
+ }
77
+ /**
78
+ * @return array|null
79
+ */
80
+ public function getLastReceivedToken()
81
+ {
82
+ return $this->fetcher->getLastReceivedToken();
83
+ }
84
+ /**
85
+ * Get the client name from the fetcher.
86
+ *
87
+ * @param callable $httpHandler An HTTP handler to deliver PSR7 requests.
88
+ * @return string
89
+ */
90
+ public function getClientName(callable $httpHandler = null)
91
+ {
92
+ return $this->fetcher->getClientName($httpHandler);
93
+ }
94
+ /**
95
+ * Sign a blob using the fetcher.
96
+ *
97
+ * @param string $stringToSign The string to sign.
98
+ * @param bool $forceOpenSsl Require use of OpenSSL for local signing. Does
99
+ * not apply to signing done using external services. **Defaults to**
100
+ * `false`.
101
+ * @return string The resulting signature.
102
+ * @throws \RuntimeException If the fetcher does not implement
103
+ * `Google\Auth\SignBlobInterface`.
104
+ */
105
+ public function signBlob($stringToSign, $forceOpenSsl = \false)
106
+ {
107
+ if (!$this->fetcher instanceof \SimpleCalendar\plugin_deps\Google\Auth\SignBlobInterface) {
108
+ throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\SignBlobInterface');
109
+ }
110
+ return $this->fetcher->signBlob($stringToSign, $forceOpenSsl);
111
+ }
112
+ /**
113
+ * Get the quota project used for this API request from the credentials
114
+ * fetcher.
115
+ *
116
+ * @return string|null
117
+ */
118
+ public function getQuotaProject()
119
+ {
120
+ if ($this->fetcher instanceof \SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface) {
121
+ return $this->fetcher->getQuotaProject();
122
+ }
123
+ }
124
+ /*
125
+ * Get the Project ID from the fetcher.
126
+ *
127
+ * @param callable $httpHandler Callback which delivers psr7 request
128
+ * @return string|null
129
+ * @throws \RuntimeException If the fetcher does not implement
130
+ * `Google\Auth\ProvidesProjectIdInterface`.
131
+ */
132
+ public function getProjectId(callable $httpHandler = null)
133
+ {
134
+ if (!$this->fetcher instanceof \SimpleCalendar\plugin_deps\Google\Auth\ProjectIdProviderInterface) {
135
+ throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\ProvidesProjectIdInterface');
136
+ }
137
+ return $this->fetcher->getProjectId($httpHandler);
138
+ }
139
+ /**
140
+ * Updates metadata with the authorization token.
141
+ *
142
+ * @param array $metadata metadata hashmap
143
+ * @param string $authUri optional auth uri
144
+ * @param callable $httpHandler callback which delivers psr7 request
145
+ * @return array updated metadata hashmap
146
+ * @throws \RuntimeException If the fetcher does not implement
147
+ * `Google\Auth\UpdateMetadataInterface`.
148
+ */
149
+ public function updateMetadata($metadata, $authUri = null, callable $httpHandler = null)
150
+ {
151
+ if (!$this->fetcher instanceof \SimpleCalendar\plugin_deps\Google\Auth\UpdateMetadataInterface) {
152
+ throw new \RuntimeException('Credentials fetcher does not implement ' . 'Google\\Auth\\UpdateMetadataInterface');
153
+ }
154
+ $cached = $this->fetchAuthTokenFromCache($authUri);
155
+ if ($cached) {
156
+ // Set the access token in the `Authorization` metadata header so
157
+ // the downstream call to updateMetadata know they don't need to
158
+ // fetch another token.
159
+ if (isset($cached['access_token'])) {
160
+ $metadata[self::AUTH_METADATA_KEY] = ['Bearer ' . $cached['access_token']];
161
+ }
162
+ }
163
+ $newMetadata = $this->fetcher->updateMetadata($metadata, $authUri, $httpHandler);
164
+ if (!$cached && ($token = $this->fetcher->getLastReceivedToken())) {
165
+ $this->saveAuthTokenInCache($token, $authUri);
166
+ }
167
+ return $newMetadata;
168
+ }
169
+ private function fetchAuthTokenFromCache($authUri = null)
170
+ {
171
+ // Use the cached value if its available.
172
+ //
173
+ // TODO: correct caching; update the call to setCachedValue to set the expiry
174
+ // to the value returned with the auth token.
175
+ //
176
+ // TODO: correct caching; enable the cache to be cleared.
177
+ // if $authUri is set, use it as the cache key
178
+ $cacheKey = $authUri ? $this->getFullCacheKey($authUri) : $this->fetcher->getCacheKey();
179
+ $cached = $this->getCachedValue($cacheKey);
180
+ if (\is_array($cached)) {
181
+ if (empty($cached['expires_at'])) {
182
+ // If there is no expiration data, assume token is not expired.
183
+ // (for JwtAccess and ID tokens)
184
+ return $cached;
185
+ }
186
+ if (\time() < $cached['expires_at']) {
187
+ // access token is not expired
188
+ return $cached;
189
+ }
190
+ }
191
+ return null;
192
+ }
193
+ private function saveAuthTokenInCache($authToken, $authUri = null)
194
+ {
195
+ if (isset($authToken['access_token']) || isset($authToken['id_token'])) {
196
+ // if $authUri is set, use it as the cache key
197
+ $cacheKey = $authUri ? $this->getFullCacheKey($authUri) : $this->fetcher->getCacheKey();
198
+ $this->setCachedValue($cacheKey, $authToken);
199
+ }
200
+ }
201
+ }
third-party/google/auth/src/FetchAuthTokenInterface.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ /**
21
+ * An interface implemented by objects that can fetch auth tokens.
22
+ */
23
+ interface FetchAuthTokenInterface
24
+ {
25
+ /**
26
+ * Fetches the auth tokens based on the current state.
27
+ *
28
+ * @param callable $httpHandler callback which delivers psr7 request
29
+ * @return array a hash of auth tokens
30
+ */
31
+ public function fetchAuthToken(callable $httpHandler = null);
32
+ /**
33
+ * Obtains a key that can used to cache the results of #fetchAuthToken.
34
+ *
35
+ * If the value is empty, the auth token is not cached.
36
+ *
37
+ * @return string a key that may be used to cache the auth token.
38
+ */
39
+ public function getCacheKey();
40
+ /**
41
+ * Returns an associative array with the token and
42
+ * expiration time.
43
+ *
44
+ * @return null|array {
45
+ * The last received access token.
46
+ *
47
+ * @var string $access_token The access token string.
48
+ * @var int $expires_at The time the token expires as a UNIX timestamp.
49
+ * }
50
+ */
51
+ public function getLastReceivedToken();
52
+ }
third-party/google/auth/src/GCECache.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2020 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\Credentials\GCECredentials;
21
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
22
+ /**
23
+ * A class to implement caching for calls to GCECredentials::onGce. This class
24
+ * is used automatically when you pass a `Psr\Cache\CacheItemPoolInterface`
25
+ * cache object to `ApplicationDefaultCredentials::getCredentials`.
26
+ *
27
+ * ```
28
+ * $sysvCache = new Google\Auth\SysvCacheItemPool();
29
+ * $creds = Google\Auth\ApplicationDefaultCredentials::getCredentials(
30
+ * $scope,
31
+ * null,
32
+ * null,
33
+ * $sysvCache
34
+ * );
35
+ * ```
36
+ */
37
+ class GCECache
38
+ {
39
+ const GCE_CACHE_KEY = 'google_auth_on_gce_cache';
40
+ use CacheTrait;
41
+ /**
42
+ * @var array
43
+ */
44
+ private $cacheConfig;
45
+ /**
46
+ * @var CacheItemPoolInterface
47
+ */
48
+ private $cache;
49
+ /**
50
+ * @param array $cacheConfig Configuration for the cache
51
+ * @param CacheItemPoolInterface $cache
52
+ */
53
+ public function __construct(array $cacheConfig = null, CacheItemPoolInterface $cache = null)
54
+ {
55
+ $this->cache = $cache;
56
+ $this->cacheConfig = \array_merge(['lifetime' => 1500, 'prefix' => ''], (array) $cacheConfig);
57
+ }
58
+ /**
59
+ * Caches the result of onGce so the metadata server is not called multiple
60
+ * times.
61
+ *
62
+ * @param callable $httpHandler callback which delivers psr7 request
63
+ * @return bool True if this a GCEInstance, false otherwise
64
+ */
65
+ public function onGce(callable $httpHandler = null)
66
+ {
67
+ if (\is_null($this->cache)) {
68
+ return GCECredentials::onGce($httpHandler);
69
+ }
70
+ $cacheKey = self::GCE_CACHE_KEY;
71
+ $onGce = $this->getCachedValue($cacheKey);
72
+ if (\is_null($onGce)) {
73
+ $onGce = GCECredentials::onGce($httpHandler);
74
+ $this->setCachedValue($cacheKey, $onGce);
75
+ }
76
+ return $onGce;
77
+ }
78
+ }
third-party/google/auth/src/GetQuotaProjectInterface.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ /**
21
+ * An interface implemented by objects that can get quota projects.
22
+ */
23
+ interface GetQuotaProjectInterface
24
+ {
25
+ const X_GOOG_USER_PROJECT_HEADER = 'X-Goog-User-Project';
26
+ /**
27
+ * Get the quota project used for this API request
28
+ *
29
+ * @return string|null
30
+ */
31
+ public function getQuotaProject();
32
+ }
third-party/google/auth/src/HttpHandler/Guzzle5HttpHandler.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2015 Google Inc. All Rights Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\HttpHandler;
19
+
20
+ use Exception;
21
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Message\ResponseInterface as Guzzle5ResponseInterface;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise\Promise;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise\RejectedPromise;
25
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Response;
26
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
27
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
28
+ class Guzzle5HttpHandler
29
+ {
30
+ /**
31
+ * @var ClientInterface
32
+ */
33
+ private $client;
34
+ /**
35
+ * @param ClientInterface $client
36
+ */
37
+ public function __construct(ClientInterface $client)
38
+ {
39
+ $this->client = $client;
40
+ }
41
+ /**
42
+ * Accepts a PSR-7 Request and an array of options and returns a PSR-7 response.
43
+ *
44
+ * @param RequestInterface $request
45
+ * @param array $options
46
+ * @return ResponseInterface
47
+ */
48
+ public function __invoke(RequestInterface $request, array $options = [])
49
+ {
50
+ $response = $this->client->send($this->createGuzzle5Request($request, $options));
51
+ return $this->createPsr7Response($response);
52
+ }
53
+ /**
54
+ * Accepts a PSR-7 request and an array of options and returns a PromiseInterface
55
+ *
56
+ * @param RequestInterface $request
57
+ * @param array $options
58
+ * @return Promise
59
+ */
60
+ public function async(RequestInterface $request, array $options = [])
61
+ {
62
+ if (!\class_exists('SimpleCalendar\\plugin_deps\\GuzzleHttp\\Promise\\Promise')) {
63
+ throw new Exception('Install guzzlehttp/promises to use async with Guzzle 5');
64
+ }
65
+ $futureResponse = $this->client->send($this->createGuzzle5Request($request, ['future' => \true] + $options));
66
+ $promise = new Promise(function () use($futureResponse) {
67
+ try {
68
+ $futureResponse->wait();
69
+ } catch (Exception $e) {
70
+ // The promise is already delivered when the exception is
71
+ // thrown, so don't rethrow it.
72
+ }
73
+ }, [$futureResponse, 'cancel']);
74
+ $futureResponse->then([$promise, 'resolve'], [$promise, 'reject']);
75
+ return $promise->then(function (Guzzle5ResponseInterface $response) {
76
+ // Adapt the Guzzle 5 Response to a PSR-7 Response.
77
+ return $this->createPsr7Response($response);
78
+ }, function (Exception $e) {
79
+ return new RejectedPromise($e);
80
+ });
81
+ }
82
+ private function createGuzzle5Request(RequestInterface $request, array $options)
83
+ {
84
+ return $this->client->createRequest($request->getMethod(), $request->getUri(), \array_merge_recursive(['headers' => $request->getHeaders(), 'body' => $request->getBody()], $options));
85
+ }
86
+ private function createPsr7Response(Guzzle5ResponseInterface $response)
87
+ {
88
+ return new Response($response->getStatusCode(), $response->getHeaders() ?: [], $response->getBody(), $response->getProtocolVersion(), $response->getReasonPhrase());
89
+ }
90
+ }
third-party/google/auth/src/HttpHandler/Guzzle6HttpHandler.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2015 Google Inc. All Rights Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\HttpHandler;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
21
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
22
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
23
+ class Guzzle6HttpHandler
24
+ {
25
+ /**
26
+ * @var ClientInterface
27
+ */
28
+ private $client;
29
+ /**
30
+ * @param ClientInterface $client
31
+ */
32
+ public function __construct(ClientInterface $client)
33
+ {
34
+ $this->client = $client;
35
+ }
36
+ /**
37
+ * Accepts a PSR-7 request and an array of options and returns a PSR-7 response.
38
+ *
39
+ * @param RequestInterface $request
40
+ * @param array $options
41
+ * @return ResponseInterface
42
+ */
43
+ public function __invoke(RequestInterface $request, array $options = [])
44
+ {
45
+ return $this->client->send($request, $options);
46
+ }
47
+ /**
48
+ * Accepts a PSR-7 request and an array of options and returns a PromiseInterface
49
+ *
50
+ * @param RequestInterface $request
51
+ * @param array $options
52
+ *
53
+ * @return \GuzzleHttp\Promise\PromiseInterface
54
+ */
55
+ public function async(RequestInterface $request, array $options = [])
56
+ {
57
+ return $this->client->sendAsync($request, $options);
58
+ }
59
+ }
third-party/google/auth/src/HttpHandler/Guzzle7HttpHandler.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2020 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\HttpHandler;
19
+
20
+ class Guzzle7HttpHandler extends \SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\Guzzle6HttpHandler
21
+ {
22
+ }
third-party/google/auth/src/HttpHandler/HttpClientCache.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\HttpHandler;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
21
+ /**
22
+ * Stores an HTTP Client in order to prevent multiple instantiations.
23
+ */
24
+ class HttpClientCache
25
+ {
26
+ /**
27
+ * @var ClientInterface|null
28
+ */
29
+ private static $httpClient;
30
+ /**
31
+ * Cache an HTTP Client for later calls.
32
+ *
33
+ * Passing null will unset the cached client.
34
+ *
35
+ * @param ClientInterface|null $client
36
+ * @return void
37
+ */
38
+ public static function setHttpClient(ClientInterface $client = null)
39
+ {
40
+ self::$httpClient = $client;
41
+ }
42
+ /**
43
+ * Get the stored HTTP Client, or null.
44
+ *
45
+ * @return ClientInterface|null
46
+ */
47
+ public static function getHttpClient()
48
+ {
49
+ return self::$httpClient;
50
+ }
51
+ }
third-party/google/auth/src/HttpHandler/HttpHandlerFactory.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Copyright 2015 Google Inc. All Rights Reserved.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\HttpHandler;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Client;
21
+ use SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface;
22
+ class HttpHandlerFactory
23
+ {
24
+ /**
25
+ * Builds out a default http handler for the installed version of guzzle.
26
+ *
27
+ * @param ClientInterface $client
28
+ * @return Guzzle5HttpHandler|Guzzle6HttpHandler|Guzzle7HttpHandler
29
+ * @throws \Exception
30
+ */
31
+ public static function build(ClientInterface $client = null)
32
+ {
33
+ $client = $client ?: new Client();
34
+ $version = null;
35
+ if (\defined('SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::MAJOR_VERSION')) {
36
+ $version = ClientInterface::MAJOR_VERSION;
37
+ } elseif (\defined('SimpleCalendar\\plugin_deps\\GuzzleHttp\\ClientInterface::VERSION')) {
38
+ $version = (int) \substr(ClientInterface::VERSION, 0, 1);
39
+ }
40
+ switch ($version) {
41
+ case 5:
42
+ return new \SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\Guzzle5HttpHandler($client);
43
+ case 6:
44
+ return new \SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\Guzzle6HttpHandler($client);
45
+ case 7:
46
+ return new \SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\Guzzle7HttpHandler($client);
47
+ default:
48
+ throw new \Exception('Version not supported');
49
+ }
50
+ }
51
+ }
third-party/google/auth/src/Iam.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpClientCache;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
23
+ /**
24
+ * Tools for using the IAM API.
25
+ *
26
+ * @see https://cloud.google.com/iam/docs IAM Documentation
27
+ */
28
+ class Iam
29
+ {
30
+ const IAM_API_ROOT = 'https://iamcredentials.googleapis.com/v1';
31
+ const SIGN_BLOB_PATH = '%s:signBlob?alt=json';
32
+ const SERVICE_ACCOUNT_NAME = 'projects/-/serviceAccounts/%s';
33
+ /**
34
+ * @var callable
35
+ */
36
+ private $httpHandler;
37
+ /**
38
+ * @param callable $httpHandler [optional] The HTTP Handler to send requests.
39
+ */
40
+ public function __construct(callable $httpHandler = null)
41
+ {
42
+ $this->httpHandler = $httpHandler ?: HttpHandlerFactory::build(HttpClientCache::getHttpClient());
43
+ }
44
+ /**
45
+ * Sign a string using the IAM signBlob API.
46
+ *
47
+ * Note that signing using IAM requires your service account to have the
48
+ * `iam.serviceAccounts.signBlob` permission, part of the "Service Account
49
+ * Token Creator" IAM role.
50
+ *
51
+ * @param string $email The service account email.
52
+ * @param string $accessToken An access token from the service account.
53
+ * @param string $stringToSign The string to be signed.
54
+ * @param array $delegates [optional] A list of service account emails to
55
+ * add to the delegate chain. If omitted, the value of `$email` will
56
+ * be used.
57
+ * @return string The signed string, base64-encoded.
58
+ */
59
+ public function signBlob($email, $accessToken, $stringToSign, array $delegates = [])
60
+ {
61
+ $httpHandler = $this->httpHandler;
62
+ $name = \sprintf(self::SERVICE_ACCOUNT_NAME, $email);
63
+ $uri = self::IAM_API_ROOT . '/' . \sprintf(self::SIGN_BLOB_PATH, $name);
64
+ if ($delegates) {
65
+ foreach ($delegates as &$delegate) {
66
+ $delegate = \sprintf(self::SERVICE_ACCOUNT_NAME, $delegate);
67
+ }
68
+ } else {
69
+ $delegates = [$name];
70
+ }
71
+ $body = ['delegates' => $delegates, 'payload' => \base64_encode($stringToSign)];
72
+ $headers = ['Authorization' => 'Bearer ' . $accessToken];
73
+ $request = new Psr7\Request('POST', $uri, $headers, Psr7\stream_for(\json_encode($body)));
74
+ $res = $httpHandler($request);
75
+ $body = \json_decode((string) $res->getBody(), \true);
76
+ return $body['signedBlob'];
77
+ }
78
+ }
third-party/google/auth/src/Middleware/AuthTokenMiddleware.php ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Middleware;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
23
+ /**
24
+ * AuthTokenMiddleware is a Guzzle Middleware that adds an Authorization header
25
+ * provided by an object implementing FetchAuthTokenInterface.
26
+ *
27
+ * The FetchAuthTokenInterface#fetchAuthToken is used to obtain a hash; one of
28
+ * the values value in that hash is added as the authorization header.
29
+ *
30
+ * Requests will be accessed with the authorization header:
31
+ *
32
+ * 'authorization' 'Bearer <value of auth_token>'
33
+ */
34
+ class AuthTokenMiddleware
35
+ {
36
+ /**
37
+ * @var callback
38
+ */
39
+ private $httpHandler;
40
+ /**
41
+ * @var FetchAuthTokenInterface
42
+ */
43
+ private $fetcher;
44
+ /**
45
+ * @var callable
46
+ */
47
+ private $tokenCallback;
48
+ /**
49
+ * Creates a new AuthTokenMiddleware.
50
+ *
51
+ * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
52
+ * @param callable $httpHandler (optional) callback which delivers psr7 request
53
+ * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
54
+ */
55
+ public function __construct(FetchAuthTokenInterface $fetcher, callable $httpHandler = null, callable $tokenCallback = null)
56
+ {
57
+ $this->fetcher = $fetcher;
58
+ $this->httpHandler = $httpHandler;
59
+ $this->tokenCallback = $tokenCallback;
60
+ }
61
+ /**
62
+ * Updates the request with an Authorization header when auth is 'google_auth'.
63
+ *
64
+ * use Google\Auth\Middleware\AuthTokenMiddleware;
65
+ * use Google\Auth\OAuth2;
66
+ * use GuzzleHttp\Client;
67
+ * use GuzzleHttp\HandlerStack;
68
+ *
69
+ * $config = [..<oauth config param>.];
70
+ * $oauth2 = new OAuth2($config)
71
+ * $middleware = new AuthTokenMiddleware($oauth2);
72
+ * $stack = HandlerStack::create();
73
+ * $stack->push($middleware);
74
+ *
75
+ * $client = new Client([
76
+ * 'handler' => $stack,
77
+ * 'base_uri' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
78
+ * 'auth' => 'google_auth' // authorize all requests
79
+ * ]);
80
+ *
81
+ * $res = $client->get('myproject/taskqueues/myqueue');
82
+ *
83
+ * @param callable $handler
84
+ * @return \Closure
85
+ */
86
+ public function __invoke(callable $handler)
87
+ {
88
+ return function (RequestInterface $request, array $options) use($handler) {
89
+ // Requests using "auth"="google_auth" will be authorized.
90
+ if (!isset($options['auth']) || $options['auth'] !== 'google_auth') {
91
+ return $handler($request, $options);
92
+ }
93
+ $request = $request->withHeader('authorization', 'Bearer ' . $this->fetchToken());
94
+ if ($quotaProject = $this->getQuotaProject()) {
95
+ $request = $request->withHeader(GetQuotaProjectInterface::X_GOOG_USER_PROJECT_HEADER, $quotaProject);
96
+ }
97
+ return $handler($request, $options);
98
+ };
99
+ }
100
+ /**
101
+ * Call fetcher to fetch the token.
102
+ *
103
+ * @return string
104
+ */
105
+ private function fetchToken()
106
+ {
107
+ $auth_tokens = $this->fetcher->fetchAuthToken($this->httpHandler);
108
+ if (\array_key_exists('access_token', $auth_tokens)) {
109
+ // notify the callback if applicable
110
+ if ($this->tokenCallback) {
111
+ \call_user_func($this->tokenCallback, $this->fetcher->getCacheKey(), $auth_tokens['access_token']);
112
+ }
113
+ return $auth_tokens['access_token'];
114
+ }
115
+ if (\array_key_exists('id_token', $auth_tokens)) {
116
+ return $auth_tokens['id_token'];
117
+ }
118
+ }
119
+ private function getQuotaProject()
120
+ {
121
+ if ($this->fetcher instanceof GetQuotaProjectInterface) {
122
+ return $this->fetcher->getQuotaProject();
123
+ }
124
+ }
125
+ }
third-party/google/auth/src/Middleware/ScopedAccessTokenMiddleware.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Middleware;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CacheTrait;
21
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
22
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
23
+ /**
24
+ * ScopedAccessTokenMiddleware is a Guzzle Middleware that adds an Authorization
25
+ * header provided by a closure.
26
+ *
27
+ * The closure returns an access token, taking the scope, either a single
28
+ * string or an array of strings, as its value. If provided, a cache will be
29
+ * used to preserve the access token for a given lifetime.
30
+ *
31
+ * Requests will be accessed with the authorization header:
32
+ *
33
+ * 'authorization' 'Bearer <value of auth_token>'
34
+ */
35
+ class ScopedAccessTokenMiddleware
36
+ {
37
+ use CacheTrait;
38
+ const DEFAULT_CACHE_LIFETIME = 1500;
39
+ /**
40
+ * @var CacheItemPoolInterface
41
+ */
42
+ private $cache;
43
+ /**
44
+ * @var array configuration
45
+ */
46
+ private $cacheConfig;
47
+ /**
48
+ * @var callable
49
+ */
50
+ private $tokenFunc;
51
+ /**
52
+ * @var array|string
53
+ */
54
+ private $scopes;
55
+ /**
56
+ * Creates a new ScopedAccessTokenMiddleware.
57
+ *
58
+ * @param callable $tokenFunc a token generator function
59
+ * @param array|string $scopes the token authentication scopes
60
+ * @param array $cacheConfig configuration for the cache when it's present
61
+ * @param CacheItemPoolInterface $cache an implementation of CacheItemPoolInterface
62
+ */
63
+ public function __construct(callable $tokenFunc, $scopes, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
64
+ {
65
+ $this->tokenFunc = $tokenFunc;
66
+ if (!(\is_string($scopes) || \is_array($scopes))) {
67
+ throw new \InvalidArgumentException('wants scope should be string or array');
68
+ }
69
+ $this->scopes = $scopes;
70
+ if (!\is_null($cache)) {
71
+ $this->cache = $cache;
72
+ $this->cacheConfig = \array_merge(['lifetime' => self::DEFAULT_CACHE_LIFETIME, 'prefix' => ''], $cacheConfig);
73
+ }
74
+ }
75
+ /**
76
+ * Updates the request with an Authorization header when auth is 'scoped'.
77
+ *
78
+ * E.g this could be used to authenticate using the AppEngine
79
+ * AppIdentityService.
80
+ *
81
+ * use google\appengine\api\app_identity\AppIdentityService;
82
+ * use Google\Auth\Middleware\ScopedAccessTokenMiddleware;
83
+ * use GuzzleHttp\Client;
84
+ * use GuzzleHttp\HandlerStack;
85
+ *
86
+ * $scope = 'https://www.googleapis.com/auth/taskqueue'
87
+ * $middleware = new ScopedAccessTokenMiddleware(
88
+ * 'AppIdentityService::getAccessToken',
89
+ * $scope,
90
+ * [ 'prefix' => 'Google\Auth\ScopedAccessToken::' ],
91
+ * $cache = new Memcache()
92
+ * );
93
+ * $stack = HandlerStack::create();
94
+ * $stack->push($middleware);
95
+ *
96
+ * $client = new Client([
97
+ * 'handler' => $stack,
98
+ * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
99
+ * 'auth' => 'scoped' // authorize all requests
100
+ * ]);
101
+ *
102
+ * $res = $client->get('myproject/taskqueues/myqueue');
103
+ *
104
+ * @param callable $handler
105
+ * @return \Closure
106
+ */
107
+ public function __invoke(callable $handler)
108
+ {
109
+ return function (RequestInterface $request, array $options) use($handler) {
110
+ // Requests using "auth"="scoped" will be authorized.
111
+ if (!isset($options['auth']) || $options['auth'] !== 'scoped') {
112
+ return $handler($request, $options);
113
+ }
114
+ $request = $request->withHeader('authorization', 'Bearer ' . $this->fetchToken());
115
+ return $handler($request, $options);
116
+ };
117
+ }
118
+ /**
119
+ * @return string
120
+ */
121
+ private function getCacheKey()
122
+ {
123
+ $key = null;
124
+ if (\is_string($this->scopes)) {
125
+ $key .= $this->scopes;
126
+ } elseif (\is_array($this->scopes)) {
127
+ $key .= \implode(':', $this->scopes);
128
+ }
129
+ return $key;
130
+ }
131
+ /**
132
+ * Determine if token is available in the cache, if not call tokenFunc to
133
+ * fetch it.
134
+ *
135
+ * @return string
136
+ */
137
+ private function fetchToken()
138
+ {
139
+ $cacheKey = $this->getCacheKey();
140
+ $cached = $this->getCachedValue($cacheKey);
141
+ if (!empty($cached)) {
142
+ return $cached;
143
+ }
144
+ $token = \call_user_func($this->tokenFunc, $this->scopes);
145
+ $this->setCachedValue($cacheKey, $token);
146
+ return $token;
147
+ }
148
+ }
third-party/google/auth/src/Middleware/SimpleMiddleware.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Middleware;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
21
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
22
+ /**
23
+ * SimpleMiddleware is a Guzzle Middleware that implements Google's Simple API
24
+ * access.
25
+ *
26
+ * Requests are accessed using the Simple API access developer key.
27
+ */
28
+ class SimpleMiddleware
29
+ {
30
+ /**
31
+ * @var array
32
+ */
33
+ private $config;
34
+ /**
35
+ * Create a new Simple plugin.
36
+ *
37
+ * The configuration array expects one option
38
+ * - key: required, otherwise InvalidArgumentException is thrown
39
+ *
40
+ * @param array $config Configuration array
41
+ */
42
+ public function __construct(array $config)
43
+ {
44
+ if (!isset($config['key'])) {
45
+ throw new \InvalidArgumentException('requires a key to have been set');
46
+ }
47
+ $this->config = \array_merge(['key' => null], $config);
48
+ }
49
+ /**
50
+ * Updates the request query with the developer key if auth is set to simple.
51
+ *
52
+ * use Google\Auth\Middleware\SimpleMiddleware;
53
+ * use GuzzleHttp\Client;
54
+ * use GuzzleHttp\HandlerStack;
55
+ *
56
+ * $my_key = 'is not the same as yours';
57
+ * $middleware = new SimpleMiddleware(['key' => $my_key]);
58
+ * $stack = HandlerStack::create();
59
+ * $stack->push($middleware);
60
+ *
61
+ * $client = new Client([
62
+ * 'handler' => $stack,
63
+ * 'base_uri' => 'https://www.googleapis.com/discovery/v1/',
64
+ * 'auth' => 'simple'
65
+ * ]);
66
+ *
67
+ * $res = $client->get('drive/v2/rest');
68
+ *
69
+ * @param callable $handler
70
+ * @return \Closure
71
+ */
72
+ public function __invoke(callable $handler)
73
+ {
74
+ return function (RequestInterface $request, array $options) use($handler) {
75
+ // Requests using "auth"="scoped" will be authorized.
76
+ if (!isset($options['auth']) || $options['auth'] !== 'simple') {
77
+ return $handler($request, $options);
78
+ }
79
+ $query = Psr7\parse_query($request->getUri()->getQuery());
80
+ $params = \array_merge($query, $this->config);
81
+ $uri = $request->getUri()->withQuery(Psr7\build_query($params));
82
+ $request = $request->withUri($uri);
83
+ return $handler($request, $options);
84
+ };
85
+ }
86
+ }
third-party/google/auth/src/OAuth2.php ADDED
@@ -0,0 +1,1194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpClientCache;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\HttpHandler\HttpHandlerFactory;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request;
24
+ use InvalidArgumentException;
25
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
26
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
27
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\UriInterface;
28
+ /**
29
+ * OAuth2 supports authentication by OAuth2 2-legged flows.
30
+ *
31
+ * It primary supports
32
+ * - service account authorization
33
+ * - authorization where a user already has an access token
34
+ */
35
+ class OAuth2 implements \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface
36
+ {
37
+ const DEFAULT_EXPIRY_SECONDS = 3600;
38
+ // 1 hour
39
+ const DEFAULT_SKEW_SECONDS = 60;
40
+ // 1 minute
41
+ const JWT_URN = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
42
+ /**
43
+ * TODO: determine known methods from the keys of JWT::methods.
44
+ */
45
+ public static $knownSigningAlgorithms = array('HS256', 'HS512', 'HS384', 'RS256');
46
+ /**
47
+ * The well known grant types.
48
+ *
49
+ * @var array
50
+ */
51
+ public static $knownGrantTypes = array('authorization_code', 'refresh_token', 'password', 'client_credentials');
52
+ /**
53
+ * - authorizationUri
54
+ * The authorization server's HTTP endpoint capable of
55
+ * authenticating the end-user and obtaining authorization.
56
+ *
57
+ * @var UriInterface
58
+ */
59
+ private $authorizationUri;
60
+ /**
61
+ * - tokenCredentialUri
62
+ * The authorization server's HTTP endpoint capable of issuing
63
+ * tokens and refreshing expired tokens.
64
+ *
65
+ * @var UriInterface
66
+ */
67
+ private $tokenCredentialUri;
68
+ /**
69
+ * The redirection URI used in the initial request.
70
+ *
71
+ * @var string
72
+ */
73
+ private $redirectUri;
74
+ /**
75
+ * A unique identifier issued to the client to identify itself to the
76
+ * authorization server.
77
+ *
78
+ * @var string
79
+ */
80
+ private $clientId;
81
+ /**
82
+ * A shared symmetric secret issued by the authorization server, which is
83
+ * used to authenticate the client.
84
+ *
85
+ * @var string
86
+ */
87
+ private $clientSecret;
88
+ /**
89
+ * The resource owner's username.
90
+ *
91
+ * @var string
92
+ */
93
+ private $username;
94
+ /**
95
+ * The resource owner's password.
96
+ *
97
+ * @var string
98
+ */
99
+ private $password;
100
+ /**
101
+ * The scope of the access request, expressed either as an Array or as a
102
+ * space-delimited string.
103
+ *
104
+ * @var array
105
+ */
106
+ private $scope;
107
+ /**
108
+ * An arbitrary string designed to allow the client to maintain state.
109
+ *
110
+ * @var string
111
+ */
112
+ private $state;
113
+ /**
114
+ * The authorization code issued to this client.
115
+ *
116
+ * Only used by the authorization code access grant type.
117
+ *
118
+ * @var string
119
+ */
120
+ private $code;
121
+ /**
122
+ * The issuer ID when using assertion profile.
123
+ *
124
+ * @var string
125
+ */
126
+ private $issuer;
127
+ /**
128
+ * The target audience for assertions.
129
+ *
130
+ * @var string
131
+ */
132
+ private $audience;
133
+ /**
134
+ * The target sub when issuing assertions.
135
+ *
136
+ * @var string
137
+ */
138
+ private $sub;
139
+ /**
140
+ * The number of seconds assertions are valid for.
141
+ *
142
+ * @var int
143
+ */
144
+ private $expiry;
145
+ /**
146
+ * The signing key when using assertion profile.
147
+ *
148
+ * @var string
149
+ */
150
+ private $signingKey;
151
+ /**
152
+ * The signing key id when using assertion profile. Param kid in jwt header
153
+ *
154
+ * @var string
155
+ */
156
+ private $signingKeyId;
157
+ /**
158
+ * The signing algorithm when using an assertion profile.
159
+ *
160
+ * @var string
161
+ */
162
+ private $signingAlgorithm;
163
+ /**
164
+ * The refresh token associated with the access token to be refreshed.
165
+ *
166
+ * @var string
167
+ */
168
+ private $refreshToken;
169
+ /**
170
+ * The current access token.
171
+ *
172
+ * @var string
173
+ */
174
+ private $accessToken;
175
+ /**
176
+ * The current ID token.
177
+ *
178
+ * @var string
179
+ */
180
+ private $idToken;
181
+ /**
182
+ * The lifetime in seconds of the current access token.
183
+ *
184
+ * @var int
185
+ */
186
+ private $expiresIn;
187
+ /**
188
+ * The expiration time of the access token as a number of seconds since the
189
+ * unix epoch.
190
+ *
191
+ * @var int
192
+ */
193
+ private $expiresAt;
194
+ /**
195
+ * The issue time of the access token as a number of seconds since the unix
196
+ * epoch.
197
+ *
198
+ * @var int
199
+ */
200
+ private $issuedAt;
201
+ /**
202
+ * The current grant type.
203
+ *
204
+ * @var string
205
+ */
206
+ private $grantType;
207
+ /**
208
+ * When using an extension grant type, this is the set of parameters used by
209
+ * that extension.
210
+ */
211
+ private $extensionParams;
212
+ /**
213
+ * When using the toJwt function, these claims will be added to the JWT
214
+ * payload.
215
+ */
216
+ private $additionalClaims;
217
+ /**
218
+ * Create a new OAuthCredentials.
219
+ *
220
+ * The configuration array accepts various options
221
+ *
222
+ * - authorizationUri
223
+ * The authorization server's HTTP endpoint capable of
224
+ * authenticating the end-user and obtaining authorization.
225
+ *
226
+ * - tokenCredentialUri
227
+ * The authorization server's HTTP endpoint capable of issuing
228
+ * tokens and refreshing expired tokens.
229
+ *
230
+ * - clientId
231
+ * A unique identifier issued to the client to identify itself to the
232
+ * authorization server.
233
+ *
234
+ * - clientSecret
235
+ * A shared symmetric secret issued by the authorization server,
236
+ * which is used to authenticate the client.
237
+ *
238
+ * - scope
239
+ * The scope of the access request, expressed either as an Array
240
+ * or as a space-delimited String.
241
+ *
242
+ * - state
243
+ * An arbitrary string designed to allow the client to maintain state.
244
+ *
245
+ * - redirectUri
246
+ * The redirection URI used in the initial request.
247
+ *
248
+ * - username
249
+ * The resource owner's username.
250
+ *
251
+ * - password
252
+ * The resource owner's password.
253
+ *
254
+ * - issuer
255
+ * Issuer ID when using assertion profile
256
+ *
257
+ * - audience
258
+ * Target audience for assertions
259
+ *
260
+ * - expiry
261
+ * Number of seconds assertions are valid for
262
+ *
263
+ * - signingKey
264
+ * Signing key when using assertion profile
265
+ *
266
+ * - signingKeyId
267
+ * Signing key id when using assertion profile
268
+ *
269
+ * - refreshToken
270
+ * The refresh token associated with the access token
271
+ * to be refreshed.
272
+ *
273
+ * - accessToken
274
+ * The current access token for this client.
275
+ *
276
+ * - idToken
277
+ * The current ID token for this client.
278
+ *
279
+ * - extensionParams
280
+ * When using an extension grant type, this is the set of parameters used
281
+ * by that extension.
282
+ *
283
+ * @param array $config Configuration array
284
+ */
285
+ public function __construct(array $config)
286
+ {
287
+ $opts = \array_merge(['expiry' => self::DEFAULT_EXPIRY_SECONDS, 'extensionParams' => [], 'authorizationUri' => null, 'redirectUri' => null, 'tokenCredentialUri' => null, 'state' => null, 'username' => null, 'password' => null, 'clientId' => null, 'clientSecret' => null, 'issuer' => null, 'sub' => null, 'audience' => null, 'signingKey' => null, 'signingKeyId' => null, 'signingAlgorithm' => null, 'scope' => null, 'additionalClaims' => []], $config);
288
+ $this->setAuthorizationUri($opts['authorizationUri']);
289
+ $this->setRedirectUri($opts['redirectUri']);
290
+ $this->setTokenCredentialUri($opts['tokenCredentialUri']);
291
+ $this->setState($opts['state']);
292
+ $this->setUsername($opts['username']);
293
+ $this->setPassword($opts['password']);
294
+ $this->setClientId($opts['clientId']);
295
+ $this->setClientSecret($opts['clientSecret']);
296
+ $this->setIssuer($opts['issuer']);
297
+ $this->setSub($opts['sub']);
298
+ $this->setExpiry($opts['expiry']);
299
+ $this->setAudience($opts['audience']);
300
+ $this->setSigningKey($opts['signingKey']);
301
+ $this->setSigningKeyId($opts['signingKeyId']);
302
+ $this->setSigningAlgorithm($opts['signingAlgorithm']);
303
+ $this->setScope($opts['scope']);
304
+ $this->setExtensionParams($opts['extensionParams']);
305
+ $this->setAdditionalClaims($opts['additionalClaims']);
306
+ $this->updateToken($opts);
307
+ }
308
+ /**
309
+ * Verifies the idToken if present.
310
+ *
311
+ * - if none is present, return null
312
+ * - if present, but invalid, raises DomainException.
313
+ * - otherwise returns the payload in the idtoken as a PHP object.
314
+ *
315
+ * The behavior of this method varies depending on the version of
316
+ * `firebase/php-jwt` you are using. In versions lower than 3.0.0, if
317
+ * `$publicKey` is null, the key is decoded without being verified. In
318
+ * newer versions, if a public key is not given, this method will throw an
319
+ * `\InvalidArgumentException`.
320
+ *
321
+ * @param string $publicKey The public key to use to authenticate the token
322
+ * @param array $allowed_algs List of supported verification algorithms
323
+ * @throws \DomainException if the token is missing an audience.
324
+ * @throws \DomainException if the audience does not match the one set in
325
+ * the OAuth2 class instance.
326
+ * @throws \UnexpectedValueException If the token is invalid
327
+ * @throws SignatureInvalidException If the signature is invalid.
328
+ * @throws BeforeValidException If the token is not yet valid.
329
+ * @throws ExpiredException If the token has expired.
330
+ * @return null|object
331
+ */
332
+ public function verifyIdToken($publicKey = null, $allowed_algs = array())
333
+ {
334
+ $idToken = $this->getIdToken();
335
+ if (\is_null($idToken)) {
336
+ return null;
337
+ }
338
+ $resp = $this->jwtDecode($idToken, $publicKey, $allowed_algs);
339
+ if (!\property_exists($resp, 'aud')) {
340
+ throw new \DomainException('No audience found the id token');
341
+ }
342
+ if ($resp->aud != $this->getAudience()) {
343
+ throw new \DomainException('Wrong audience present in the id token');
344
+ }
345
+ return $resp;
346
+ }
347
+ /**
348
+ * Obtains the encoded jwt from the instance data.
349
+ *
350
+ * @param array $config array optional configuration parameters
351
+ * @return string
352
+ */
353
+ public function toJwt(array $config = [])
354
+ {
355
+ if (\is_null($this->getSigningKey())) {
356
+ throw new \DomainException('No signing key available');
357
+ }
358
+ if (\is_null($this->getSigningAlgorithm())) {
359
+ throw new \DomainException('No signing algorithm specified');
360
+ }
361
+ $now = \time();
362
+ $opts = \array_merge(['skew' => self::DEFAULT_SKEW_SECONDS], $config);
363
+ $assertion = ['iss' => $this->getIssuer(), 'aud' => $this->getAudience(), 'exp' => $now + $this->getExpiry(), 'iat' => $now - $opts['skew']];
364
+ foreach ($assertion as $k => $v) {
365
+ if (\is_null($v)) {
366
+ throw new \DomainException($k . ' should not be null');
367
+ }
368
+ }
369
+ if (!\is_null($this->getScope())) {
370
+ $assertion['scope'] = $this->getScope();
371
+ }
372
+ if (!\is_null($this->getSub())) {
373
+ $assertion['sub'] = $this->getSub();
374
+ }
375
+ $assertion += $this->getAdditionalClaims();
376
+ return $this->jwtEncode($assertion, $this->getSigningKey(), $this->getSigningAlgorithm(), $this->getSigningKeyId());
377
+ }
378
+ /**
379
+ * Generates a request for token credentials.
380
+ *
381
+ * @return RequestInterface the authorization Url.
382
+ */
383
+ public function generateCredentialsRequest()
384
+ {
385
+ $uri = $this->getTokenCredentialUri();
386
+ if (\is_null($uri)) {
387
+ throw new \DomainException('No token credential URI was set.');
388
+ }
389
+ $grantType = $this->getGrantType();
390
+ $params = array('grant_type' => $grantType);
391
+ switch ($grantType) {
392
+ case 'authorization_code':
393
+ $params['code'] = $this->getCode();
394
+ $params['redirect_uri'] = $this->getRedirectUri();
395
+ $this->addClientCredentials($params);
396
+ break;
397
+ case 'password':
398
+ $params['username'] = $this->getUsername();
399
+ $params['password'] = $this->getPassword();
400
+ $this->addClientCredentials($params);
401
+ break;
402
+ case 'refresh_token':
403
+ $params['refresh_token'] = $this->getRefreshToken();
404
+ $this->addClientCredentials($params);
405
+ break;
406
+ case self::JWT_URN:
407
+ $params['assertion'] = $this->toJwt();
408
+ break;
409
+ default:
410
+ if (!\is_null($this->getRedirectUri())) {
411
+ # Grant type was supposed to be 'authorization_code', as there
412
+ # is a redirect URI.
413
+ throw new \DomainException('Missing authorization code');
414
+ }
415
+ unset($params['grant_type']);
416
+ if (!\is_null($grantType)) {
417
+ $params['grant_type'] = $grantType;
418
+ }
419
+ $params = \array_merge($params, $this->getExtensionParams());
420
+ }
421
+ $headers = ['Cache-Control' => 'no-store', 'Content-Type' => 'application/x-www-form-urlencoded'];
422
+ return new Request('POST', $uri, $headers, Psr7\build_query($params));
423
+ }
424
+ /**
425
+ * Fetches the auth tokens based on the current state.
426
+ *
427
+ * @param callable $httpHandler callback which delivers psr7 request
428
+ * @return array the response
429
+ */
430
+ public function fetchAuthToken(callable $httpHandler = null)
431
+ {
432
+ if (\is_null($httpHandler)) {
433
+ $httpHandler = HttpHandlerFactory::build(HttpClientCache::getHttpClient());
434
+ }
435
+ $response = $httpHandler($this->generateCredentialsRequest());
436
+ $credentials = $this->parseTokenResponse($response);
437
+ $this->updateToken($credentials);
438
+ return $credentials;
439
+ }
440
+ /**
441
+ * Obtains a key that can used to cache the results of #fetchAuthToken.
442
+ *
443
+ * The key is derived from the scopes.
444
+ *
445
+ * @return string a key that may be used to cache the auth token.
446
+ */
447
+ public function getCacheKey()
448
+ {
449
+ if (\is_array($this->scope)) {
450
+ return \implode(':', $this->scope);
451
+ }
452
+ if ($this->audience) {
453
+ return $this->audience;
454
+ }
455
+ // If scope has not set, return null to indicate no caching.
456
+ return null;
457
+ }
458
+ /**
459
+ * Parses the fetched tokens.
460
+ *
461
+ * @param ResponseInterface $resp the response.
462
+ * @return array the tokens parsed from the response body.
463
+ * @throws \Exception
464
+ */
465
+ public function parseTokenResponse(ResponseInterface $resp)
466
+ {
467
+ $body = (string) $resp->getBody();
468
+ if ($resp->hasHeader('Content-Type') && $resp->getHeaderLine('Content-Type') == 'application/x-www-form-urlencoded') {
469
+ $res = array();
470
+ \parse_str($body, $res);
471
+ return $res;
472
+ }
473
+ // Assume it's JSON; if it's not throw an exception
474
+ if (null === ($res = \json_decode($body, \true))) {
475
+ throw new \Exception('Invalid JSON response');
476
+ }
477
+ return $res;
478
+ }
479
+ /**
480
+ * Updates an OAuth 2.0 client.
481
+ *
482
+ * Example:
483
+ * ```
484
+ * $oauth->updateToken([
485
+ * 'refresh_token' => 'n4E9O119d',
486
+ * 'access_token' => 'FJQbwq9',
487
+ * 'expires_in' => 3600
488
+ * ]);
489
+ * ```
490
+ *
491
+ * @param array $config
492
+ * The configuration parameters related to the token.
493
+ *
494
+ * - refresh_token
495
+ * The refresh token associated with the access token
496
+ * to be refreshed.
497
+ *
498
+ * - access_token
499
+ * The current access token for this client.
500
+ *
501
+ * - id_token
502
+ * The current ID token for this client.
503
+ *
504
+ * - expires_in
505
+ * The time in seconds until access token expiration.
506
+ *
507
+ * - expires_at
508
+ * The time as an integer number of seconds since the Epoch
509
+ *
510
+ * - issued_at
511
+ * The timestamp that the token was issued at.
512
+ */
513
+ public function updateToken(array $config)
514
+ {
515
+ $opts = \array_merge(['extensionParams' => [], 'access_token' => null, 'id_token' => null, 'expires_in' => null, 'expires_at' => null, 'issued_at' => null], $config);
516
+ $this->setExpiresAt($opts['expires_at']);
517
+ $this->setExpiresIn($opts['expires_in']);
518
+ // By default, the token is issued at `Time.now` when `expiresIn` is set,
519
+ // but this can be used to supply a more precise time.
520
+ if (!\is_null($opts['issued_at'])) {
521
+ $this->setIssuedAt($opts['issued_at']);
522
+ }
523
+ $this->setAccessToken($opts['access_token']);
524
+ $this->setIdToken($opts['id_token']);
525
+ // The refresh token should only be updated if a value is explicitly
526
+ // passed in, as some access token responses do not include a refresh
527
+ // token.
528
+ if (\array_key_exists('refresh_token', $opts)) {
529
+ $this->setRefreshToken($opts['refresh_token']);
530
+ }
531
+ }
532
+ /**
533
+ * Builds the authorization Uri that the user should be redirected to.
534
+ *
535
+ * @param array $config configuration options that customize the return url
536
+ * @return UriInterface the authorization Url.
537
+ * @throws InvalidArgumentException
538
+ */
539
+ public function buildFullAuthorizationUri(array $config = [])
540
+ {
541
+ if (\is_null($this->getAuthorizationUri())) {
542
+ throw new InvalidArgumentException('requires an authorizationUri to have been set');
543
+ }
544
+ $params = \array_merge(['response_type' => 'code', 'access_type' => 'offline', 'client_id' => $this->clientId, 'redirect_uri' => $this->redirectUri, 'state' => $this->state, 'scope' => $this->getScope()], $config);
545
+ // Validate the auth_params
546
+ if (\is_null($params['client_id'])) {
547
+ throw new InvalidArgumentException('missing the required client identifier');
548
+ }
549
+ if (\is_null($params['redirect_uri'])) {
550
+ throw new InvalidArgumentException('missing the required redirect URI');
551
+ }
552
+ if (!empty($params['prompt']) && !empty($params['approval_prompt'])) {
553
+ throw new InvalidArgumentException('prompt and approval_prompt are mutually exclusive');
554
+ }
555
+ // Construct the uri object; return it if it is valid.
556
+ $result = clone $this->authorizationUri;
557
+ $existingParams = Psr7\parse_query($result->getQuery());
558
+ $result = $result->withQuery(Psr7\build_query(\array_merge($existingParams, $params)));
559
+ if ($result->getScheme() != 'https') {
560
+ throw new InvalidArgumentException('Authorization endpoint must be protected by TLS');
561
+ }
562
+ return $result;
563
+ }
564
+ /**
565
+ * Sets the authorization server's HTTP endpoint capable of authenticating
566
+ * the end-user and obtaining authorization.
567
+ *
568
+ * @param string $uri
569
+ */
570
+ public function setAuthorizationUri($uri)
571
+ {
572
+ $this->authorizationUri = $this->coerceUri($uri);
573
+ }
574
+ /**
575
+ * Gets the authorization server's HTTP endpoint capable of authenticating
576
+ * the end-user and obtaining authorization.
577
+ *
578
+ * @return UriInterface
579
+ */
580
+ public function getAuthorizationUri()
581
+ {
582
+ return $this->authorizationUri;
583
+ }
584
+ /**
585
+ * Gets the authorization server's HTTP endpoint capable of issuing tokens
586
+ * and refreshing expired tokens.
587
+ *
588
+ * @return string
589
+ */
590
+ public function getTokenCredentialUri()
591
+ {
592
+ return $this->tokenCredentialUri;
593
+ }
594
+ /**
595
+ * Sets the authorization server's HTTP endpoint capable of issuing tokens
596
+ * and refreshing expired tokens.
597
+ *
598
+ * @param string $uri
599
+ */
600
+ public function setTokenCredentialUri($uri)
601
+ {
602
+ $this->tokenCredentialUri = $this->coerceUri($uri);
603
+ }
604
+ /**
605
+ * Gets the redirection URI used in the initial request.
606
+ *
607
+ * @return string
608
+ */
609
+ public function getRedirectUri()
610
+ {
611
+ return $this->redirectUri;
612
+ }
613
+ /**
614
+ * Sets the redirection URI used in the initial request.
615
+ *
616
+ * @param string $uri
617
+ */
618
+ public function setRedirectUri($uri)
619
+ {
620
+ if (\is_null($uri)) {
621
+ $this->redirectUri = null;
622
+ return;
623
+ }
624
+ // redirect URI must be absolute
625
+ if (!$this->isAbsoluteUri($uri)) {
626
+ // "postmessage" is a reserved URI string in Google-land
627
+ // @see https://developers.google.com/identity/sign-in/web/server-side-flow
628
+ if ('postmessage' !== (string) $uri) {
629
+ throw new InvalidArgumentException('Redirect URI must be absolute');
630
+ }
631
+ }
632
+ $this->redirectUri = (string) $uri;
633
+ }
634
+ /**
635
+ * Gets the scope of the access requests as a space-delimited String.
636
+ *
637
+ * @return string
638
+ */
639
+ public function getScope()
640
+ {
641
+ if (\is_null($this->scope)) {
642
+ return $this->scope;
643
+ }
644
+ return \implode(' ', $this->scope);
645
+ }
646
+ /**
647
+ * Sets the scope of the access request, expressed either as an Array or as
648
+ * a space-delimited String.
649
+ *
650
+ * @param string|array $scope
651
+ * @throws InvalidArgumentException
652
+ */
653
+ public function setScope($scope)
654
+ {
655
+ if (\is_null($scope)) {
656
+ $this->scope = null;
657
+ } elseif (\is_string($scope)) {
658
+ $this->scope = \explode(' ', $scope);
659
+ } elseif (\is_array($scope)) {
660
+ foreach ($scope as $s) {
661
+ $pos = \strpos($s, ' ');
662
+ if ($pos !== \false) {
663
+ throw new InvalidArgumentException('array scope values should not contain spaces');
664
+ }
665
+ }
666
+ $this->scope = $scope;
667
+ } else {
668
+ throw new InvalidArgumentException('scopes should be a string or array of strings');
669
+ }
670
+ }
671
+ /**
672
+ * Gets the current grant type.
673
+ *
674
+ * @return string
675
+ */
676
+ public function getGrantType()
677
+ {
678
+ if (!\is_null($this->grantType)) {
679
+ return $this->grantType;
680
+ }
681
+ // Returns the inferred grant type, based on the current object instance
682
+ // state.
683
+ if (!\is_null($this->code)) {
684
+ return 'authorization_code';
685
+ }
686
+ if (!\is_null($this->refreshToken)) {
687
+ return 'refresh_token';
688
+ }
689
+ if (!\is_null($this->username) && !\is_null($this->password)) {
690
+ return 'password';
691
+ }
692
+ if (!\is_null($this->issuer) && !\is_null($this->signingKey)) {
693
+ return self::JWT_URN;
694
+ }
695
+ return null;
696
+ }
697
+ /**
698
+ * Sets the current grant type.
699
+ *
700
+ * @param $grantType
701
+ * @throws InvalidArgumentException
702
+ */
703
+ public function setGrantType($grantType)
704
+ {
705
+ if (\in_array($grantType, self::$knownGrantTypes)) {
706
+ $this->grantType = $grantType;
707
+ } else {
708
+ // validate URI
709
+ if (!$this->isAbsoluteUri($grantType)) {
710
+ throw new InvalidArgumentException('invalid grant type');
711
+ }
712
+ $this->grantType = (string) $grantType;
713
+ }
714
+ }
715
+ /**
716
+ * Gets an arbitrary string designed to allow the client to maintain state.
717
+ *
718
+ * @return string
719
+ */
720
+ public function getState()
721
+ {
722
+ return $this->state;
723
+ }
724
+ /**
725
+ * Sets an arbitrary string designed to allow the client to maintain state.
726
+ *
727
+ * @param string $state
728
+ */
729
+ public function setState($state)
730
+ {
731
+ $this->state = $state;
732
+ }
733
+ /**
734
+ * Gets the authorization code issued to this client.
735
+ */
736
+ public function getCode()
737
+ {
738
+ return $this->code;
739
+ }
740
+ /**
741
+ * Sets the authorization code issued to this client.
742
+ *
743
+ * @param string $code
744
+ */
745
+ public function setCode($code)
746
+ {
747
+ $this->code = $code;
748
+ }
749
+ /**
750
+ * Gets the resource owner's username.
751
+ */
752
+ public function getUsername()
753
+ {
754
+ return $this->username;
755
+ }
756
+ /**
757
+ * Sets the resource owner's username.
758
+ *
759
+ * @param string $username
760
+ */
761
+ public function setUsername($username)
762
+ {
763
+ $this->username = $username;
764
+ }
765
+ /**
766
+ * Gets the resource owner's password.
767
+ */
768
+ public function getPassword()
769
+ {
770
+ return $this->password;
771
+ }
772
+ /**
773
+ * Sets the resource owner's password.
774
+ *
775
+ * @param $password
776
+ */
777
+ public function setPassword($password)
778
+ {
779
+ $this->password = $password;
780
+ }
781
+ /**
782
+ * Sets a unique identifier issued to the client to identify itself to the
783
+ * authorization server.
784
+ */
785
+ public function getClientId()
786
+ {
787
+ return $this->clientId;
788
+ }
789
+ /**
790
+ * Sets a unique identifier issued to the client to identify itself to the
791
+ * authorization server.
792
+ *
793
+ * @param $clientId
794
+ */
795
+ public function setClientId($clientId)
796
+ {
797
+ $this->clientId = $clientId;
798
+ }
799
+ /**
800
+ * Gets a shared symmetric secret issued by the authorization server, which
801
+ * is used to authenticate the client.
802
+ */
803
+ public function getClientSecret()
804
+ {
805
+ return $this->clientSecret;
806
+ }
807
+ /**
808
+ * Sets a shared symmetric secret issued by the authorization server, which
809
+ * is used to authenticate the client.
810
+ *
811
+ * @param $clientSecret
812
+ */
813
+ public function setClientSecret($clientSecret)
814
+ {
815
+ $this->clientSecret = $clientSecret;
816
+ }
817
+ /**
818
+ * Gets the Issuer ID when using assertion profile.
819
+ */
820
+ public function getIssuer()
821
+ {
822
+ return $this->issuer;
823
+ }
824
+ /**
825
+ * Sets the Issuer ID when using assertion profile.
826
+ *
827
+ * @param string $issuer
828
+ */
829
+ public function setIssuer($issuer)
830
+ {
831
+ $this->issuer = $issuer;
832
+ }
833
+ /**
834
+ * Gets the target sub when issuing assertions.
835
+ */
836
+ public function getSub()
837
+ {
838
+ return $this->sub;
839
+ }
840
+ /**
841
+ * Sets the target sub when issuing assertions.
842
+ *
843
+ * @param string $sub
844
+ */
845
+ public function setSub($sub)
846
+ {
847
+ $this->sub = $sub;
848
+ }
849
+ /**
850
+ * Gets the target audience when issuing assertions.
851
+ */
852
+ public function getAudience()
853
+ {
854
+ return $this->audience;
855
+ }
856
+ /**
857
+ * Sets the target audience when issuing assertions.
858
+ *
859
+ * @param string $audience
860
+ */
861
+ public function setAudience($audience)
862
+ {
863
+ $this->audience = $audience;
864
+ }
865
+ /**
866
+ * Gets the signing key when using an assertion profile.
867
+ */
868
+ public function getSigningKey()
869
+ {
870
+ return $this->signingKey;
871
+ }
872
+ /**
873
+ * Sets the signing key when using an assertion profile.
874
+ *
875
+ * @param string $signingKey
876
+ */
877
+ public function setSigningKey($signingKey)
878
+ {
879
+ $this->signingKey = $signingKey;
880
+ }
881
+ /**
882
+ * Gets the signing key id when using an assertion profile.
883
+ *
884
+ * @return string
885
+ */
886
+ public function getSigningKeyId()
887
+ {
888
+ return $this->signingKeyId;
889
+ }
890
+ /**
891
+ * Sets the signing key id when using an assertion profile.
892
+ *
893
+ * @param string $signingKeyId
894
+ */
895
+ public function setSigningKeyId($signingKeyId)
896
+ {
897
+ $this->signingKeyId = $signingKeyId;
898
+ }
899
+ /**
900
+ * Gets the signing algorithm when using an assertion profile.
901
+ *
902
+ * @return string
903
+ */
904
+ public function getSigningAlgorithm()
905
+ {
906
+ return $this->signingAlgorithm;
907
+ }
908
+ /**
909
+ * Sets the signing algorithm when using an assertion profile.
910
+ *
911
+ * @param string $signingAlgorithm
912
+ */
913
+ public function setSigningAlgorithm($signingAlgorithm)
914
+ {
915
+ if (\is_null($signingAlgorithm)) {
916
+ $this->signingAlgorithm = null;
917
+ } elseif (!\in_array($signingAlgorithm, self::$knownSigningAlgorithms)) {
918
+ throw new InvalidArgumentException('unknown signing algorithm');
919
+ } else {
920
+ $this->signingAlgorithm = $signingAlgorithm;
921
+ }
922
+ }
923
+ /**
924
+ * Gets the set of parameters used by extension when using an extension
925
+ * grant type.
926
+ */
927
+ public function getExtensionParams()
928
+ {
929
+ return $this->extensionParams;
930
+ }
931
+ /**
932
+ * Sets the set of parameters used by extension when using an extension
933
+ * grant type.
934
+ *
935
+ * @param $extensionParams
936
+ */
937
+ public function setExtensionParams($extensionParams)
938
+ {
939
+ $this->extensionParams = $extensionParams;
940
+ }
941
+ /**
942
+ * Gets the number of seconds assertions are valid for.
943
+ */
944
+ public function getExpiry()
945
+ {
946
+ return $this->expiry;
947
+ }
948
+ /**
949
+ * Sets the number of seconds assertions are valid for.
950
+ *
951
+ * @param int $expiry
952
+ */
953
+ public function setExpiry($expiry)
954
+ {
955
+ $this->expiry = $expiry;
956
+ }
957
+ /**
958
+ * Gets the lifetime of the access token in seconds.
959
+ */
960
+ public function getExpiresIn()
961
+ {
962
+ return $this->expiresIn;
963
+ }
964
+ /**
965
+ * Sets the lifetime of the access token in seconds.
966
+ *
967
+ * @param int $expiresIn
968
+ */
969
+ public function setExpiresIn($expiresIn)
970
+ {
971
+ if (\is_null($expiresIn)) {
972
+ $this->expiresIn = null;
973
+ $this->issuedAt = null;
974
+ } else {
975
+ $this->issuedAt = \time();
976
+ $this->expiresIn = (int) $expiresIn;
977
+ }
978
+ }
979
+ /**
980
+ * Gets the time the current access token expires at.
981
+ *
982
+ * @return int
983
+ */
984
+ public function getExpiresAt()
985
+ {
986
+ if (!\is_null($this->expiresAt)) {
987
+ return $this->expiresAt;
988
+ }
989
+ if (!\is_null($this->issuedAt) && !\is_null($this->expiresIn)) {
990
+ return $this->issuedAt + $this->expiresIn;
991
+ }
992
+ return null;
993
+ }
994
+ /**
995
+ * Returns true if the acccess token has expired.
996
+ *
997
+ * @return bool
998
+ */
999
+ public function isExpired()
1000
+ {
1001
+ $expiration = $this->getExpiresAt();
1002
+ $now = \time();
1003
+ return !\is_null($expiration) && $now >= $expiration;
1004
+ }
1005
+ /**
1006
+ * Sets the time the current access token expires at.
1007
+ *
1008
+ * @param int $expiresAt
1009
+ */
1010
+ public function setExpiresAt($expiresAt)
1011
+ {
1012
+ $this->expiresAt = $expiresAt;
1013
+ }
1014
+ /**
1015
+ * Gets the time the current access token was issued at.
1016
+ */
1017
+ public function getIssuedAt()
1018
+ {
1019
+ return $this->issuedAt;
1020
+ }
1021
+ /**
1022
+ * Sets the time the current access token was issued at.
1023
+ *
1024
+ * @param int $issuedAt
1025
+ */
1026
+ public function setIssuedAt($issuedAt)
1027
+ {
1028
+ $this->issuedAt = $issuedAt;
1029
+ }
1030
+ /**
1031
+ * Gets the current access token.
1032
+ */
1033
+ public function getAccessToken()
1034
+ {
1035
+ return $this->accessToken;
1036
+ }
1037
+ /**
1038
+ * Sets the current access token.
1039
+ *
1040
+ * @param string $accessToken
1041
+ */
1042
+ public function setAccessToken($accessToken)
1043
+ {
1044
+ $this->accessToken = $accessToken;
1045
+ }
1046
+ /**
1047
+ * Gets the current ID token.
1048
+ */
1049
+ public function getIdToken()
1050
+ {
1051
+ return $this->idToken;
1052
+ }
1053
+ /**
1054
+ * Sets the current ID token.
1055
+ *
1056
+ * @param $idToken
1057
+ */
1058
+ public function setIdToken($idToken)
1059
+ {
1060
+ $this->idToken = $idToken;
1061
+ }
1062
+ /**
1063
+ * Gets the refresh token associated with the current access token.
1064
+ */
1065
+ public function getRefreshToken()
1066
+ {
1067
+ return $this->refreshToken;
1068
+ }
1069
+ /**
1070
+ * Sets the refresh token associated with the current access token.
1071
+ *
1072
+ * @param $refreshToken
1073
+ */
1074
+ public function setRefreshToken($refreshToken)
1075
+ {
1076
+ $this->refreshToken = $refreshToken;
1077
+ }
1078
+ /**
1079
+ * Sets additional claims to be included in the JWT token
1080
+ *
1081
+ * @param array $additionalClaims
1082
+ */
1083
+ public function setAdditionalClaims(array $additionalClaims)
1084
+ {
1085
+ $this->additionalClaims = $additionalClaims;
1086
+ }
1087
+ /**
1088
+ * Gets the additional claims to be included in the JWT token.
1089
+ *
1090
+ * @return array
1091
+ */
1092
+ public function getAdditionalClaims()
1093
+ {
1094
+ return $this->additionalClaims;
1095
+ }
1096
+ /**
1097
+ * The expiration of the last received token.
1098
+ *
1099
+ * @return array|null
1100
+ */
1101
+ public function getLastReceivedToken()
1102
+ {
1103
+ if ($token = $this->getAccessToken()) {
1104
+ // the bare necessity of an auth token
1105
+ $authToken = ['access_token' => $token, 'expires_at' => $this->getExpiresAt()];
1106
+ } elseif ($idToken = $this->getIdToken()) {
1107
+ $authToken = ['id_token' => $idToken, 'expires_at' => $this->getExpiresAt()];
1108
+ } else {
1109
+ return null;
1110
+ }
1111
+ if ($expiresIn = $this->getExpiresIn()) {
1112
+ $authToken['expires_in'] = $expiresIn;
1113
+ }
1114
+ if ($issuedAt = $this->getIssuedAt()) {
1115
+ $authToken['issued_at'] = $issuedAt;
1116
+ }
1117
+ if ($refreshToken = $this->getRefreshToken()) {
1118
+ $authToken['refresh_token'] = $refreshToken;
1119
+ }
1120
+ return $authToken;
1121
+ }
1122
+ /**
1123
+ * Get the client ID.
1124
+ *
1125
+ * Alias of {@see Google\Auth\OAuth2::getClientId()}.
1126
+ *
1127
+ * @param callable $httpHandler
1128
+ * @return string
1129
+ * @access private
1130
+ */
1131
+ public function getClientName(callable $httpHandler = null)
1132
+ {
1133
+ return $this->getClientId();
1134
+ }
1135
+ /**
1136
+ * @todo handle uri as array
1137
+ *
1138
+ * @param string $uri
1139
+ * @return null|UriInterface
1140
+ */
1141
+ private function coerceUri($uri)
1142
+ {
1143
+ if (\is_null($uri)) {
1144
+ return;
1145
+ }
1146
+ return Psr7\uri_for($uri);
1147
+ }
1148
+ /**
1149
+ * @param string $idToken
1150
+ * @param string|array|null $publicKey
1151
+ * @param array $allowedAlgs
1152
+ * @return object
1153
+ */
1154
+ private function jwtDecode($idToken, $publicKey, $allowedAlgs)
1155
+ {
1156
+ if (\class_exists('SimpleCalendar\\plugin_deps\\Firebase\\JWT\\JWT')) {
1157
+ return \SimpleCalendar\plugin_deps\Firebase\JWT\JWT::decode($idToken, $publicKey, $allowedAlgs);
1158
+ }
1159
+ return \SimpleCalendar\plugin_deps\JWT::decode($idToken, $publicKey, $allowedAlgs);
1160
+ }
1161
+ private function jwtEncode($assertion, $signingKey, $signingAlgorithm, $signingKeyId = null)
1162
+ {
1163
+ if (\class_exists('SimpleCalendar\\plugin_deps\\Firebase\\JWT\\JWT')) {
1164
+ return \SimpleCalendar\plugin_deps\Firebase\JWT\JWT::encode($assertion, $signingKey, $signingAlgorithm, $signingKeyId);
1165
+ }
1166
+ return \SimpleCalendar\plugin_deps\JWT::encode($assertion, $signingKey, $signingAlgorithm, $signingKeyId);
1167
+ }
1168
+ /**
1169
+ * Determines if the URI is absolute based on its scheme and host or path
1170
+ * (RFC 3986).
1171
+ *
1172
+ * @param string $uri
1173
+ * @return bool
1174
+ */
1175
+ private function isAbsoluteUri($uri)
1176
+ {
1177
+ $uri = $this->coerceUri($uri);
1178
+ return $uri->getScheme() && ($uri->getHost() || $uri->getPath());
1179
+ }
1180
+ /**
1181
+ * @param array $params
1182
+ * @return array
1183
+ */
1184
+ private function addClientCredentials(&$params)
1185
+ {
1186
+ $clientId = $this->getClientId();
1187
+ $clientSecret = $this->getClientSecret();
1188
+ if ($clientId && $clientSecret) {
1189
+ $params['client_id'] = $clientId;
1190
+ $params['client_secret'] = $clientSecret;
1191
+ }
1192
+ return $params;
1193
+ }
1194
+ }
third-party/google/auth/src/ProjectIdProviderInterface.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2020 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ /**
21
+ * Describes a Credentials object which supports fetching the project ID.
22
+ */
23
+ interface ProjectIdProviderInterface
24
+ {
25
+ /**
26
+ * Get the project ID.
27
+ *
28
+ * @param callable $httpHandler Callback which delivers psr7 request
29
+ * @return string|null
30
+ */
31
+ public function getProjectId(callable $httpHandler = null);
32
+ }
third-party/google/auth/src/ServiceAccountSignerTrait.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ use SimpleCalendar\plugin_deps\phpseclib\Crypt\RSA;
21
+ /**
22
+ * Sign a string using a Service Account private key.
23
+ */
24
+ trait ServiceAccountSignerTrait
25
+ {
26
+ /**
27
+ * Sign a string using the service account private key.
28
+ *
29
+ * @param string $stringToSign
30
+ * @param bool $forceOpenssl Whether to use OpenSSL regardless of
31
+ * whether phpseclib is installed. **Defaults to** `false`.
32
+ * @return string
33
+ */
34
+ public function signBlob($stringToSign, $forceOpenssl = \false)
35
+ {
36
+ $privateKey = $this->auth->getSigningKey();
37
+ $signedString = '';
38
+ if (\class_exists('SimpleCalendar\\plugin_deps\\phpseclib\\Crypt\\RSA') && !$forceOpenssl) {
39
+ $rsa = new RSA();
40
+ $rsa->loadKey($privateKey);
41
+ $rsa->setSignatureMode(RSA::SIGNATURE_PKCS1);
42
+ $rsa->setHash('sha256');
43
+ $signedString = $rsa->sign($stringToSign);
44
+ } elseif (\extension_loaded('openssl')) {
45
+ \openssl_sign($stringToSign, $signedString, $privateKey, 'sha256WithRSAEncryption');
46
+ } else {
47
+ // @codeCoverageIgnoreStart
48
+ throw new \RuntimeException('OpenSSL is not installed.');
49
+ }
50
+ // @codeCoverageIgnoreEnd
51
+ return \base64_encode($signedString);
52
+ }
53
+ }
third-party/google/auth/src/SignBlobInterface.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2019 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ /**
21
+ * Describes a class which supports signing arbitrary strings.
22
+ */
23
+ interface SignBlobInterface extends \SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface
24
+ {
25
+ /**
26
+ * Sign a string using the method which is best for a given credentials type.
27
+ *
28
+ * @param string $stringToSign The string to sign.
29
+ * @param bool $forceOpenssl Require use of OpenSSL for local signing. Does
30
+ * not apply to signing done using external services. **Defaults to**
31
+ * `false`.
32
+ * @return string The resulting signature. Value should be base64-encoded.
33
+ */
34
+ public function signBlob($stringToSign, $forceOpenssl = \false);
35
+ /**
36
+ * Returns the current Client Name.
37
+ *
38
+ * @param callable $httpHandler callback which delivers psr7 request, if
39
+ * one is required to obtain a client name.
40
+ * @return string
41
+ */
42
+ public function getClientName(callable $httpHandler = null);
43
+ }
third-party/google/auth/src/Subscriber/AuthTokenSubscriber.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Subscriber;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\FetchAuthTokenInterface;
21
+ use SimpleCalendar\plugin_deps\Google\Auth\GetQuotaProjectInterface;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\BeforeEvent;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\RequestEvents;
24
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\SubscriberInterface;
25
+ /**
26
+ * AuthTokenSubscriber is a Guzzle Subscriber that adds an Authorization header
27
+ * provided by an object implementing FetchAuthTokenInterface.
28
+ *
29
+ * The FetchAuthTokenInterface#fetchAuthToken is used to obtain a hash; one of
30
+ * the values value in that hash is added as the authorization header.
31
+ *
32
+ * Requests will be accessed with the authorization header:
33
+ *
34
+ * 'authorization' 'Bearer <value of auth_token>'
35
+ */
36
+ class AuthTokenSubscriber implements SubscriberInterface
37
+ {
38
+ /**
39
+ * @var callable
40
+ */
41
+ private $httpHandler;
42
+ /**
43
+ * @var FetchAuthTokenInterface
44
+ */
45
+ private $fetcher;
46
+ /**
47
+ * @var callable
48
+ */
49
+ private $tokenCallback;
50
+ /**
51
+ * Creates a new AuthTokenSubscriber.
52
+ *
53
+ * @param FetchAuthTokenInterface $fetcher is used to fetch the auth token
54
+ * @param callable $httpHandler (optional) http client to fetch the token.
55
+ * @param callable $tokenCallback (optional) function to be called when a new token is fetched.
56
+ */
57
+ public function __construct(FetchAuthTokenInterface $fetcher, callable $httpHandler = null, callable $tokenCallback = null)
58
+ {
59
+ $this->fetcher = $fetcher;
60
+ $this->httpHandler = $httpHandler;
61
+ $this->tokenCallback = $tokenCallback;
62
+ }
63
+ /**
64
+ * @return array
65
+ */
66
+ public function getEvents()
67
+ {
68
+ return ['before' => ['onBefore', RequestEvents::SIGN_REQUEST]];
69
+ }
70
+ /**
71
+ * Updates the request with an Authorization header when auth is 'fetched_auth_token'.
72
+ *
73
+ * Example:
74
+ * ```
75
+ * use GuzzleHttp\Client;
76
+ * use Google\Auth\OAuth2;
77
+ * use Google\Auth\Subscriber\AuthTokenSubscriber;
78
+ *
79
+ * $config = [..<oauth config param>.];
80
+ * $oauth2 = new OAuth2($config)
81
+ * $subscriber = new AuthTokenSubscriber($oauth2);
82
+ *
83
+ * $client = new Client([
84
+ * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
85
+ * 'defaults' => ['auth' => 'google_auth']
86
+ * ]);
87
+ * $client->getEmitter()->attach($subscriber);
88
+ *
89
+ * $res = $client->get('myproject/taskqueues/myqueue');
90
+ * ```
91
+ *
92
+ * @param BeforeEvent $event
93
+ */
94
+ public function onBefore(BeforeEvent $event)
95
+ {
96
+ // Requests using "auth"="google_auth" will be authorized.
97
+ $request = $event->getRequest();
98
+ if ($request->getConfig()['auth'] != 'google_auth') {
99
+ return;
100
+ }
101
+ // Fetch the auth token.
102
+ $auth_tokens = $this->fetcher->fetchAuthToken($this->httpHandler);
103
+ if (\array_key_exists('access_token', $auth_tokens)) {
104
+ $request->setHeader('authorization', 'Bearer ' . $auth_tokens['access_token']);
105
+ // notify the callback if applicable
106
+ if ($this->tokenCallback) {
107
+ \call_user_func($this->tokenCallback, $this->fetcher->getCacheKey(), $auth_tokens['access_token']);
108
+ }
109
+ }
110
+ if ($quotaProject = $this->getQuotaProject()) {
111
+ $request->setHeader(GetQuotaProjectInterface::X_GOOG_USER_PROJECT_HEADER, $quotaProject);
112
+ }
113
+ }
114
+ private function getQuotaProject()
115
+ {
116
+ if ($this->fetcher instanceof GetQuotaProjectInterface) {
117
+ return $this->fetcher->getQuotaProject();
118
+ }
119
+ }
120
+ }
third-party/google/auth/src/Subscriber/ScopedAccessTokenSubscriber.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Subscriber;
19
+
20
+ use SimpleCalendar\plugin_deps\Google\Auth\CacheTrait;
21
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\BeforeEvent;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\RequestEvents;
23
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\SubscriberInterface;
24
+ use SimpleCalendar\plugin_deps\Psr\Cache\CacheItemPoolInterface;
25
+ /**
26
+ * ScopedAccessTokenSubscriber is a Guzzle Subscriber that adds an Authorization
27
+ * header provided by a closure.
28
+ *
29
+ * The closure returns an access token, taking the scope, either a single
30
+ * string or an array of strings, as its value. If provided, a cache will be
31
+ * used to preserve the access token for a given lifetime.
32
+ *
33
+ * Requests will be accessed with the authorization header:
34
+ *
35
+ * 'authorization' 'Bearer <access token obtained from the closure>'
36
+ */
37
+ class ScopedAccessTokenSubscriber implements SubscriberInterface
38
+ {
39
+ use CacheTrait;
40
+ const DEFAULT_CACHE_LIFETIME = 1500;
41
+ /**
42
+ * @var CacheItemPoolInterface
43
+ */
44
+ private $cache;
45
+ /**
46
+ * @var callable The access token generator function
47
+ */
48
+ private $tokenFunc;
49
+ /**
50
+ * @var array|string The scopes used to generate the token
51
+ */
52
+ private $scopes;
53
+ /**
54
+ * @var array
55
+ */
56
+ private $cacheConfig;
57
+ /**
58
+ * Creates a new ScopedAccessTokenSubscriber.
59
+ *
60
+ * @param callable $tokenFunc a token generator function
61
+ * @param array|string $scopes the token authentication scopes
62
+ * @param array $cacheConfig configuration for the cache when it's present
63
+ * @param CacheItemPoolInterface $cache an implementation of CacheItemPoolInterface
64
+ */
65
+ public function __construct(callable $tokenFunc, $scopes, array $cacheConfig = null, CacheItemPoolInterface $cache = null)
66
+ {
67
+ $this->tokenFunc = $tokenFunc;
68
+ if (!(\is_string($scopes) || \is_array($scopes))) {
69
+ throw new \InvalidArgumentException('wants scope should be string or array');
70
+ }
71
+ $this->scopes = $scopes;
72
+ if (!\is_null($cache)) {
73
+ $this->cache = $cache;
74
+ $this->cacheConfig = \array_merge(['lifetime' => self::DEFAULT_CACHE_LIFETIME, 'prefix' => ''], $cacheConfig);
75
+ }
76
+ }
77
+ /**
78
+ * @return array
79
+ */
80
+ public function getEvents()
81
+ {
82
+ return ['before' => ['onBefore', RequestEvents::SIGN_REQUEST]];
83
+ }
84
+ /**
85
+ * Updates the request with an Authorization header when auth is 'scoped'.
86
+ *
87
+ * E.g this could be used to authenticate using the AppEngine AppIdentityService.
88
+ *
89
+ * Example:
90
+ * ```
91
+ * use google\appengine\api\app_identity\AppIdentityService;
92
+ * use Google\Auth\Subscriber\ScopedAccessTokenSubscriber;
93
+ * use GuzzleHttp\Client;
94
+ *
95
+ * $scope = 'https://www.googleapis.com/auth/taskqueue'
96
+ * $subscriber = new ScopedAccessToken(
97
+ * 'AppIdentityService::getAccessToken',
98
+ * $scope,
99
+ * ['prefix' => 'Google\Auth\ScopedAccessToken::'],
100
+ * $cache = new Memcache()
101
+ * );
102
+ *
103
+ * $client = new Client([
104
+ * 'base_url' => 'https://www.googleapis.com/taskqueue/v1beta2/projects/',
105
+ * 'defaults' => ['auth' => 'scoped']
106
+ * ]);
107
+ * $client->getEmitter()->attach($subscriber);
108
+ *
109
+ * $res = $client->get('myproject/taskqueues/myqueue');
110
+ * ```
111
+ *
112
+ * @param BeforeEvent $event
113
+ */
114
+ public function onBefore(BeforeEvent $event)
115
+ {
116
+ // Requests using "auth"="scoped" will be authorized.
117
+ $request = $event->getRequest();
118
+ if ($request->getConfig()['auth'] != 'scoped') {
119
+ return;
120
+ }
121
+ $auth_header = 'Bearer ' . $this->fetchToken();
122
+ $request->setHeader('authorization', $auth_header);
123
+ }
124
+ /**
125
+ * @return string
126
+ */
127
+ private function getCacheKey()
128
+ {
129
+ $key = null;
130
+ if (\is_string($this->scopes)) {
131
+ $key .= $this->scopes;
132
+ } elseif (\is_array($this->scopes)) {
133
+ $key .= \implode(':', $this->scopes);
134
+ }
135
+ return $key;
136
+ }
137
+ /**
138
+ * Determine if token is available in the cache, if not call tokenFunc to
139
+ * fetch it.
140
+ *
141
+ * @return string
142
+ */
143
+ private function fetchToken()
144
+ {
145
+ $cacheKey = $this->getCacheKey();
146
+ $cached = $this->getCachedValue($cacheKey);
147
+ if (!empty($cached)) {
148
+ return $cached;
149
+ }
150
+ $token = \call_user_func($this->tokenFunc, $this->scopes);
151
+ $this->setCachedValue($cacheKey, $token);
152
+ return $token;
153
+ }
154
+ }
third-party/google/auth/src/Subscriber/SimpleSubscriber.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2015 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth\Subscriber;
19
+
20
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\BeforeEvent;
21
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\RequestEvents;
22
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Event\SubscriberInterface;
23
+ /**
24
+ * SimpleSubscriber is a Guzzle Subscriber that implements Google's Simple API
25
+ * access.
26
+ *
27
+ * Requests are accessed using the Simple API access developer key.
28
+ */
29
+ class SimpleSubscriber implements SubscriberInterface
30
+ {
31
+ /**
32
+ * @var array
33
+ */
34
+ private $config;
35
+ /**
36
+ * Create a new Simple plugin.
37
+ *
38
+ * The configuration array expects one option
39
+ * - key: required, otherwise InvalidArgumentException is thrown
40
+ *
41
+ * @param array $config Configuration array
42
+ */
43
+ public function __construct(array $config)
44
+ {
45
+ if (!isset($config['key'])) {
46
+ throw new \InvalidArgumentException('requires a key to have been set');
47
+ }
48
+ $this->config = \array_merge([], $config);
49
+ }
50
+ /**
51
+ * @return array
52
+ */
53
+ public function getEvents()
54
+ {
55
+ return ['before' => ['onBefore', RequestEvents::SIGN_REQUEST]];
56
+ }
57
+ /**
58
+ * Updates the request query with the developer key if auth is set to simple.
59
+ *
60
+ * Example:
61
+ * ```
62
+ * use Google\Auth\Subscriber\SimpleSubscriber;
63
+ * use GuzzleHttp\Client;
64
+ *
65
+ * $my_key = 'is not the same as yours';
66
+ * $subscriber = new SimpleSubscriber(['key' => $my_key]);
67
+ *
68
+ * $client = new Client([
69
+ * 'base_url' => 'https://www.googleapis.com/discovery/v1/',
70
+ * 'defaults' => ['auth' => 'simple']
71
+ * ]);
72
+ * $client->getEmitter()->attach($subscriber);
73
+ *
74
+ * $res = $client->get('drive/v2/rest');
75
+ * ```
76
+ *
77
+ * @param BeforeEvent $event
78
+ */
79
+ public function onBefore(BeforeEvent $event)
80
+ {
81
+ // Requests using "auth"="simple" with the developer key.
82
+ $request = $event->getRequest();
83
+ if ($request->getConfig()['auth'] != 'simple') {
84
+ return;
85
+ }
86
+ $request->getQuery()->overwriteWith($this->config);
87
+ }
88
+ }
third-party/google/auth/src/UpdateMetadataInterface.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2020 Google LLC
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ namespace SimpleCalendar\plugin_deps\Google\Auth;
19
+
20
+ /**
21
+ * Describes a Credentials object which supports updating request metadata
22
+ * (request headers).
23
+ */
24
+ interface UpdateMetadataInterface
25
+ {
26
+ const AUTH_METADATA_KEY = 'authorization';
27
+ /**
28
+ * Updates metadata with the authorization token.
29
+ *
30
+ * @param array $metadata metadata hashmap
31
+ * @param string $authUri optional auth uri
32
+ * @param callable $httpHandler callback which delivers psr7 request
33
+ * @return array updated metadata hashmap
34
+ */
35
+ public function updateMetadata($metadata, $authUri = null, callable $httpHandler = null);
36
+ }
third-party/guzzlehttp/guzzle/src/BodySummarizer.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp;
4
+
5
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\MessageInterface;
6
+ final class BodySummarizer implements \SimpleCalendar\plugin_deps\GuzzleHttp\BodySummarizerInterface
7
+ {
8
+ /**
9
+ * @var int|null
10
+ */
11
+ private $truncateAt;
12
+ public function __construct(int $truncateAt = null)
13
+ {
14
+ $this->truncateAt = $truncateAt;
15
+ }
16
+ /**
17
+ * Returns a summarized message body.
18
+ */
19
+ public function summarize(MessageInterface $message) : ?string
20
+ {
21
+ return $this->truncateAt === null ? \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Message::bodySummary($message) : \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Message::bodySummary($message, $this->truncateAt);
22
+ }
23
+ }
third-party/guzzlehttp/guzzle/src/BodySummarizerInterface.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp;
4
+
5
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\MessageInterface;
6
+ interface BodySummarizerInterface
7
+ {
8
+ /**
9
+ * Returns a summarized message body.
10
+ */
11
+ public function summarize(MessageInterface $message) : ?string;
12
+ }
third-party/guzzlehttp/guzzle/src/Client.php ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp;
4
+
5
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\CookieJar;
6
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\GuzzleException;
7
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\InvalidArgumentException;
8
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise as P;
9
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise\PromiseInterface;
10
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
11
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
12
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\UriInterface;
13
+ /**
14
+ * @final
15
+ */
16
+ class Client implements \SimpleCalendar\plugin_deps\GuzzleHttp\ClientInterface, \SimpleCalendar\plugin_deps\Psr\Http\Client\ClientInterface
17
+ {
18
+ use ClientTrait;
19
+ /**
20
+ * @var array Default request options
21
+ */
22
+ private $config;
23
+ /**
24
+ * Clients accept an array of constructor parameters.
25
+ *
26
+ * Here's an example of creating a client using a base_uri and an array of
27
+ * default request options to apply to each request:
28
+ *
29
+ * $client = new Client([
30
+ * 'base_uri' => 'http://www.foo.com/1.0/',
31
+ * 'timeout' => 0,
32
+ * 'allow_redirects' => false,
33
+ * 'proxy' => '192.168.16.1:10'
34
+ * ]);
35
+ *
36
+ * Client configuration settings include the following options:
37
+ *
38
+ * - handler: (callable) Function that transfers HTTP requests over the
39
+ * wire. The function is called with a Psr7\Http\Message\RequestInterface
40
+ * and array of transfer options, and must return a
41
+ * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a
42
+ * Psr7\Http\Message\ResponseInterface on success.
43
+ * If no handler is provided, a default handler will be created
44
+ * that enables all of the request options below by attaching all of the
45
+ * default middleware to the handler.
46
+ * - base_uri: (string|UriInterface) Base URI of the client that is merged
47
+ * into relative URIs. Can be a string or instance of UriInterface.
48
+ * - **: any request option
49
+ *
50
+ * @param array $config Client configuration settings.
51
+ *
52
+ * @see \GuzzleHttp\RequestOptions for a list of available request options.
53
+ */
54
+ public function __construct(array $config = [])
55
+ {
56
+ if (!isset($config['handler'])) {
57
+ $config['handler'] = \SimpleCalendar\plugin_deps\GuzzleHttp\HandlerStack::create();
58
+ } elseif (!\is_callable($config['handler'])) {
59
+ throw new InvalidArgumentException('handler must be a callable');
60
+ }
61
+ // Convert the base_uri to a UriInterface
62
+ if (isset($config['base_uri'])) {
63
+ $config['base_uri'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::uriFor($config['base_uri']);
64
+ }
65
+ $this->configureDefaults($config);
66
+ }
67
+ /**
68
+ * @param string $method
69
+ * @param array $args
70
+ *
71
+ * @return PromiseInterface|ResponseInterface
72
+ *
73
+ * @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0.
74
+ */
75
+ public function __call($method, $args)
76
+ {
77
+ if (\count($args) < 1) {
78
+ throw new InvalidArgumentException('Magic request methods require a URI and optional options array');
79
+ }
80
+ $uri = $args[0];
81
+ $opts = $args[1] ?? [];
82
+ return \substr($method, -5) === 'Async' ? $this->requestAsync(\substr($method, 0, -5), $uri, $opts) : $this->request($method, $uri, $opts);
83
+ }
84
+ /**
85
+ * Asynchronously send an HTTP request.
86
+ *
87
+ * @param array $options Request options to apply to the given
88
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
89
+ */
90
+ public function sendAsync(RequestInterface $request, array $options = []) : PromiseInterface
91
+ {
92
+ // Merge the base URI into the request URI if needed.
93
+ $options = $this->prepareDefaults($options);
94
+ return $this->transfer($request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), $options);
95
+ }
96
+ /**
97
+ * Send an HTTP request.
98
+ *
99
+ * @param array $options Request options to apply to the given
100
+ * request and to the transfer. See \GuzzleHttp\RequestOptions.
101
+ *
102
+ * @throws GuzzleException
103
+ */
104
+ public function send(RequestInterface $request, array $options = []) : ResponseInterface
105
+ {
106
+ $options[\SimpleCalendar\plugin_deps\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true;
107
+ return $this->sendAsync($request, $options)->wait();
108
+ }
109
+ /**
110
+ * The HttpClient PSR (PSR-18) specify this method.
111
+ *
112
+ * @inheritDoc
113
+ */
114
+ public function sendRequest(RequestInterface $request) : ResponseInterface
115
+ {
116
+ $options[\SimpleCalendar\plugin_deps\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true;
117
+ $options[\SimpleCalendar\plugin_deps\GuzzleHttp\RequestOptions::ALLOW_REDIRECTS] = \false;
118
+ $options[\SimpleCalendar\plugin_deps\GuzzleHttp\RequestOptions::HTTP_ERRORS] = \false;
119
+ return $this->sendAsync($request, $options)->wait();
120
+ }
121
+ /**
122
+ * Create and send an asynchronous HTTP request.
123
+ *
124
+ * Use an absolute path to override the base path of the client, or a
125
+ * relative path to append to the base path of the client. The URL can
126
+ * contain the query string as well. Use an array to provide a URL
127
+ * template and additional variables to use in the URL template expansion.
128
+ *
129
+ * @param string $method HTTP method
130
+ * @param string|UriInterface $uri URI object or string.
131
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
132
+ */
133
+ public function requestAsync(string $method, $uri = '', array $options = []) : PromiseInterface
134
+ {
135
+ $options = $this->prepareDefaults($options);
136
+ // Remove request modifying parameter because it can be done up-front.
137
+ $headers = $options['headers'] ?? [];
138
+ $body = $options['body'] ?? null;
139
+ $version = $options['version'] ?? '1.1';
140
+ // Merge the URI into the base URI.
141
+ $uri = $this->buildUri(\SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::uriFor($uri), $options);
142
+ if (\is_array($body)) {
143
+ throw $this->invalidBody();
144
+ }
145
+ $request = new \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Request($method, $uri, $headers, $body, $version);
146
+ // Remove the option so that they are not doubly-applied.
147
+ unset($options['headers'], $options['body'], $options['version']);
148
+ return $this->transfer($request, $options);
149
+ }
150
+ /**
151
+ * Create and send an HTTP request.
152
+ *
153
+ * Use an absolute path to override the base path of the client, or a
154
+ * relative path to append to the base path of the client. The URL can
155
+ * contain the query string as well.
156
+ *
157
+ * @param string $method HTTP method.
158
+ * @param string|UriInterface $uri URI object or string.
159
+ * @param array $options Request options to apply. See \GuzzleHttp\RequestOptions.
160
+ *
161
+ * @throws GuzzleException
162
+ */
163
+ public function request(string $method, $uri = '', array $options = []) : ResponseInterface
164
+ {
165
+ $options[\SimpleCalendar\plugin_deps\GuzzleHttp\RequestOptions::SYNCHRONOUS] = \true;
166
+ return $this->requestAsync($method, $uri, $options)->wait();
167
+ }
168
+ /**
169
+ * Get a client configuration option.
170
+ *
171
+ * These options include default request options of the client, a "handler"
172
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
173
+ * the concrete client.
174
+ *
175
+ * @param string|null $option The config option to retrieve.
176
+ *
177
+ * @return mixed
178
+ *
179
+ * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0.
180
+ */
181
+ public function getConfig(?string $option = null)
182
+ {
183
+ return $option === null ? $this->config : $this->config[$option] ?? null;
184
+ }
185
+ private function buildUri(UriInterface $uri, array $config) : UriInterface
186
+ {
187
+ if (isset($config['base_uri'])) {
188
+ $uri = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\UriResolver::resolve(\SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::uriFor($config['base_uri']), $uri);
189
+ }
190
+ if (isset($config['idn_conversion']) && $config['idn_conversion'] !== \false) {
191
+ $idnOptions = $config['idn_conversion'] === \true ? \IDNA_DEFAULT : $config['idn_conversion'];
192
+ $uri = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::idnUriConvert($uri, $idnOptions);
193
+ }
194
+ return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri;
195
+ }
196
+ /**
197
+ * Configures the default options for a client.
198
+ */
199
+ private function configureDefaults(array $config) : void
200
+ {
201
+ $defaults = ['allow_redirects' => \SimpleCalendar\plugin_deps\GuzzleHttp\RedirectMiddleware::$defaultSettings, 'http_errors' => \true, 'decode_content' => \true, 'verify' => \true, 'cookies' => \false, 'idn_conversion' => \false];
202
+ // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
203
+ // We can only trust the HTTP_PROXY environment variable in a CLI
204
+ // process due to the fact that PHP has no reliable mechanism to
205
+ // get environment variables that start with "HTTP_".
206
+ if (\PHP_SAPI === 'cli' && ($proxy = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::getenv('HTTP_PROXY'))) {
207
+ $defaults['proxy']['http'] = $proxy;
208
+ }
209
+ if ($proxy = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::getenv('HTTPS_PROXY')) {
210
+ $defaults['proxy']['https'] = $proxy;
211
+ }
212
+ if ($noProxy = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::getenv('NO_PROXY')) {
213
+ $cleanedNoProxy = \str_replace(' ', '', $noProxy);
214
+ $defaults['proxy']['no'] = \explode(',', $cleanedNoProxy);
215
+ }
216
+ $this->config = $config + $defaults;
217
+ if (!empty($config['cookies']) && $config['cookies'] === \true) {
218
+ $this->config['cookies'] = new CookieJar();
219
+ }
220
+ // Add the default user-agent header.
221
+ if (!isset($this->config['headers'])) {
222
+ $this->config['headers'] = ['User-Agent' => \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::defaultUserAgent()];
223
+ } else {
224
+ // Add the User-Agent header if one was not already set.
225
+ foreach (\array_keys($this->config['headers']) as $name) {
226
+ if (\strtolower($name) === 'user-agent') {
227
+ return;
228
+ }
229
+ }
230
+ $this->config['headers']['User-Agent'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::defaultUserAgent();
231
+ }
232
+ }
233
+ /**
234
+ * Merges default options into the array.
235
+ *
236
+ * @param array $options Options to modify by reference
237
+ */
238
+ private function prepareDefaults(array $options) : array
239
+ {
240
+ $defaults = $this->config;
241
+ if (!empty($defaults['headers'])) {
242
+ // Default headers are only added if they are not present.
243
+ $defaults['_conditional'] = $defaults['headers'];
244
+ unset($defaults['headers']);
245
+ }
246
+ // Special handling for headers is required as they are added as
247
+ // conditional headers and as headers passed to a request ctor.
248
+ if (\array_key_exists('headers', $options)) {
249
+ // Allows default headers to be unset.
250
+ if ($options['headers'] === null) {
251
+ $defaults['_conditional'] = [];
252
+ unset($options['headers']);
253
+ } elseif (!\is_array($options['headers'])) {
254
+ throw new InvalidArgumentException('headers must be an array');
255
+ }
256
+ }
257
+ // Shallow merge defaults underneath options.
258
+ $result = $options + $defaults;
259
+ // Remove null values.
260
+ foreach ($result as $k => $v) {
261
+ if ($v === null) {
262
+ unset($result[$k]);
263
+ }
264
+ }
265
+ return $result;
266
+ }
267
+ /**
268
+ * Transfers the given request and applies request options.
269
+ *
270
+ * The URI of the request is not modified and the request options are used
271
+ * as-is without merging in default options.
272
+ *
273
+ * @param array $options See \GuzzleHttp\RequestOptions.
274
+ */
275
+ private function transfer(RequestInterface $request, array $options) : PromiseInterface
276
+ {
277
+ $request = $this->applyOptions($request, $options);
278
+ /** @var HandlerStack $handler */
279
+ $handler = $options['handler'];
280
+ try {
281
+ return P\Create::promiseFor($handler($request, $options));
282
+ } catch (\Exception $e) {
283
+ return P\Create::rejectionFor($e);
284
+ }
285
+ }
286
+ /**
287
+ * Applies the array of request options to a request.
288
+ */
289
+ private function applyOptions(RequestInterface $request, array &$options) : RequestInterface
290
+ {
291
+ $modify = ['set_headers' => []];
292
+ if (isset($options['headers'])) {
293
+ $modify['set_headers'] = $options['headers'];
294
+ unset($options['headers']);
295
+ }
296
+ if (isset($options['form_params'])) {
297
+ if (isset($options['multipart'])) {
298
+ throw new InvalidArgumentException('You cannot use ' . 'form_params and multipart at the same time. Use the ' . 'form_params option if you want to send application/' . 'x-www-form-urlencoded requests, and the multipart ' . 'option to send multipart/form-data requests.');
299
+ }
300
+ $options['body'] = \http_build_query($options['form_params'], '', '&');
301
+ unset($options['form_params']);
302
+ // Ensure that we don't have the header in different case and set the new value.
303
+ $options['_conditional'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
304
+ $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded';
305
+ }
306
+ if (isset($options['multipart'])) {
307
+ $options['body'] = new \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\MultipartStream($options['multipart']);
308
+ unset($options['multipart']);
309
+ }
310
+ if (isset($options['json'])) {
311
+ $options['body'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Utils::jsonEncode($options['json']);
312
+ unset($options['json']);
313
+ // Ensure that we don't have the header in different case and set the new value.
314
+ $options['_conditional'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
315
+ $options['_conditional']['Content-Type'] = 'application/json';
316
+ }
317
+ if (!empty($options['decode_content']) && $options['decode_content'] !== \true) {
318
+ // Ensure that we don't have the header in different case and set the new value.
319
+ $options['_conditional'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::caselessRemove(['Accept-Encoding'], $options['_conditional']);
320
+ $modify['set_headers']['Accept-Encoding'] = $options['decode_content'];
321
+ }
322
+ if (isset($options['body'])) {
323
+ if (\is_array($options['body'])) {
324
+ throw $this->invalidBody();
325
+ }
326
+ $modify['body'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::streamFor($options['body']);
327
+ unset($options['body']);
328
+ }
329
+ if (!empty($options['auth']) && \is_array($options['auth'])) {
330
+ $value = $options['auth'];
331
+ $type = isset($value[2]) ? \strtolower($value[2]) : 'basic';
332
+ switch ($type) {
333
+ case 'basic':
334
+ // Ensure that we don't have the header in different case and set the new value.
335
+ $modify['set_headers'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']);
336
+ $modify['set_headers']['Authorization'] = 'Basic ' . \base64_encode("{$value[0]}:{$value[1]}");
337
+ break;
338
+ case 'digest':
339
+ // @todo: Do not rely on curl
340
+ $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_DIGEST;
341
+ $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}";
342
+ break;
343
+ case 'ntlm':
344
+ $options['curl'][\CURLOPT_HTTPAUTH] = \CURLAUTH_NTLM;
345
+ $options['curl'][\CURLOPT_USERPWD] = "{$value[0]}:{$value[1]}";
346
+ break;
347
+ }
348
+ }
349
+ if (isset($options['query'])) {
350
+ $value = $options['query'];
351
+ if (\is_array($value)) {
352
+ $value = \http_build_query($value, '', '&', \PHP_QUERY_RFC3986);
353
+ }
354
+ if (!\is_string($value)) {
355
+ throw new InvalidArgumentException('query must be a string or array');
356
+ }
357
+ $modify['query'] = $value;
358
+ unset($options['query']);
359
+ }
360
+ // Ensure that sink is not an invalid value.
361
+ if (isset($options['sink'])) {
362
+ // TODO: Add more sink validation?
363
+ if (\is_bool($options['sink'])) {
364
+ throw new InvalidArgumentException('sink must not be a boolean');
365
+ }
366
+ }
367
+ $request = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::modifyRequest($request, $modify);
368
+ if ($request->getBody() instanceof \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\MultipartStream) {
369
+ // Use a multipart/form-data POST if a Content-Type is not set.
370
+ // Ensure that we don't have the header in different case and set the new value.
371
+ $options['_conditional'] = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']);
372
+ $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' . $request->getBody()->getBoundary();
373
+ }
374
+ // Merge in conditional headers if they are not present.
375
+ if (isset($options['_conditional'])) {
376
+ // Build up the changes so it's in a single clone of the message.
377
+ $modify = [];
378
+ foreach ($options['_conditional'] as $k => $v) {
379
+ if (!$request->hasHeader($k)) {
380
+ $modify['set_headers'][$k] = $v;
381
+ }
382
+ }
383
+ $request = \SimpleCalendar\plugin_deps\GuzzleHttp\Psr7\Utils::modifyRequest($request, $modify);
384
+ // Don't pass this internal value along to middleware/handlers.
385
+ unset($options['_conditional']);
386
+ }
387
+ return $request;
388
+ }
389
+ /**
390
+ * Return an InvalidArgumentException with pre-set message.
391
+ */
392
+ private function invalidBody() : InvalidArgumentException
393
+ {
394
+ return new InvalidArgumentException('Passing in the "body" request ' . 'option as an array to send a request is not supported. ' . 'Please use the "form_params" request option to send a ' . 'application/x-www-form-urlencoded request, or the "multipart" ' . 'request option to send a multipart/form-data request.');
395
+ }
396
+ }
third-party/guzzlehttp/guzzle/src/ClientInterface.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp;
4
+
5
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\GuzzleException;
6
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise\PromiseInterface;
7
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
8
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
9
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\UriInterface;
10
+ /**
11
+ * Client interface for sending HTTP requests.
12
+ */
13
+ interface ClientInterface
14
+ {
15
+ /**
16
+ * The Guzzle major version.
17
+ */
18
+ const MAJOR_VERSION = 7;
19
+ /**
20
+ * Send an HTTP request.
21
+ *
22
+ * @param RequestInterface $request Request to send
23
+ * @param array $options Request options to apply to the given
24
+ * request and to the transfer.
25
+ *
26
+ * @throws GuzzleException
27
+ */
28
+ public function send(RequestInterface $request, array $options = []) : ResponseInterface;
29
+ /**
30
+ * Asynchronously send an HTTP request.
31
+ *
32
+ * @param RequestInterface $request Request to send
33
+ * @param array $options Request options to apply to the given
34
+ * request and to the transfer.
35
+ */
36
+ public function sendAsync(RequestInterface $request, array $options = []) : PromiseInterface;
37
+ /**
38
+ * Create and send an HTTP request.
39
+ *
40
+ * Use an absolute path to override the base path of the client, or a
41
+ * relative path to append to the base path of the client. The URL can
42
+ * contain the query string as well.
43
+ *
44
+ * @param string $method HTTP method.
45
+ * @param string|UriInterface $uri URI object or string.
46
+ * @param array $options Request options to apply.
47
+ *
48
+ * @throws GuzzleException
49
+ */
50
+ public function request(string $method, $uri, array $options = []) : ResponseInterface;
51
+ /**
52
+ * Create and send an asynchronous HTTP request.
53
+ *
54
+ * Use an absolute path to override the base path of the client, or a
55
+ * relative path to append to the base path of the client. The URL can
56
+ * contain the query string as well. Use an array to provide a URL
57
+ * template and additional variables to use in the URL template expansion.
58
+ *
59
+ * @param string $method HTTP method
60
+ * @param string|UriInterface $uri URI object or string.
61
+ * @param array $options Request options to apply.
62
+ */
63
+ public function requestAsync(string $method, $uri, array $options = []) : PromiseInterface;
64
+ /**
65
+ * Get a client configuration option.
66
+ *
67
+ * These options include default request options of the client, a "handler"
68
+ * (if utilized by the concrete client), and a "base_uri" if utilized by
69
+ * the concrete client.
70
+ *
71
+ * @param string|null $option The config option to retrieve.
72
+ *
73
+ * @return mixed
74
+ *
75
+ * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0.
76
+ */
77
+ public function getConfig(?string $option = null);
78
+ }
third-party/guzzlehttp/guzzle/src/ClientTrait.php ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp;
4
+
5
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Exception\GuzzleException;
6
+ use SimpleCalendar\plugin_deps\GuzzleHttp\Promise\PromiseInterface;
7
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
8
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\UriInterface;
9
+ /**
10
+ * Client interface for sending HTTP requests.
11
+ */
12
+ trait ClientTrait
13
+ {
14
+ /**
15
+ * Create and send an HTTP request.
16
+ *
17
+ * Use an absolute path to override the base path of the client, or a
18
+ * relative path to append to the base path of the client. The URL can
19
+ * contain the query string as well.
20
+ *
21
+ * @param string $method HTTP method.
22
+ * @param string|UriInterface $uri URI object or string.
23
+ * @param array $options Request options to apply.
24
+ *
25
+ * @throws GuzzleException
26
+ */
27
+ public abstract function request(string $method, $uri, array $options = []) : ResponseInterface;
28
+ /**
29
+ * Create and send an HTTP GET request.
30
+ *
31
+ * Use an absolute path to override the base path of the client, or a
32
+ * relative path to append to the base path of the client. The URL can
33
+ * contain the query string as well.
34
+ *
35
+ * @param string|UriInterface $uri URI object or string.
36
+ * @param array $options Request options to apply.
37
+ *
38
+ * @throws GuzzleException
39
+ */
40
+ public function get($uri, array $options = []) : ResponseInterface
41
+ {
42
+ return $this->request('GET', $uri, $options);
43
+ }
44
+ /**
45
+ * Create and send an HTTP HEAD request.
46
+ *
47
+ * Use an absolute path to override the base path of the client, or a
48
+ * relative path to append to the base path of the client. The URL can
49
+ * contain the query string as well.
50
+ *
51
+ * @param string|UriInterface $uri URI object or string.
52
+ * @param array $options Request options to apply.
53
+ *
54
+ * @throws GuzzleException
55
+ */
56
+ public function head($uri, array $options = []) : ResponseInterface
57
+ {
58
+ return $this->request('HEAD', $uri, $options);
59
+ }
60
+ /**
61
+ * Create and send an HTTP PUT request.
62
+ *
63
+ * Use an absolute path to override the base path of the client, or a
64
+ * relative path to append to the base path of the client. The URL can
65
+ * contain the query string as well.
66
+ *
67
+ * @param string|UriInterface $uri URI object or string.
68
+ * @param array $options Request options to apply.
69
+ *
70
+ * @throws GuzzleException
71
+ */
72
+ public function put($uri, array $options = []) : ResponseInterface
73
+ {
74
+ return $this->request('PUT', $uri, $options);
75
+ }
76
+ /**
77
+ * Create and send an HTTP POST request.
78
+ *
79
+ * Use an absolute path to override the base path of the client, or a
80
+ * relative path to append to the base path of the client. The URL can
81
+ * contain the query string as well.
82
+ *
83
+ * @param string|UriInterface $uri URI object or string.
84
+ * @param array $options Request options to apply.
85
+ *
86
+ * @throws GuzzleException
87
+ */
88
+ public function post($uri, array $options = []) : ResponseInterface
89
+ {
90
+ return $this->request('POST', $uri, $options);
91
+ }
92
+ /**
93
+ * Create and send an HTTP PATCH request.
94
+ *
95
+ * Use an absolute path to override the base path of the client, or a
96
+ * relative path to append to the base path of the client. The URL can
97
+ * contain the query string as well.
98
+ *
99
+ * @param string|UriInterface $uri URI object or string.
100
+ * @param array $options Request options to apply.
101
+ *
102
+ * @throws GuzzleException
103
+ */
104
+ public function patch($uri, array $options = []) : ResponseInterface
105
+ {
106
+ return $this->request('PATCH', $uri, $options);
107
+ }
108
+ /**
109
+ * Create and send an HTTP DELETE request.
110
+ *
111
+ * Use an absolute path to override the base path of the client, or a
112
+ * relative path to append to the base path of the client. The URL can
113
+ * contain the query string as well.
114
+ *
115
+ * @param string|UriInterface $uri URI object or string.
116
+ * @param array $options Request options to apply.
117
+ *
118
+ * @throws GuzzleException
119
+ */
120
+ public function delete($uri, array $options = []) : ResponseInterface
121
+ {
122
+ return $this->request('DELETE', $uri, $options);
123
+ }
124
+ /**
125
+ * Create and send an asynchronous HTTP request.
126
+ *
127
+ * Use an absolute path to override the base path of the client, or a
128
+ * relative path to append to the base path of the client. The URL can
129
+ * contain the query string as well. Use an array to provide a URL
130
+ * template and additional variables to use in the URL template expansion.
131
+ *
132
+ * @param string $method HTTP method
133
+ * @param string|UriInterface $uri URI object or string.
134
+ * @param array $options Request options to apply.
135
+ */
136
+ public abstract function requestAsync(string $method, $uri, array $options = []) : PromiseInterface;
137
+ /**
138
+ * Create and send an asynchronous HTTP GET request.
139
+ *
140
+ * Use an absolute path to override the base path of the client, or a
141
+ * relative path to append to the base path of the client. The URL can
142
+ * contain the query string as well. Use an array to provide a URL
143
+ * template and additional variables to use in the URL template expansion.
144
+ *
145
+ * @param string|UriInterface $uri URI object or string.
146
+ * @param array $options Request options to apply.
147
+ */
148
+ public function getAsync($uri, array $options = []) : PromiseInterface
149
+ {
150
+ return $this->requestAsync('GET', $uri, $options);
151
+ }
152
+ /**
153
+ * Create and send an asynchronous HTTP HEAD request.
154
+ *
155
+ * Use an absolute path to override the base path of the client, or a
156
+ * relative path to append to the base path of the client. The URL can
157
+ * contain the query string as well. Use an array to provide a URL
158
+ * template and additional variables to use in the URL template expansion.
159
+ *
160
+ * @param string|UriInterface $uri URI object or string.
161
+ * @param array $options Request options to apply.
162
+ */
163
+ public function headAsync($uri, array $options = []) : PromiseInterface
164
+ {
165
+ return $this->requestAsync('HEAD', $uri, $options);
166
+ }
167
+ /**
168
+ * Create and send an asynchronous HTTP PUT request.
169
+ *
170
+ * Use an absolute path to override the base path of the client, or a
171
+ * relative path to append to the base path of the client. The URL can
172
+ * contain the query string as well. Use an array to provide a URL
173
+ * template and additional variables to use in the URL template expansion.
174
+ *
175
+ * @param string|UriInterface $uri URI object or string.
176
+ * @param array $options Request options to apply.
177
+ */
178
+ public function putAsync($uri, array $options = []) : PromiseInterface
179
+ {
180
+ return $this->requestAsync('PUT', $uri, $options);
181
+ }
182
+ /**
183
+ * Create and send an asynchronous HTTP POST request.
184
+ *
185
+ * Use an absolute path to override the base path of the client, or a
186
+ * relative path to append to the base path of the client. The URL can
187
+ * contain the query string as well. Use an array to provide a URL
188
+ * template and additional variables to use in the URL template expansion.
189
+ *
190
+ * @param string|UriInterface $uri URI object or string.
191
+ * @param array $options Request options to apply.
192
+ */
193
+ public function postAsync($uri, array $options = []) : PromiseInterface
194
+ {
195
+ return $this->requestAsync('POST', $uri, $options);
196
+ }
197
+ /**
198
+ * Create and send an asynchronous HTTP PATCH request.
199
+ *
200
+ * Use an absolute path to override the base path of the client, or a
201
+ * relative path to append to the base path of the client. The URL can
202
+ * contain the query string as well. Use an array to provide a URL
203
+ * template and additional variables to use in the URL template expansion.
204
+ *
205
+ * @param string|UriInterface $uri URI object or string.
206
+ * @param array $options Request options to apply.
207
+ */
208
+ public function patchAsync($uri, array $options = []) : PromiseInterface
209
+ {
210
+ return $this->requestAsync('PATCH', $uri, $options);
211
+ }
212
+ /**
213
+ * Create and send an asynchronous HTTP DELETE request.
214
+ *
215
+ * Use an absolute path to override the base path of the client, or a
216
+ * relative path to append to the base path of the client. The URL can
217
+ * contain the query string as well. Use an array to provide a URL
218
+ * template and additional variables to use in the URL template expansion.
219
+ *
220
+ * @param string|UriInterface $uri URI object or string.
221
+ * @param array $options Request options to apply.
222
+ */
223
+ public function deleteAsync($uri, array $options = []) : PromiseInterface
224
+ {
225
+ return $this->requestAsync('DELETE', $uri, $options);
226
+ }
227
+ }
third-party/guzzlehttp/guzzle/src/Cookie/CookieJar.php ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace SimpleCalendar\plugin_deps\GuzzleHttp\Cookie;
4
+
5
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\RequestInterface;
6
+ use SimpleCalendar\plugin_deps\Psr\Http\Message\ResponseInterface;
7
+ /**
8
+ * Cookie jar that stores cookies as an array
9
+ */
10
+ class CookieJar implements \SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\CookieJarInterface
11
+ {
12
+ /**
13
+ * @var SetCookie[] Loaded cookie data
14
+ */
15
+ private $cookies = [];
16
+ /**
17
+ * @var bool
18
+ */
19
+ private $strictMode;
20
+ /**
21
+ * @param bool $strictMode Set to true to throw exceptions when invalid
22
+ * cookies are added to the cookie jar.
23
+ * @param array $cookieArray Array of SetCookie objects or a hash of
24
+ * arrays that can be used with the SetCookie
25
+ * constructor
26
+ */
27
+ public function __construct(bool $strictMode = \false, array $cookieArray = [])
28
+ {
29
+ $this->strictMode = $strictMode;
30
+ foreach ($cookieArray as $cookie) {
31
+ if (!$cookie instanceof \SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie) {
32
+ $cookie = new \SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie($cookie);
33
+ }
34
+ $this->setCookie($cookie);
35
+ }
36
+ }
37
+ /**
38
+ * Create a new Cookie jar from an associative array and domain.
39
+ *
40
+ * @param array $cookies Cookies to create the jar from
41
+ * @param string $domain Domain to set the cookies to
42
+ */
43
+ public static function fromArray(array $cookies, string $domain) : self
44
+ {
45
+ $cookieJar = new self();
46
+ foreach ($cookies as $name => $value) {
47
+ $cookieJar->setCookie(new \SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie(['Domain' => $domain, 'Name' => $name, 'Value' => $value, 'Discard' => \true]));
48
+ }
49
+ return $cookieJar;
50
+ }
51
+ /**
52
+ * Evaluate if this cookie should be persisted to storage
53
+ * that survives between requests.
54
+ *
55
+ * @param SetCookie $cookie Being evaluated.
56
+ * @param bool $allowSessionCookies If we should persist session cookies
57
+ */
58
+ public static function shouldPersist(\SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie $cookie, bool $allowSessionCookies = \false) : bool
59
+ {
60
+ if ($cookie->getExpires() || $allowSessionCookies) {
61
+ if (!$cookie->getDiscard()) {
62
+ return \true;
63
+ }
64
+ }
65
+ return \false;
66
+ }
67
+ /**
68
+ * Finds and returns the cookie based on the name
69
+ *
70
+ * @param string $name cookie name to search for
71
+ *
72
+ * @return SetCookie|null cookie that was found or null if not found
73
+ */
74
+ public function getCookieByName(string $name) : ?\SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie
75
+ {
76
+ foreach ($this->cookies as $cookie) {
77
+ if ($cookie->getName() !== null && \strcasecmp($cookie->getName(), $name) === 0) {
78
+ return $cookie;
79
+ }
80
+ }
81
+ return null;
82
+ }
83
+ /**
84
+ * @inheritDoc
85
+ */
86
+ public function toArray() : array
87
+ {
88
+ return \array_map(static function (\SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie $cookie) : array {
89
+ return $cookie->toArray();
90
+ }, $this->getIterator()->getArrayCopy());
91
+ }
92
+ /**
93
+ * @inheritDoc
94
+ */
95
+ public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void
96
+ {
97
+ if (!$domain) {
98
+ $this->cookies = [];
99
+ return;
100
+ } elseif (!$path) {
101
+ $this->cookies = \array_filter($this->cookies, static function (\SimpleCalendar\plugin_deps\GuzzleHttp\Cookie\SetCookie $cookie) use($domain) : bool {
102
+ return !$cookie->matchesDomain($domain);
103
+ });
104
+ } elseif (!$name) {
105
+ $this->cookies = \array_filter($this->cookies, static function (\