PHP Trait Google\Cloud\ClientTrait

Afficher le fichier Open project: GoogleCloudPlatform/gcloud-php

Méthodes protégées

Méthode Description
getGrpcDependencyStatus ( ) : array Abstract the checking of extensions/classes for unit testing.
getMetaData ( ) : Metadata Abstract the Metadata instantiation for unit testing
onGce ( $httpHandler ) : boolean Abstract the GCECredentials call so we can mock it in the unit tests!

Private Methods

Méthode Description
configureAuthentication ( array $config ) : array Fetch and validate the keyfile and set the project ID.
detectProjectId ( array $config ) : string Detect and return a project ID.
getConnectionType ( array $config ) : string Get either a gRPC or REST connection based on the provided config and system settings.
getKeyFile ( array $config = [] ) : array Get a keyfile.

Method Details

getGrpcDependencyStatus() protected méthode

Abstract the checking of extensions/classes for unit testing.
protected getGrpcDependencyStatus ( ) : array
Résultat array

getMetaData() protected méthode

Abstract the Metadata instantiation for unit testing
protected getMetaData ( ) : Metadata
Résultat Google\Cloud\Compute\Metadata

onGce() protected méthode

Abstract the GCECredentials call so we can mock it in the unit tests!
protected onGce ( $httpHandler ) : boolean
Résultat boolean