Service/WindowsAzure/Storage/Table.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service_WindowsAzure  
Subpackage
Storage  
Version
$Id$  

\Zend_Service_WindowsAzure_Storage_Table

Package: Zend_Service_WindowsAzure\Storage
Parent(s)
\Zend_Service_WindowsAzure_Storage_BatchStorageAbstract < \Zend_Service_WindowsAzure_Storage
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedboolean $_throwExceptionOnMissingData = true
Throw Zend_Service_WindowsAzure_Exception when a property is not specified in Windows Azure? Defaults to true, making behaviour similar to Windows Azure StorageClient in .NET.
Default valuetrueDetails
Type
boolean

Methods

methodpublic__construct(string $host = \Zend_Service_WindowsAzure_Storage::URL_DEV_TABLE, string $accountName = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_ACCOUNT, string $accountKey = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::DEVSTORE_KEY, boolean $usePathStyleUri = false, \Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract $retryPolicy = null) : void

Creates a new Zend_Service_WindowsAzure_Storage_Table instance

Parameters
NameTypeDescription
$hoststring

Storage host name

$accountNamestring

Account name for Windows Azure

$accountKeystring

Account key for Windows Azure

$usePathStyleUriboolean

Use path-style URI's

$retryPolicy\Zend_Service_WindowsAzure_RetryPolicy_RetryPolicyAbstract

Retry policy to use when making requests

methodprotected_changeEntity(string $httpVerb = \Zend_Http_Client::PUT, string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null, boolean $verifyEtag = false) : void

Update entity / merge entity

Parameters
NameTypeDescription
$httpVerbstring

HTTP verb to use (PUT = update, MERGE = merge)

$tableNamestring

Table name

$entity\Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtagboolean

Verify etag of the entity (used for concurrency)

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodprotected_convertToDateTime(string $value = '') : \DateTime | boolean

Converts a string to a DateTime object. Returns false on failure.

Parameters
NameTypeDescription
$valuestring

The string value to parse

Returns
TypeDescription
\DateTime | boolean
methodprotected_convertToEdmDateTime(\DateTime $value) : string

Converts a DateTime object into an Edm.DaeTime value in UTC timezone, represented as a string.

Parameters
NameTypeDescription
$value\DateTime
Returns
TypeDescription
string
methodprotected_fillTemplate(string $templateText, array $variables = array()) : string

Fill text template with variables from key/value array

Parameters
NameTypeDescription
$templateTextstring

Template text

$variablesarray

Array containing key/value pairs

Returns
TypeDescription
string
methodprotected_generateAzureRepresentation(\Zend_Service_WindowsAzure_Storage_TableEntity $entity = null) : string

Generate Azure representation from entity (creates atompub markup from properties)

Parameters
NameTypeDescription
$entity\Zend_Service_WindowsAzure_Storage_TableEntity
Returns
TypeDescription
string
methodprotected_getErrorMessage(\Zend_Http_Response $response, string $alternativeError = 'Unknown error.') : string

Get error message from Zend_Http_Response

Parameters
NameTypeDescription
$response\Zend_Http_Response

Repsonse

$alternativeErrorstring

Alternative error message

Returns
TypeDescription
string
methodprotected_performRequest(string $path = '/', string $queryString = '', string $httpVerb = \Zend_Http_Client::GET, array $headers = array(), boolean $forTableStorage = false, mixed $rawData = null, string $resourceType = \Zend_Service_WindowsAzure_Storage::RESOURCE_UNKNOWN, string $requiredPermission = \Zend_Service_WindowsAzure_Credentials_CredentialsAbstract::PERMISSION_READ) : \Zend_Http_Response

Perform request using Zend_Http_Client channel

Parameters
NameTypeDescription
$pathstring

Path

$queryStringstring

Query string

$httpVerbstring

HTTP verb the request will use

$headersarray

x-ms headers to add

$forTableStorageboolean

Is the request for table storage?

$rawDatamixed

Optional RAW HTTP data to be sent over the wire

$resourceTypestring

Resource type

$requiredPermissionstring

Required permission

Returns
TypeDescription
\Zend_Http_Response
methodprotected_rfcDate() : string

Generate RFC 1123 compliant date string

