1<?php
2
3if (class_exists('Google_Client', false)) {
4    // Prevent error with preloading in PHP 7.4
5    // @see https://github.com/googleapis/google-api-php-client/issues/1976
6    return;
7}
8
9$classMap = [
10    'Google\\Client' => 'Google_Client',
11    'Google\\Service' => 'Google_Service',
12    'Google\\AccessToken\\Revoke' => 'Google_AccessToken_Revoke',
13    'Google\\AccessToken\\Verify' => 'Google_AccessToken_Verify',
14    'Google\\Model' => 'Google_Model',
15    'Google\\Utils\\UriTemplate' => 'Google_Utils_UriTemplate',
16    'Google\\AuthHandler\\Guzzle6AuthHandler' => 'Google_AuthHandler_Guzzle6AuthHandler',
17    'Google\\AuthHandler\\Guzzle7AuthHandler' => 'Google_AuthHandler_Guzzle7AuthHandler',
18    'Google\\AuthHandler\\Guzzle5AuthHandler' => 'Google_AuthHandler_Guzzle5AuthHandler',
19    'Google\\AuthHandler\\AuthHandlerFactory' => 'Google_AuthHandler_AuthHandlerFactory',
20    'Google\\Http\\Batch' => 'Google_Http_Batch',
21    'Google\\Http\\MediaFileUpload' => 'Google_Http_MediaFileUpload',
22    'Google\\Http\\REST' => 'Google_Http_REST',
23    'Google\\Task\\Retryable' => 'Google_Task_Retryable',
24    'Google\\Task\\Exception' => 'Google_Task_Exception',
25    'Google\\Task\\Runner' => 'Google_Task_Runner',
26    'Google\\Collection' => 'Google_Collection',
27    'Google\\Service\\Exception' => 'Google_Service_Exception',
28    'Google\\Service\\Resource' => 'Google_Service_Resource',
29    'Google\\Exception' => 'Google_Exception',
30];
31
32foreach ($classMap as $class => $alias) {
33    class_alias($class, $alias);
34}
35
36/**
37 * This class needs to be defined explicitly as scripts must be recognized by
38 * the autoloader.
39 */
40class Google_Task_Composer extends \Google\Task\Composer
41{
42}
43
44if (\false) {
45  class Google_AccessToken_Revoke extends \Google\AccessToken\Revoke {}
46  class Google_AccessToken_Verify extends \Google\AccessToken\Verify {}
47  class Google_AuthHandler_AuthHandlerFactory extends \Google\AuthHandler\AuthHandlerFactory {}
48  class Google_AuthHandler_Guzzle5AuthHandler extends \Google\AuthHandler\Guzzle5AuthHandler {}
49  class Google_AuthHandler_Guzzle6AuthHandler extends \Google\AuthHandler\Guzzle6AuthHandler {}
50  class Google_AuthHandler_Guzzle7AuthHandler extends \Google\AuthHandler\Guzzle7AuthHandler {}
51  class Google_Client extends \Google\Client {}
52  class Google_Collection extends \Google\Collection {}
53  class Google_Exception extends \Google\Exception {}
54  class Google_Http_Batch extends \Google\Http\Batch {}
55  class Google_Http_MediaFileUpload extends \Google\Http\MediaFileUpload {}
56  class Google_Http_REST extends \Google\Http\REST {}
57  class Google_Model extends \Google\Model {}
58  class Google_Service extends \Google\Service {}
59  class Google_Service_Exception extends \Google\Service\Exception {}
60  class Google_Service_Resource extends \Google\Service\Resource {}
61  class Google_Task_Exception extends \Google\Task\Exception {}
62  interface Google_Task_Retryable extends \Google\Task\Retryable {}
63  class Google_Task_Runner extends \Google\Task\Runner {}
64  class Google_Utils_UriTemplate extends \Google\Utils\UriTemplate {}
65}
66