Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Introduce Support for the WindowsAzure PHP SDK, deprecate the old Win…

…dowsAzureTable support.
  • Loading branch information...
commit a21f94d723e9744bdbeedf42ad601341f5d80429 1 parent 948f402
@beberlei beberlei authored
View
13 composer.json
@@ -3,12 +3,19 @@
"require": {
"doctrine/common": "*"
},
+ "require-dev": {
+ "riak/riak-client": "dev-master",
+ "microsoft/windowsazure": "dev-master"
+ },
+ "repositories": [
+ {
+ "type": "pear",
+ "url": "http://pear.php.net"
+ }
+ ],
"suggest": {
"riak/riak-client": "to use the Riak storage"
},
- "require-dev": {
- "riak/riak-client": "dev-master"
- },
"description": "Simple Key-Value Store Abstraction Layer that maps to PHP objects, allowing for many backends.",
"license": "MIT",
"autoload": {
View
746 composer.lock
@@ -1,18 +1,752 @@
{
- "hash": "a5d60fb3fe6f38269e7733d90fa16eb4",
+ "hash": "bf53cb71537abb0dbed5002bbc4411f1",
"packages": [
{
- "package": "doctrine/common",
+ "name": "doctrine/annotations",
+ "version": "v1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/annotations.git",
+ "reference": "v1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/annotations/archive/v1.0.zip",
+ "reference": "v1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/lexer": "1.*"
+ },
+ "require-dev": {
+ "doctrine/cache": "1.*"
+ },
+ "time": "2013-01-12 19:23:32",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Annotations\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Docblock Annotations Parser",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "annotations",
+ "parser",
+ "docblock"
+ ]
+ },
+ {
+ "name": "doctrine/cache",
+ "version": "v1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/cache.git",
+ "reference": "v1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/cache/archive/v1.0.zip",
+ "reference": "v1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2013-01-10 22:43:46",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Cache\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Caching library offering an object-oriented API for many cache backends",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "cache",
+ "caching"
+ ]
+ },
+ {
+ "name": "doctrine/collections",
+ "version": "v1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/collections.git",
+ "reference": "v1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/collections/archive/v1.0.zip",
+ "reference": "v1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2013-01-12 16:36:50",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Collections\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Collections Abstraction library",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "collections",
+ "iterator",
+ "array"
+ ]
+ },
+ {
+ "name": "doctrine/common",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/common",
+ "reference": "f0b548aa55bb7dac36d79061270a085dd38635b4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/common/archive/a5482b347530bb8522e355b399e5ff4983433a40.zip",
+ "reference": "a5482b347530bb8522e355b399e5ff4983433a40",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/inflector": "1.*",
+ "doctrine/cache": "1.*",
+ "doctrine/collections": "1.*",
+ "doctrine/lexer": "1.*",
+ "doctrine/annotations": "1.*"
+ },
+ "time": "2012-06-18 14:14:07",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Common Library for Doctrine projects",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "collections",
+ "spl",
+ "eventmanager",
+ "annotations",
+ "persistence"
+ ]
+ },
+ {
+ "name": "doctrine/inflector",
+ "version": "v1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/inflector.git",
+ "reference": "v1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/inflector/archive/v1.0.zip",
+ "reference": "v1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2013-01-10 21:49:15",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Inflector\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Common String Manipulations with regard to casing and singular/plural rules.",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "string",
+ "inflection",
+ "singuarlize",
+ "pluarlize"
+ ]
+ },
+ {
+ "name": "doctrine/lexer",
+ "version": "v1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "v1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/lexer/archive/v1.0.zip",
+ "reference": "v1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2013-01-12 18:59:04",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common\\Lexer\\": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": "http://www.instaclick.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh",
+ "role": "Developer of wrapped JMSSerializerBundle"
+ }
+ ],
+ "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "parser",
+ "lexer"
+ ]
+ }
+ ],
+ "packages-dev": [
+ {
+ "name": "microsoft/windowsazure",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/WindowsAzure/azure-sdk-for-php",
+ "reference": "d8daa05ad1852e0c70a85d15a6db88f7e3b23405"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/WindowsAzure/azure-sdk-for-php/archive/d8daa05ad1852e0c70a85d15a6db88f7e3b23405.zip",
+ "reference": "d8daa05ad1852e0c70a85d15a6db88f7e3b23405",
+ "shasum": ""
+ },
+ "require": {
+ "pear-pear/http_request2": "*",
+ "pear-pear/mail_mime": "*",
+ "pear-pear/mail_mimedecode": "*"
+ },
+ "time": "2012-12-17 23:41:42",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "WindowsAzure\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Azure PHP SDK",
+ "email": "azurephpsdk@microsoft.com"
+ }
+ ],
+ "description": "This project provides a set of PHP client libraries that make it easy to access Windows Azure tables, blobs, queues, service runtime and service management APIs.",
+ "keywords": [
+ "php",
+ "sdk",
+ "azure"
+ ]
+ },
+ {
+ "name": "pear-pear.php.net/Archive_Tar",
+ "version": "1.3.10",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Archive_Tar-1.3.10.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.3.0.0"
+ },
+ "replace": {
+ "pear-pear/archive_tar": "== 1.3.10.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded."
+ },
+ {
+ "name": "pear-pear.php.net/Console_Getopt",
+ "version": "1.3.1",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Console_Getopt-1.3.1.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.3.0.0"
+ },
+ "replace": {
+ "pear-pear/console_getopt": "== 1.3.1.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "This is a PHP implementation of "getopt" supporting both\nshort and long options."
+ },
+ {
+ "name": "pear-pear.php.net/HTTP_Request2",
+ "version": "2.1.1",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/HTTP_Request2-2.1.1.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=5.2.0.0",
+ "pear-pear.php.net/net_url2": ">=2.0.0.0",
+ "pear-pear.php.net/pear": ">=1.9.2.0"
+ },
+ "replace": {
+ "pear-pear/http_request2": "== 2.1.1.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "PHP5 rewrite of HTTP_Request package (with parts of HTTP_Client). Provides\ncleaner API and pluggable Adapters:\n * Socket adapter, based on old HTTP_Request code,\n * Curl adapter, wraps around PHP's cURL extension,\n * Mock adapter, to use for testing packages dependent on HTTP_Request2.\nSupports POST requests with data and file uploads, basic and digest\nauthentication, cookies, managing cookies across requests, proxies, gzip and\ndeflate encodings, redirects, monitoring the request progress with Observers..."
+ },
+ {
+ "name": "pear-pear.php.net/Mail_Mime",
+ "version": "1.8.7",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Mail_Mime-1.8.7.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.3.0.0"
+ },
+ "replace": {
+ "pear-pear/mail_mime": "== 1.8.7.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "Mail_Mime provides classes to deal with the creation and manipulation of MIME messages.\nIt allows people to create e-mail messages consisting of:\n* Text Parts\n* HTML Parts\n* Inline HTML Images\n* Attachments\n* Attached messages\n\nIt supports big messages, base64 and quoted-printable encodings and\nnon-ASCII characters in filenames, subjects, recipients, etc. encoded\nusing RFC2047 and/or RFC2231."
+ },
+ {
+ "name": "pear-pear.php.net/Mail_mimeDecode",
+ "version": "1.5.5",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Mail_mimeDecode-1.5.5.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.3.0.0",
+ "pear-pear.php.net/mail_mime": ">1.4.0.0"
+ },
+ "replace": {
+ "pear-pear/mail_mimedecode": "== 1.5.5.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "Provides a class to deal with the decoding and interpreting of mime messages.\n This package used to be part of the Mail_Mime package, but has been split off."
+ },
+ {
+ "name": "pear-pear.php.net/Net_URL2",
+ "version": "2.0.0",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Net_URL2-2.0.0.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=5.0.0.0"
+ },
+ "replace": {
+ "pear-pear/net_url2": "== 2.0.0.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "Provides parsing of URLs into their constituent parts (scheme, host, path etc.), URL generation, and resolving of relative URLs."
+ },
+ {
+ "name": "pear-pear.php.net/PEAR",
+ "version": "1.9.4",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/PEAR-1.9.4.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.4.0.0,!=5.0.0.0,!=5.1.0.0,!=5.1.1.0,!=5.1.2.0,!=5.1.3.0,!=5.1.4.0,!=5.1.5.0",
+ "pear-pear.php.net/archive_tar": ">=1.3.7.0",
+ "pear-pear.php.net/structures_graph": ">=1.0.2.0",
+ "pear-pear.php.net/console_getopt": ">=1.2.0.0",
+ "pear-pear.php.net/xml_util": ">=1.2.0.0",
+ "ext-xml": "*",
+ "ext-pcre": "*"
+ },
+ "conflict": {
+ "pear-pear.php.net/pear_frontend_web": "<=0.4.0.0",
+ "pear-pear.php.net/pear_frontend_gtk": "<0.4.0.0"
+ },
+ "replace": {
+ "pear-pear/pear": "== 1.9.4.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks"
+ },
+ {
+ "name": "pear-pear.php.net/Structures_Graph",
+ "version": "1.0.4",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/Structures_Graph-1.0.4.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.2.0.0"
+ },
+ "replace": {
+ "pear-pear/structures_graph": "== 1.0.4.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology."
+ },
+ {
+ "name": "pear-pear.php.net/XML_Util",
+ "version": "1.2.1",
+ "dist": {
+ "type": "file",
+ "url": "http://pear.php.net/get/XML_Util-1.2.1.tgz",
+ "reference": null,
+ "shasum": null
+ },
+ "require": {
+ "php": ">=4.3.0.0",
+ "ext-pcre": "*"
+ },
+ "replace": {
+ "pear-pear/xml_util": "== 1.2.1.0"
+ },
+ "type": "pear-library",
+ "autoload": {
+ "classmap": [
+ ""
+ ]
+ },
+ "include-path": [
+ "/"
+ ],
+ "description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more."
+ },
+ {
+ "name": "riak/riak-client",
"version": "dev-master",
- "source-reference": "f0b548aa55bb7dac36d79061270a085dd38635b4"
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nacmartin/riak-client",
+ "reference": "cea446f04d759caaef44020a2064a38b41cbdfab"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/nacmartin/riak-client/archive/cea446f04d759caaef44020a2064a38b41cbdfab.zip",
+ "reference": "cea446f04d759caaef44020a2064a38b41cbdfab",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "time": "2012-04-29 11:47:45",
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Riak": "lib/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache 2.0"
+ ],
+ "authors": [
+ {
+ "name": "Nacho Martín",
+ "email": "nitram.ohcan@gmail.com"
+ },
+ {
+ "name": "Kevin Burns"
+ },
+ {
+ "name": "Jeffrey Massung"
+ },
+ {
+ "name": "Mark Phillips"
+ },
+ {
+ "name": "Bryank Fink"
+ },
+ {
+ "name": "Abel Perez"
+ },
+ {
+ "name": "Scoyy Lystig Fritchie"
+ },
+ {
+ "name": "Jon Meredith"
+ },
+ {
+ "name": "dreverri"
+ },
+ {
+ "name": "fakepop"
+ }
+ ],
+ "description": "Riak client",
+ "homepage": "http://wiki.basho.com/Riak.html",
+ "keywords": [
+ "persistence",
+ "riak"
+ ]
}
],
- "packages-dev": null,
"aliases": [
],
- "minimum-stability": "dev",
+ "minimum-stability": "stable",
"stability-flags": {
- "riak/riak-client": 20
+ "riak/riak-client": 20,
+ "microsoft/windowsazure": 20
}
}
View
243 lib/Doctrine/KeyValueStore/Storage/AzureSdkTableStorage.php
@@ -0,0 +1,243 @@
+<?php
+/*
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the MIT license. For more information, see
+ * <http://www.doctrine-project.org>.
+ */
+
+namespace Doctrine\KeyValueStore\Storage;
+
+use WindowsAzure\Table\TableRestProxy;
+use WindowsAzure\Table\Models\Entity;
+use WindowsAzure\Table\Models\EdmType;
+use WindowsAzure\Common\ServiceException;
+
+use Doctrine\KeyValueStore\NotFoundException;
+use Doctrine\KeyValueStore\Query\RangeQuery;
+use Doctrine\KeyValueStore\Query\RangeQueryStorage;
+
+/**
+ * Storage implementation for Microsoft Windows Azure Table using the PHP SDK.
+ *
+ * @author Benjamin Eberlei <kontakt@beberlei.de>
+ */
+class AzureSdkTableStorage implements Storage, RangeQueryStorage
+{
+ /**
+ * @var \WindowsAzure\Table\TableRestProxy
+ */
+ private $client;
+
+ public function __construct(TableRestProxy $client)
+ {
+ $this->client = $client;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function supportsPartialUpdates()
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function supportsCompositePrimaryKeys()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function requiresCompositePrimaryKeys()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function insert($storageName, $key, array $data)
+ {
+ $entity = $this->createEntity($key, $data);
+
+ try {
+ $this->client->insertEntity($storageName, $entity);
+ } catch(ServiceException $e){
+ throw new StorageException(
+ "Could not save entity in table, WindowsAzure SDK client reported error: " . $e->getMessage(),
+ $e->getCode(), $e
+ );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function update($storageName, $key, array $data)
+ {
+ $entity = $this->createEntity($key, $data);
+
+ try {
+ $this->client->updateEntity($storageName, $entity);
+ } catch(ServiceException $e){
+ throw new StorageException(
+ "Could not update entity in table, WindowsAzure SDK client reported error: " . $e->getMessage(),
+ $e->getCode(), $e
+ );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function delete($storageName, $key)
+ {
+ list ($partitonKey, $rowKey) = array($key['dist'], $key['range']);;
+
+ try {
+ $this->client->deleteEntity($storageName, $partitonKey, $rowKey);
+ } catch(ServiceException $e) {
+ throw new StorageException(
+ "Could not delete entity in table, WindowsAzure SDK client reported error: " . $e->getMessage(),
+ $e->getCode(), $e
+ );
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function find($storageName, $key)
+ {
+ list ($partitonKey, $rowKey) = array($key['dist'], $key['range']);;
+
+ try {
+ $result = $this->client->getEntity($storageName, $partitonKey, $rowKey);
+ } catch(ServiceException $e) {
+ if ($e->getCode() === 404) {
+ throw new NotFoundException();
+ } else {
+ throw new StorageException(
+ "Could not find entity in table, WindowsAzure SDK client reported error: " . $e->getMessage(),
+ $e->getCode(), $e
+ );
+ }
+ }
+
+ return $this->getProperties($result->getEntity());
+ }
+
+ private function getProperties(Entity $entity)
+ {
+ $properties = array();
+
+ foreach ($entity->getProperties() as $name => $property) {
+ if ($name === 'PartitionKey') {
+ $name = 'dist';
+ } else if ($name === 'RowKey') {
+ $name = 'range';
+ }
+
+ $properties[$name] = $property->getValue();
+ }
+
+ return $properties;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getName()
+ {
+ return 'azure_table_sdk';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function executeRangeQuery(RangeQuery $query, $storageName, $key, \Closure $hydrateRow = null)
+ {
+ $filters = array("PartitionKey eq " . $this->quoteFilterValue($query->getPartitionKey()));
+
+ foreach ($query->getConditions() as $condition) {
+ if ( ! in_array($condition[0], array('eq', 'neq', 'le', 'lt', 'ge', 'gt'))) {
+ throw new \InvalidArgumentException("Windows Azure Table only supports eq, neq, le, lt, ge, gt as conditions.");
+ }
+ $filters[] = "RowKey " . $condition[0] . " " . $this->quoteFilterValue($condition[1]);
+ }
+
+ $filter = '(' . implode(" and ", $filters) . ')';
+ $result = $this->client->queryEntities($storageName, $filter);
+
+ $rows = array();
+
+ foreach ($result->getEntities() as $entity) {
+ $row = $this->getProperties($entity);
+ $rows[] = $hydrateRow ? $hydrateRow($row) : $row;
+ }
+
+ return $rows;
+ }
+
+ private function quoteFilterValue($value)
+ {
+ return "'" . str_replace("'", "", $value) . "'";
+ }
+
+ /**
+ * Create entity object with key and data values.
+ *
+ * @param array $key
+ * @param array $data
+ * @return \WindowsAzure\Table\Model\Entity
+ */
+ private function createEntity(array $key, array $data)
+ {
+ list ($partitonKey, $rowKey) = array($key['dist'], $key['range']);;
+
+ $entity = new Entity();
+ $entity->setPartitionKey((string)$partitonKey);
+ $entity->setRowKey((string)$rowKey);
+
+ foreach ($data as $variable => $value) {
+ $type = $this->getPropertyType($value);
+ $entity->addProperty($variable, $type, $value);
+ }
+
+ return $entity;
+ }
+
+ /**
+ * Infer the property type of variables.
+ */
+ private function getPropertyType($propertyValue)
+ {
+ if ($propertyValue instanceof \DateTime) {
+ return EdmType::DATETIME;
+ } else if (is_float($propertyValue)) {
+ return EdmType::DOUBLE;
+ } else if (is_int($propertyValue)) {
+ return EdmType::INT32;
+ } else if (is_bool($propertyValue)) {
+ return EdmType::BOOLEAN;
+ }
+
+ return EdmType::STRING;
+ }
+}
View
6 lib/Doctrine/KeyValueStore/Storage/WindowsAzureTableStorage.php
@@ -32,6 +32,7 @@
* Using a HTTP client to communicate with the REST API of Azure Table.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
+ * @deprecated Use the AzureSdkTableStorage instead, this will be unmaintained.
*/
class WindowsAzureTableStorage implements Storage, RangeQueryStorage
{
@@ -164,10 +165,11 @@ private function convertResponseToException($response)
$dom = new \DomDocument('1.0', 'UTF-8');
$dom->loadXML($response->getBody());
+ $node = $dom->getElementsByTagName('Message')->item(0);
+
throw new HttpStorageException(
- $dom->getElementsByTagName('Message')->item(0)->nodeValue
+ $node ? $node->nodeValue : "An error has occured"
);
-
}
public function createTable($tableName)
View
93 tests/Doctrine/Tests/KeyValueStore/Functional/Storage/AzureSdkTableTest.php
@@ -0,0 +1,93 @@
+<?php
+namespace Doctrine\Tests\KeyValueStore\Functional\Storage;
+
+use Doctrine\Tests\KeyValueStoreTestCase;
+
+use Doctrine\KeyValueStore\Storage\AzureSdkTableStorage;
+use Doctrine\KeyValueStore\Query\RangeQuery;
+
+use WindowsAzure\Common\ServicesBuilder;
+
+class AzureSdkTableTest extends KeyValueStoreTestCase
+{
+ private $storage;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ if (empty($GLOBALS['DOCTRINE_KEYVALUE_AZURE_NAME']) || empty($GLOBALS['DOCTRINE_KEYVALUE_AZURE_KEY'])) {
+ $this->markTestSkipped("Missing Azure credentials.");
+ }
+
+ $connectionString = sprintf(
+ "DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s",
+ $GLOBALS['DOCTRINE_KEYVALUE_AZURE_NAME'],
+ $GLOBALS['DOCTRINE_KEYVALUE_AZURE_KEY']
+ );
+ $tableProxy = ServicesBuilder::getInstance()->createTableService($connectionString);
+
+ $this->storage = new AzureSdkTableStorage($tableProxy);
+ }
+
+ public function testCrud()
+ {
+ $storage = $this->storage;
+
+ $key = array("dist" => "sdktest", "range" => time());
+ $storage->insert("test", $key, array("foo" => "bar"));
+ $data = $storage->find("test", $key);
+
+ $this->assertInstanceOf('DateTime', $data['Timestamp']);
+ $this->assertEquals('bar', $data['foo']);
+ $this->assertEquals('sdktest', $data['dist']);
+ $this->assertEquals($key['range'], $data['range']);
+
+ $storage->update("test", $key, array("foo" => "baz", "bar" => "baz"));
+ $data = $storage->find("test", $key);
+
+ $this->assertEquals('baz', $data['foo']);
+ $this->assertEquals('baz', $data['bar']);
+
+ $storage->delete("test", $key);
+
+ $this->setExpectedException("Doctrine\KeyValueStore\NotFoundException");
+ $storage->find("test", $key);
+ }
+
+ public function testTypes()
+ {
+ $storage = $this->storage;
+
+ $data = array(
+ "string" => "foo",
+ "date" => new \DateTime("now"),
+ "int" => 1234,
+ "float" => 123.45,
+ "bool" => false,
+ );
+
+ $key = array("dist" => "sdktest", "range" => time()+1);
+ $storage->insert("test", $key, $data);
+ $data = $storage->find("test", $key);
+
+ $this->assertInstanceOf('DateTime', $data['date']);
+ $this->assertInternalType('string', $data['string']);
+ $this->assertInternalType('int', $data['int']);
+ $this->assertInternalType('float', $data['float']);
+ $this->assertInternalType('bool', $data['bool']);
+ }
+
+ public function testQueryRange()
+ {
+ $rangeQuery = new RangeQuery($this->createManager(), 'test', 'sdktest');
+ $rangeQuery->rangeLessThan(time());
+
+ $data = $this->storage->executeRangeQuery($rangeQuery, 'test', array('dist', 'range'), function($row) {
+ return $row;
+ });
+
+ $this->assertTrue(count($data) > 0);
+ }
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.