Returns
TypeDescription
string
methodpubliccreateTable(string $tableName = '') : \Zend_Service_WindowsAzure_Storage_TableInstance

Create table

Parameters
NameTypeDescription
$tableNamestring

Table name

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_TableInstance
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliccreateTableIfNotExists(string $tableName = '') : void

Create table if it does not exist

Parameters
NameTypeDescription
$tableNamestring

Table name

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicdeleteEntity(string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null, boolean $verifyEtag = false) : void

Delete entity from table

Parameters
NameTypeDescription
$tableNamestring

Table name

$entity\Zend_Service_WindowsAzure_Storage_TableEntity

Entity to delete

$verifyEtagboolean

Verify etag of the entity (used for concurrency)

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicdeleteTable(string $tableName = '') : void

Delete table

Parameters
NameTypeDescription
$tableNamestring

Table name

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicgetThrowExceptionOnMissingData() : void

Throw Zend_Service_WindowsAzure_Exception when a property is not specified in Windows Azure?

methodpublicinsertEntity(string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null) : \Zend_Service_WindowsAzure_Storage_TableEntity

Insert entity into table

Parameters
NameTypeDescription
$tableNamestring

Table name

$entity\Zend_Service_WindowsAzure_Storage_TableEntity

Entity to insert

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_TableEntity
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpubliclistTables(string $nextTableName = '') : array

List tables

Parameters
NameTypeDescription
$nextTableNamestring

Next table name, used for listing tables when total amount of tables is > 1000.

Returns
TypeDescription
array
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicmergeEntity(string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null, boolean $verifyEtag = false, array $properties = array()) : void

Update entity by adding or updating properties

Parameters
NameTypeDescription
$tableNamestring

Table name

$entity\Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtagboolean

Verify etag of the entity (used for concurrency)

$propertiesarray

Properties to merge. All properties will be used when omitted.

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicretrieveEntities( $tableName = '', string $filter = '', string $entityClass = 'Zend_Service_WindowsAzure_Storage_DynamicTableEntity', string $nextPartitionKey = null, string $nextRowKey = null) : array

Retrieve entities from table

Parameters
NameTypeDescription
$tableName
$filterstring

Filter condition (not applied when $tableName is a Zend_Service_WindowsAzure_Storage_TableEntityQuery instance)

$entityClassstring

Entity class name

$nextPartitionKeystring

Next partition key, used for listing entities when total amount of entities is > 1000.

$nextRowKeystring

Next row key, used for listing entities when total amount of entities is > 1000.

Returns
TypeDescription
arrayArray of Zend_Service_WindowsAzure_Storage_TableEntity
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicretrieveEntityById(string $tableName, string $partitionKey, string $rowKey, string $entityClass = 'Zend_Service_WindowsAzure_Storage_DynamicTableEntity') : \Zend_Service_WindowsAzure_Storage_TableEntity

Retrieve entity from table, by id

Parameters
NameTypeDescription
$tableNamestring

Table name

$partitionKeystring

Partition key

$rowKeystring

Row key

$entityClassstring

Entity class name*

Returns
TypeDescription
\Zend_Service_WindowsAzure_Storage_TableEntity
Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
methodpublicselect() : \Zend_Service_WindowsAzure_Storage_TableEntityQuery

Create a new Zend_Service_WindowsAzure_Storage_TableEntityQuery

methodpublicsetThrowExceptionOnMissingData(boolean $value = true) : void

Throw Zend_Service_WindowsAzure_Exception when a property is not specified in Windows Azure? Defaults to true, making behaviour similar to Windows Azure StorageClient in .NET.

Parameters
NameTypeDescription
$valueboolean
methodpublictableExists(string $tableName = '') : boolean

Check if a table exists

Parameters
NameTypeDescription
$tableNamestring

Table name

Returns
TypeDescription
boolean
methodpublicupdateEntity(string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null, boolean $verifyEtag = false) : void

Update entity by replacing it

Parameters
NameTypeDescription
$tableNamestring

Table name

$entity\Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtagboolean

Verify etag of the entity (used for concurrency)

Throws
ExceptionDescription
\Zend_Service_WindowsAzure_Exception
Documentation was generated by phpDocumentor 2.2.0 .