API Documentation

Zend/Service/WindowsAzure/Storage/Table.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service_WindowsAzure  
Subpackage
Storage  
Version
$Id: Table.php 24594 2012-01-05 21:27:01Z matthew $  

\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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

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
Name Type Description
$host string

Storage host name

$accountName string

Account name for Windows Azure

$accountKey string

Account key for Windows Azure

$usePathStyleUri boolean

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
Name Type Description
$httpVerb string

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

$tableName string

Table name

$entity \Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtag boolean

Verify etag of the entity (used for concurrency)

Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodprotected_fillTemplate( string $templateText, array $variables = array() ) : string

Fill text template with variables from key/value array

Parameters
Name Type Description
$templateText string

Template text

$variables array

Array containing key/value pairs

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

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

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

Get error message from Zend_Http_Response

Parameters
Name Type Description
$response \Zend_Http_Response

Repsonse

$alternativeError string

Alternative error message

Returns
Type Description
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
Name Type Description
$path string

Path

$queryString string

Query string

$httpVerb string

HTTP verb the request will use

$headers array

x-ms headers to add

$forTableStorage boolean

Is the request for table storage?

$rawData mixed

Optional RAW HTTP data to be sent over the wire

$resourceType string

Resource type

$requiredPermission string

Required permission

Returns
Type Description
\Zend_Http_Response
methodprotected_rfcDate( ) : string

Generate RFC 1123 compliant date string

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

Create table

Parameters
Name Type Description
$tableName string

Table name

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_TableInstance
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicdeleteEntity( string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null, boolean $verifyEtag = false ) : void

Delete entity from table

Parameters
Name Type Description
$tableName string

Table name

$entity \Zend_Service_WindowsAzure_Storage_TableEntity

Entity to delete

$verifyEtag boolean

Verify etag of the entity (used for concurrency)

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

Delete table

Parameters
Name Type Description
$tableName string

Table name

Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicinsertEntity( string $tableName = '', \Zend_Service_WindowsAzure_Storage_TableEntity $entity = null ) : \Zend_Service_WindowsAzure_Storage_TableEntity

Insert entity into table

Parameters
Name Type Description
$tableName string

Table name

$entity \Zend_Service_WindowsAzure_Storage_TableEntity

Entity to insert

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_TableEntity
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpubliclistTables( string $nextTableName = '' ) : array

List tables

Parameters
Name Type Description
$nextTableName string

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

Returns
Type Description
array
Throws
Exception Description
\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
Name Type Description
$tableName string

Table name

$entity \Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtag boolean

Verify etag of the entity (used for concurrency)

$properties array

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

Throws
Exception Description
\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
Name Type Description
$tableName
$filter string

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

$entityClass string

Entity class name

$nextPartitionKey string

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

$nextRowKey string

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

Returns
Type Description
array Array of Zend_Service_WindowsAzure_Storage_TableEntity
Throws
Exception Description
\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
Name Type Description
$tableName string

Table name

$partitionKey string

Partition key

$rowKey string

Row key

$entityClass string

Entity class name*

Returns
Type Description
\Zend_Service_WindowsAzure_Storage_TableEntity
Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
methodpublicselect( ) : \Zend_Service_WindowsAzure_Storage_TableEntityQuery

Create a new Zend_Service_WindowsAzure_Storage_TableEntityQuery

methodpublictableExists( string $tableName = '' ) : boolean

Check if a table exists

Parameters
Name Type Description
$tableName string

Table name

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

Update entity by replacing it

Parameters
Name Type Description
$tableName string

Table name

$entity \Zend_Service_WindowsAzure_Storage_TableEntity

Entity to update

$verifyEtag boolean

Verify etag of the entity (used for concurrency)

Throws
Exception Description
\Zend_Service_WindowsAzure_Exception
Documentation was generated by DocBlox 0.15.1.