aliases.php 3.1 KB

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