Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Service_AppState_States_Resource Class Reference

The "states" collection of methods. More...

Inheritance diagram for Google_Service_AppState_States_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 clear ($stateKey, $optParams=array())
 Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version.
 
 delete ($stateKey, $optParams=array())
 Deletes a key and the data associated with it.
 
 get ($stateKey, $optParams=array())
 Retrieves the data corresponding to the passed key.
 
 listStates ($optParams=array())
 Lists all the states keys, and optionally the state data.
 
 update ($stateKey, Google_Service_AppState_UpdateRequest $postBody, $optParams=array())
 Update the data associated with the input key if and only if the passed version matches the currently stored version.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "states" collection of methods.

Typical usage is: $appstateService = new Google_Service_AppState(...); $states = $appstateService->states;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ clear()

Google_Service_AppState_States_Resource::clear ( $stateKey,
$optParams = array() )

Clears (sets to empty) the data for the passed key if and only if the passed version matches the currently stored version.

This method results in a conflict error on version mismatch. (states.clear)

Parameters
int$stateKeyThe key for the data to be retrieved.
array$optParamsOptional parameters.

@opt_param string currentDataVersion The version of the data to be cleared. Version strings are returned by the server.

Return values
Google_Service_AppState_WriteResult

◆ delete()

Google_Service_AppState_States_Resource::delete ( $stateKey,
$optParams = array() )

Deletes a key and the data associated with it.

The key is removed and no longer counts against the key quota. Note that since this method is not safe in the face of concurrent modifications, it should only be used for development and testing purposes. Invoking this method in shipping code can result in data loss and data corruption. (states.delete)

Parameters
int$stateKeyThe key for the data to be retrieved.
array$optParamsOptional parameters.

◆ get()

Google_Service_AppState_States_Resource::get ( $stateKey,
$optParams = array() )

Retrieves the data corresponding to the passed key.

If the key does not exist on the server, an HTTP 404 will be returned. (states.get)

Parameters
int$stateKeyThe key for the data to be retrieved.
array$optParamsOptional parameters.
Return values
Google_Service_AppState_GetResponse

◆ listStates()

Google_Service_AppState_States_Resource::listStates ( $optParams = array())

Lists all the states keys, and optionally the state data.

(states.listStates)

Parameters
array$optParamsOptional parameters.

@opt_param bool includeData Whether to include the full data in addition to the version number

Return values
Google_Service_AppState_ListResponse

◆ update()

Google_Service_AppState_States_Resource::update ( $stateKey,
Google_Service_AppState_UpdateRequest $postBody,
$optParams = array() )

Update the data associated with the input key if and only if the passed version matches the currently stored version.

This method is safe in the face of concurrent writes. Maximum per-key size is 128KB. (states.update)

Parameters
int$stateKeyThe key for the data to be retrieved.
Google_UpdateRequest$postBody
array$optParamsOptional parameters.

@opt_param string currentStateVersion The version of the app state your application is attempting to update. If this does not match the current version, this method will return a conflict error. If there is no data stored on the server for this key, the update will succeed irrespective of the value of this parameter.

Return values
Google_Service_AppState_WriteResult

The documentation for this class was generated from the following file: