| 1 |
<?php |
| 2 |
|
| 3 |
if (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 |
|
| 32 |
foreach ($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 |
*/ |
| 40 |
class Google_Task_Composer extends \Google\Task\Composer |
| 41 |
{ |
| 42 |
} |
| 43 |
|
| 44 |
/** @phpstan-ignore-next-line */ |
| 45 |
if (\false) { |
| 46 |
class Google_AccessToken_Revoke extends \Google\AccessToken\Revoke |
| 47 |
{ |
| 48 |
} |
| 49 |
class Google_AccessToken_Verify extends \Google\AccessToken\Verify |
| 50 |
{ |
| 51 |
} |
| 52 |
class Google_AuthHandler_AuthHandlerFactory extends \Google\AuthHandler\AuthHandlerFactory |
| 53 |
{ |
| 54 |
} |
| 55 |
class Google_AuthHandler_Guzzle5AuthHandler extends \Google\AuthHandler\Guzzle5AuthHandler |
| 56 |
{ |
| 57 |
} |
| 58 |
class Google_AuthHandler_Guzzle6AuthHandler extends \Google\AuthHandler\Guzzle6AuthHandler |
| 59 |
{ |
| 60 |
} |
| 61 |
class Google_AuthHandler_Guzzle7AuthHandler extends \Google\AuthHandler\Guzzle7AuthHandler |
| 62 |
{ |
| 63 |
} |
| 64 |
class Google_Client extends \Google\Client |
| 65 |
{ |
| 66 |
} |
| 67 |
class Google_Collection extends \Google\Collection |
| 68 |
{ |
| 69 |
} |
| 70 |
class Google_Exception extends \Google\Exception |
| 71 |
{ |
| 72 |
} |
| 73 |
class Google_Http_Batch extends \Google\Http\Batch |
| 74 |
{ |
| 75 |
} |
| 76 |
class Google_Http_MediaFileUpload extends \Google\Http\MediaFileUpload |
| 77 |
{ |
| 78 |
} |
| 79 |
class Google_Http_REST extends \Google\Http\REST |
| 80 |
{ |
| 81 |
} |
| 82 |
class Google_Model extends \Google\Model |
| 83 |
{ |
| 84 |
} |
| 85 |
class Google_Service extends \Google\Service |
| 86 |
{ |
| 87 |
} |
| 88 |
class Google_Service_Exception extends \Google\Service\Exception |
| 89 |
{ |
| 90 |
} |
| 91 |
class Google_Service_Resource extends \Google\Service\Resource |
| 92 |
{ |
| 93 |
} |
| 94 |
class Google_Task_Exception extends \Google\Task\Exception |
| 95 |
{ |
| 96 |
} |
| 97 |
interface Google_Task_Retryable extends \Google\Task\Retryable |
| 98 |
{ |
| 99 |
} |
| 100 |
class Google_Task_Runner extends \Google\Task\Runner |
| 101 |
{ |
| 102 |
} |
| 103 |
class Google_Utils_UriTemplate extends \Google\Utils\UriTemplate |
| 104 |
{ |
| 105 |
} |
| 106 |
} |
| 107 |
|