azure-storage-table\src\Table\TableRestProxy.php
You may obtain a copy of the License at https://github.com/azure/azure-storage-php/LICENSE
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
PHP version 5
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- 2016 Microsoft Corporation
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
- Package
- MicrosoftAzure\Storage\Table
\MicrosoftAzure\Storage\Table\TableRestProxy
- Implements
- Parent(s)
- \MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy
- Author
- Azure Storage PHP SDK
- Category
- Microsoft
- Copyright
- 2016 Microsoft Corporation
- Inherited_from
- \MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy
- License
- https://github.com/azure/azure-storage-php/LICENSE
- Link
- https://github.com/azure/azure-storage-php
Properties
Methods
__construct(string $primaryUri, string $secondaryUri, \MicrosoftAzure\Storage\Table\Internal\IODataReaderWriter $odataSerializer, \MicrosoftAzure\Storage\Table\Internal\IMimeReaderWriter $mimeSerializer, array $options = array()) : void
Initializes new TableRestProxy object.
Name | Type | Description |
---|---|---|
$primaryUri | string | The storage account primary uri. |
$secondaryUri | string | The storage account secondary uri. |
$odataSerializer | \MicrosoftAzure\Storage\Table\Internal\IODataReaderWriter | The odata serializer. |
$mimeSerializer | \MicrosoftAzure\Storage\Table\Internal\IMimeReaderWriter | The MIME serializer. |
$options | array | Array of options to pass to the service |
__construct(\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer $dataSerializer = null) : void
Initializes new RestProxy object.
Inherited from:Name | Type | Description |
---|---|---|
$dataSerializer | \MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer | The data serializer. |
addMetadataHeaders(array $headers, array $metadata = null) : array
Adds metadata elements to headers array
Inherited from:Name | Type | Description |
---|---|---|
$headers | array | HTTP request headers |
$metadata | array | user specified metadata |
Type | Description |
---|---|
array |
addOptionalHeader(array $headers, string $key, string $value) : void
Adds optional header.
Inherited from:Doesn't add the value if it satisfies empty().
Name | Type | Description |
---|---|---|
$headers | array | &$headers The HTTP header parameters. |
$key | string | The HTTP header name. |
$value | string | The HTTP header value. |
addOptionalQueryParam(array $queryParameters, string $key, string $value) : void
Adds optional query parameter.
Inherited from:Doesn't add the value if it satisfies empty().
Name | Type | Description |
---|---|---|
$queryParameters | array | &$queryParameters The query parameters. |
$key | string | The query variable name. |
$value | string | The query variable value. |
addPostParameter(array $postParameters, string $key, string $value) : array
Adds HTTP POST parameter to the specified
Inherited from:Name | Type | Description |
---|---|---|
$postParameters | array | An array of HTTP POST parameters. |
$key | string | The key of a HTTP POST parameter. |
$value | string | the value of a HTTP POST parameter. |
Type | Description |
---|---|
array |
batch(\MicrosoftAzure\Storage\Table\BatchOperations $batchOperations, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\BatchResult
Does batch of operations on the table service.
Name | Type | Description |
---|---|---|
$batchOperations | \MicrosoftAzure\Storage\Table\BatchOperations | The operations to apply. |
$options | \MicrosoftAzure\Storage\Table\Models\TableServiceOptions | The optional parameters. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\Models\BatchResult |
batchAsync(\MicrosoftAzure\Storage\Table\BatchOperations $batchOperations, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise that does batch of operations on the table service.
Name | Type | Description |
---|---|---|
$batchOperations | \MicrosoftAzure\Storage\Table\BatchOperations | The operations to apply. |
$options | \MicrosoftAzure\Storage\Table\Models\TableServiceOptions | The optional parameters. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
createMiddlewareStack(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions) : \MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStack
Create a middleware stack with given middleware.
Inherited from:Name | Type | Description |
---|---|---|
$serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The options user passed in. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStack |
createRequest(string $method, array $headers, array $queryParams, array $postParameters, string $path, $locationMode, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING) : \GuzzleHttp\Psr7\Request
Create the request to be sent.
Inherited from:Name | Type | Description |
---|---|---|
$method | string | The method of the HTTP request |
$headers | array | The header field of the request |
$queryParams | array | The query parameter of the request |
$postParameters | array | The HTTP POST parameters |
$path | string | URL path |
$locationMode | ||
$body | string | Request body |
Type | Description |
---|---|
\GuzzleHttp\Psr7\Request |
createTable(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceCreateOptions $options = null) : \Psr\Http\Message\ResponseInterface
Creates new table in the storage account
createTableAsync(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceCreateOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to create new table in the storage account
createTableService(string $connectionString, array $options = array()) : \MicrosoftAzure\Storage\Table\TableRestProxy
Builds a table service object, it accepts the following options:
- http: (array) the underlying guzzle options. refer to http://docs.guzzlephp.org/en/latest/request-options.html for detailed available options
- middlewares: (mixed) the middleware should be either an instance of a sub-class that
implements \MicrosoftAzure\Storage\Table\MicrosoftAzure\Storage\Common\Middlewares\IMiddleware, or a
callable
that follows the Guzzle middleware implementation convention
Please refer to https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string for how to construct a connection string with storage account name/key, or with a shared access signature (SAS Token).
Name | Type | Description |
---|---|---|
$connectionString | string | The configuration connection string. |
$options | array | Array of options to pass to the service |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\TableRestProxy |
deleteEntity(string $table, string $partitionKey, string $rowKey, \MicrosoftAzure\Storage\Table\Models\DeleteEntityOptions $options = null) : void
Deletes an existing entity in a table.
deleteEntityAsync(string $table, string $partitionKey, string $rowKey, \MicrosoftAzure\Storage\Table\Models\DeleteEntityOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to delete an existing entity in a table.
deleteTable(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : void
Deletes the specified table and any data it contains.
deleteTableAsync(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to delete the specified table and any data it contains.
generateMetadataHeaders(array $metadata = null) : array
Generates metadata headers by prefixing each element with 'x-ms-meta'.
Inherited from:Name | Type | Description |
---|---|---|
$metadata | array | user defined metadata. |
Type | Description |
---|---|
array |
generateRequestOptions(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions, callable $handler) : array
Generate the request options using the given service options and stored information.
Inherited from:Name | Type | Description |
---|---|---|
$serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The service options used to generate request options. |
$handler | callable | The handler used to send the request. |
Type | Description |
---|---|
array |
getAccountName() : string
Gets the account name.
Inherited from:Type | Description |
---|---|
string |
getEntity(string $table, string $partitionKey, string $rowKey, \MicrosoftAzure\Storage\Table\Models\GetEntityOptions | null $options = null) : \MicrosoftAzure\Storage\Table\Models\GetEntityResult
Gets table entity.
Name | Type | Description |
---|---|---|
$table | string | The name of the table. |
$partitionKey | string | The entity partition key. |
$rowKey | string | The entity row key. |
$options | \MicrosoftAzure\Storage\Table\Models\GetEntityOptions | null | The optional parameters. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\Models\GetEntityResult |
getEntityAsync(string $table, string $partitionKey, string $rowKey, \MicrosoftAzure\Storage\Table\Models\GetEntityOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to get table entity.
getMiddlewares() : array
Gets middlewares that will be handling the request and response.
Inherited from:Type | Description |
---|---|
array |
getPsrPrimaryUri() : \GuzzleHttp\Psr7\Uri
Get the primary URI in PSR form.
Inherited from:Type | Description |
---|---|
\GuzzleHttp\Psr7\Uri |
getPsrSecondaryUri() : \GuzzleHttp\Psr7\Uri
Get the secondary URI in PSR form.
Inherited from:Type | Description |
---|---|
\GuzzleHttp\Psr7\Uri |
getServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServicePropertiesResult
Gets the properties of the service.
Inherited from:getServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to get the properties of the service.
Inherited from:getServiceStats(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServiceStatsResult
Retrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.
Inherited from:Name | Type | Description |
---|---|---|
$options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | null | The options this operation sends with. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Common\Models\GetServiceStatsResult |
getServiceStatsAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise that retrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.
Inherited from:Name | Type | Description |
---|---|---|
$options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | null | The options this operation sends with. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
getTable(string $table, \MicrosoftAzure\Storage\Table\Models\GetTableOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\GetTableResult
Gets the table.
Name | Type | Description |
---|---|---|
$table | string | The name of the table. |
$options | \MicrosoftAzure\Storage\Table\Models\GetTableOptions | The optional parameters. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\Models\GetTableResult |
getTableAcl(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\TableACL
Gets the access control list (ACL)
getTableAclAsync(string $table, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates the promise to gets the access control list (ACL)
getTableAsync(string $table, \MicrosoftAzure\Storage\Table\Models\GetTableOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates the promise to get the table.
Name | Type | Description |
---|---|---|
$table | string | The name of the table. |
$options | \MicrosoftAzure\Storage\Table\Models\GetTableOptions | The optional parameters. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
groupQueryValues(array $values) : string
Groups set of values into one value separated with Resources::SEPARATOR
Inherited from:Name | Type | Description |
---|---|---|
$values | array | array of values to be grouped. |
Type | Description |
---|---|
string |
insertEntity(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceCreateOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\InsertEntityResult
Inserts new entity to the table.
insertEntityAsync(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceCreateOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Inserts new entity to the table.
insertOrMergeEntity(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\UpdateEntityResult
Updates an existing entity or inserts a new entity if it does not exist in the table.
insertOrMergeEntityAsync(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to update an existing entity or inserts a new entity if it does not exist in the table.
insertOrReplaceEntity(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\UpdateEntityResult
Replaces an existing entity or inserts a new entity if it does not exist in the table.
insertOrReplaceEntityAsync(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates a promise to replace an existing entity or inserts a new entity if it does not exist in the table.
mergeEntity(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\UpdateEntityResult
Updates an existing entity by updating the entity's properties. This operation does not replace the existing entity, as the updateEntity operation does.
mergeEntityAsync(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to update an existing entity by updating the entity's properties. This operation does not replace the existing entity, as the updateEntity operation does.
onRejected(string | \Exception $reason, array | integer $expected) : \Psr\Http\Message\ResponseInterface
Name | Type | Description |
---|---|---|
$reason | string | \Exception | Rejection reason. |
$expected | array | integer | Expected Status Codes. |
Type | Description |
---|---|
\Psr\Http\Message\ResponseInterface |
pushMiddleware(callable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware $middleware) : void
Push a new middleware into the middlewares array. The newly added middleware will be the most inner middleware when executed.
Inherited from:Name | Type | Description |
---|---|---|
$middleware | callable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware | the middleware to be added. |
queryEntities(string $table, \MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter $options = null) : \MicrosoftAzure\Storage\Table\Models\QueryEntitiesResult
Quries entities for the given table name
Name | Type | Description |
---|---|---|
$table | string | The name of the table. |
$options | \MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter | Coule be optional parameters, query string or filter to apply. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\Models\QueryEntitiesResult |
queryEntitiesAsync(string $table, \MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter $options = null) : \GuzzleHttp\Promise\PromiseInterface
Quries entities for the given table name
Name | Type | Description |
---|---|---|
$table | string | The name of the table. |
$options | \MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter | Coule be optional parameters, query string or filter to apply. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
queryTables(\MicrosoftAzure\Storage\Table\Models\QueryTablesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter $options = null) : \MicrosoftAzure\Storage\Table\Models\QueryTablesResult
Quries tables in the given storage account.
Name | Type | Description |
---|---|---|
$options | \MicrosoftAzure\Storage\Table\Models\QueryTablesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter | Could be optional parameters, table prefix or filter to apply. |
Type | Description |
---|---|
\MicrosoftAzure\Storage\Table\Models\QueryTablesResult |
queryTablesAsync(\MicrosoftAzure\Storage\Table\Models\QueryTablesOptions | string | \MicrosoftAzure\Storage\Table\Models\Filters\Filter $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to query the tables in the given storage account.
sendAsync(string $method, array $headers, array $queryParams, array $postParameters, string $path, array | integer $expected = \MicrosoftAzure\Storage\Common\Internal\Resources::STATUS_OK, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions = null) : \GuzzleHttp\Promise\PromiseInterface
Create promise of sending HTTP request with the specified parameters.
Inherited from:Name | Type | Description |
---|---|---|
$method | string | HTTP method used in the request |
$headers | array | HTTP headers. |
$queryParams | array | URL query parameters. |
$postParameters | array | The HTTP POST parameters. |
$path | string | URL path |
$expected | array | integer | Expected Status Codes. |
$body | string | Request body |
$serviceOptions | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | Service options |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
sendConcurrentAsync(callable $generator, integer $statusCode, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options) : \GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterface
Send the requests concurrently. Number of concurrency can be modified by inserting a new key/value pair with the key 'number_of_concurrency' into the $requestOptions of $serviceOptions. Return only the promise.
Inherited from:Name | Type | Description |
---|---|---|
$generator | callable | the generator function to generate request upon fulfillment |
$statusCode | integer | The expected status code for each of the request generated by generator. |
$options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The service options for the concurrent requests. |
Type | Description |
---|---|
\GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterface |
sendContext(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Psr7\Response
Sends the context.
Inherited from:Name | Type | Description |
---|---|---|
$context | \MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext | The context of the request. |
Type | Description |
---|---|
\GuzzleHttp\Psr7\Response |
sendContextAsync(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Promise\PromiseInterface
Creates the promise to send the context.
Inherited from:Name | Type | Description |
---|---|---|
$context | \MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext | The context of the request. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
setServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : void
Sets the properties of the service.
Inherited from:It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.
Name | Type | Description |
---|---|---|
$serviceProperties | \MicrosoftAzure\Storage\Common\Models\ServiceProperties | The service properties. |
$options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The optional parameters. |
setServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates the promise to set the properties of the service.
Inherited from:It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.
Name | Type | Description |
---|---|---|
$serviceProperties | \MicrosoftAzure\Storage\Common\Models\ServiceProperties | The service properties. |
$options | \MicrosoftAzure\Storage\Common\Models\ServiceOptions | The optional parameters. |
Type | Description |
---|---|
\GuzzleHttp\Promise\PromiseInterface |
setTableAcl(string $table, \MicrosoftAzure\Storage\Table\Models\TableACL $acl, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : void
Sets the ACL.
setTableAclAsync(string $table, \MicrosoftAzure\Storage\Table\Models\TableACL $acl, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to set the ACL
throwIfError(\Psr\Http\Message\ResponseInterface $response, array | integer $expected) : void
Throws ServiceException if the received status code is not expected.
Inherited from:Name | Type | Description |
---|---|---|
$response | \Psr\Http\Message\ResponseInterface | The response received |
$expected | array | integer | The expected status codes. |
Exception | Description |
---|---|
\MicrosoftAzure\Storage\Common\Exceptions\ServiceException |
updateEntity(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \MicrosoftAzure\Storage\Table\Models\UpdateEntityResult
Updates an existing entity in a table. The Update Entity operation replaces the entire entity and can be used to remove properties.
updateEntityAsync(string $table, \MicrosoftAzure\Storage\Table\Models\Entity $entity, \MicrosoftAzure\Storage\Table\Models\TableServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
Creates promise to update an existing entity in a table. The Update Entity operation replaces the entire entity and can be used to remove properties.