PHP 클래스 GDS\Gateway\RESTv1

https://cloud.google.com/datastore/reference/rest/
상속: extends GDS\Gateway
파일 보기 프로젝트 열기: tomwalder/php-gds

공개 메소드들

메소드 설명
__construct ( $str_project_id, null $str_namespace = null ) Create the auth middleware and set up the HTTP Client
beginTransaction ( boolean $bol_cross_group = FALSE ) : null Start a transaction
deleteMulti ( array $arr_entities ) : mixed Delete 1-many entities
getEndCursor ( ) : mixed Get the end cursor from the last response
getHttpClient ( ) : GuzzleHttp\ClientInterface Get the current HTTP Client in use
gql ( string $str_gql, null | array $arr_params = null ) : mixed Fetch some Entities, based on the supplied GQL and, optionally, parameters
setHttpClient ( GuzzleHttp\ClientInterface $obj_client ) Use a pre-configured HTTP Client

보호된 메소드들

메소드 설명
configureObjectValueParamForQuery ( object $obj_val, object $mix_value ) Configure a Value parameter, based on the supplied object-type value
createMapper ( ) : RESTv1 Create a mapper that's right for this Gateway
extractAutoIDs ( ) : array Extract Auto Insert IDs from the last response
fetchByKeyPart ( array $arr_key_parts, $str_setter ) : mixed Fetch 1-many Entities, using the Key parts provided
httpClient ( ) : GuzzleHttp\ClientInterface Lazily initialise the HTTP Client when needed. Once.
initHttpClient ( ) : GuzzleHttp\ClientInterface Configure HTTP Client
upsert ( array $arr_entities ) : Entity[] Put an array of Entities into the Datastore. Return any that need AutoIDs

비공개 메소드들

메소드 설명
actionUrl ( $str_action ) : string Build a URL for a Datastore action
addParamsToQuery ( stdClass $obj_query, array $arr_params ) Add Parameters to a GQL Query object
applyPartition ( stdClass $obj_request ) : stdClass Apply project and namespace to a query
applyTransaction ( stdClass $obj_request ) : mixed If we are in a transaction, apply it to the request object
buildCommitRequest ( ) : object Build a basic commit request (used by upsert, delete)
buildQueryParamValue ( $mix_value ) : stdClass Build a JSON representation of a value
executePostRequest ( $str_action, null $obj_request_body = null ) Execute a POST request against the API

메소드 상세

__construct() 공개 메소드

Create the auth middleware and set up the HTTP Client
public __construct ( $str_project_id, null $str_namespace = null )
$str_project_id
$str_namespace null

beginTransaction() 공개 메소드

POST /v1/projects/{projectId}:beginTransaction
public beginTransaction ( boolean $bol_cross_group = FALSE ) : null
$bol_cross_group boolean
리턴 null

configureObjectValueParamForQuery() 보호된 메소드

Configure a Value parameter, based on the supplied object-type value
protected configureObjectValueParamForQuery ( object $obj_val, object $mix_value )
$obj_val object
$mix_value object

createMapper() 보호된 메소드

Create a mapper that's right for this Gateway
protected createMapper ( ) : RESTv1
리턴 GDS\Mapper\RESTv1

deleteMulti() 공개 메소드

Delete 1-many entities
public deleteMulti ( array $arr_entities ) : mixed
$arr_entities array
리턴 mixed

extractAutoIDs() 보호된 메소드

https://cloud.google.com/datastore/reference/rest/v1/projects/commit#MutationResult
protected extractAutoIDs ( ) : array
리턴 array

fetchByKeyPart() 보호된 메소드

Consumes Schema
protected fetchByKeyPart ( array $arr_key_parts, $str_setter ) : mixed
$arr_key_parts array
$str_setter
리턴 mixed

getEndCursor() 공개 메소드

Get the end cursor from the last response
public getEndCursor ( ) : mixed
리턴 mixed

getHttpClient() 공개 메소드

Get the current HTTP Client in use
public getHttpClient ( ) : GuzzleHttp\ClientInterface
리턴 GuzzleHttp\ClientInterface

gql() 공개 메소드

POST /v1/projects/{projectId}:runQuery
public gql ( string $str_gql, null | array $arr_params = null ) : mixed
$str_gql string
$arr_params null | array
리턴 mixed

httpClient() 보호된 메소드

Lazily initialise the HTTP Client when needed. Once.
protected httpClient ( ) : GuzzleHttp\ClientInterface
리턴 GuzzleHttp\ClientInterface

initHttpClient() 보호된 메소드

Configure HTTP Client
protected initHttpClient ( ) : GuzzleHttp\ClientInterface
리턴 GuzzleHttp\ClientInterface

setHttpClient() 공개 메소드

Use a pre-configured HTTP Client
public setHttpClient ( GuzzleHttp\ClientInterface $obj_client )
$obj_client GuzzleHttp\ClientInterface

upsert() 보호된 메소드

Put an array of Entities into the Datastore. Return any that need AutoIDs
protected upsert ( array $arr_entities ) : Entity[]
$arr_entities array
리턴 GDS\Entity[]