Skip to content

Commit

Permalink
Merge branch 'feature/cloud' of https://github.com/ezimuel/zf2 into f…
Browse files Browse the repository at this point in the history
…eature/cloud-migration
  • Loading branch information
weierophinney committed Jan 12, 2012
2 parents ab9051f + 6256069 commit 9bd4f0a
Show file tree
Hide file tree
Showing 73 changed files with 3,772 additions and 716 deletions.
16 changes: 5 additions & 11 deletions library/Zend/Cloud/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@
* @namespace
*/
namespace Zend\Cloud;
use Zend\Config;

/**
* Abstract factory for Zend_Cloud resources
* Abstract factory for Zend\Cloud resources
*
* @category Zend
* @package Zend\Cloud
Expand All @@ -48,12 +47,12 @@ private function __construct()
* Get an individual adapter instance
*
* @param string $adapterOption
* @param array|Zend_Config $options
* @return null|Zend_Cloud_DocumentService_Adapter|Zend_Cloud_QueueService_Adapter|Zend_Cloud_StorageService_Adapter
* @param array|Zend\Config $options
* @return null|DocumentService\Adapter|QueueService\Adapter|StorageService\Adapter|Infrastructure\Adapter
*/
protected static function _getAdapter($adapterOption, $options)
{
if ($options instanceof Config) {
if ($options instanceof \Zend\Config\Config) {
$options = $options->toArray();
}

Expand All @@ -63,12 +62,7 @@ protected static function _getAdapter($adapterOption, $options)

$classname = $options[$adapterOption];
unset($options[$adapterOption]);
/*
if (!class_exists($classname)) {
require_once 'Zend/Loader.php';
Zend_Loader::loadClass($classname);
}
*/

return new $classname($options);
}
}
18 changes: 9 additions & 9 deletions library/Zend/Cloud/DocumentService/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* to [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Cloud
* @package Zend\Cloud
* @subpackage DocumentService
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
Expand Down Expand Up @@ -75,15 +75,15 @@ public function listCollections($options = null);
*
* @param string $collectionName
* @param null|array $options
* @return Zend_Cloud_DocumentService_DocumentSet
* @return Zend\Cloud\DocumentService\DocumentSet
*/
public function listDocuments($collectionName, array $options = null);

/**
* Insert document
*
* @param string $collectionName Collection name
* @param Zend_Cloud_DocumentService_Document $document Document to insert
* @param Zend\Cloud\DocumentService\Document $document Document to insert
* @param array $options
* @return boolean
*/
Expand All @@ -94,7 +94,7 @@ public function insertDocument($collectionName, $document, $options = null);
* The new document replaces the existing document with the same ID.
*
* @param string $collectionName Collection name
* @param Zend_Cloud_DocumentService_Document $document
* @param Zend\Cloud\DocumentService\Document $document
* @param array $options
*/
public function replaceDocument($collectionName, $document, $options = null);
Expand All @@ -105,9 +105,9 @@ public function replaceDocument($collectionName, $document, $options = null);
* Fields not specified in the set will be left as-is.
*
* @param string $collectionName
* @param mixed|Zend_Cloud_DocumentService_Document $documentID Document ID, adapter-dependent, or document containing updates
* @param array|Zend_Cloud_DocumentService_Document $fieldset Set of fields to update
* @param array $options
* @param mixed|Zend\Cloud\DocumentService\Document $documentID Document ID, adapter-dependent, or document containing updates
* @param array|Zend\Cloud\DocumentService\Document $fieldset Set of fields to update
* @param array $options
* @return boolean
*/
public function updateDocument($collectionName, $documentID, $fieldset = null, $options = null);
Expand All @@ -130,7 +130,7 @@ public function deleteDocument($collectionName, $documentID, $options = null);
* @param string $collectionName Collection name
* @param mixed $documentID Document ID, adapter-dependent
* @param array $options
* @return Zend_Cloud_DocumentService_Document
* @return Zend\Cloud\DocumentService\Document
*/
public function fetchDocument($collectionName, $documentID, $options = null);

Expand All @@ -149,7 +149,7 @@ public function query($collectionName, $query, $options = null);
* Create query statement
*
* @param string $fields
* @return Zend_Cloud_DocumentService_Query
* @return Zend\Cloud\DocumentService\Query
*/
public function select($fields = null);

Expand Down
29 changes: 12 additions & 17 deletions library/Zend/Cloud/DocumentService/Adapter/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* to [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Cloud
* @subpackage DocumentService
* @package Zend\Cloud\DocumentService
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
Expand All @@ -22,14 +22,10 @@
*/
namespace Zend\Cloud\DocumentService\Adapter;

use Zend\Cloud\DocumentService\Adapter;

/*
require_once 'Zend/Cloud/DocumentService/Adapter.php';
require_once 'Zend/Cloud/DocumentService/Document.php';
require_once 'Zend/Cloud/DocumentService/DocumentSet.php';
require_once 'Zend/Cloud/DocumentService/Query.php';
*/
use Zend\Cloud\DocumentService\Adapter,
Zend\Cloud\DocumentService\Document,
Zend\Cloud\DocumentService\DocumentSet,
Zend\Cloud\DocumentService\Query;

/**
* Abstract document service adapter
Expand All @@ -40,13 +36,12 @@
* - query class objects
*
* @category Zend
* @package Zend_Cloud
* @subpackage DocumentService
* @package Zend\Cloud\DocumentService
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class AbstractAdapter
implements Adapter
abstract class AbstractAdapter implements Adapter
{
const DOCUMENT_CLASS = 'document_class';
const DOCUMENTSET_CLASS = 'documentset_class';
Expand Down Expand Up @@ -75,7 +70,7 @@ abstract class AbstractAdapter
* Set the class for document objects
*
* @param string $class
* @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter
* @return Zend\Cloud\DocumentService\Adapter\AbstractAdapter
*/
public function setDocumentClass($class)
{
Expand All @@ -97,7 +92,7 @@ public function getDocumentClass()
* Set the class for document set objects
*
* @param string $class
* @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter
* @return Zend\Cloud\DocumentService\Adapter\AbstractAdapter
*/
public function setDocumentSetClass($class)
{
Expand All @@ -119,7 +114,7 @@ public function getDocumentSetClass()
* Set the query class for query objects
*
* @param string $class
* @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter
* @return Zend\Cloud\DocumentService\Adapter\AbstractAdapter
*/
public function setQueryClass($class)
{
Expand Down
18 changes: 18 additions & 0 deletions library/Zend/Cloud/DocumentService/Adapter/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
/**
* Exception
*
* @category Zend
* @package Zend\Cloud\DocumentService
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Cloud\DocumentService\Adapter;

interface Exception
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
/**
* 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 [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend\Cloud\DocumentService\Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* namespace
*/
namespace Zend\Cloud\DocumentService\Adapter\Exception;

class InvalidArgumentException
extends \InvalidArgumentException
implements \Zend\Cloud\DocumentService\Adapter\Exception
{

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* 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 [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend\Cloud\DocumentService\Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* namespace
*/
namespace Zend\Cloud\DocumentService\Adapter\Exception;

/**
* @category Zend
* @package Zend\Cloud\DocumentService\Adapter
* @subpackage Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class OperationNotAvailableException
extends \Exception
implements \Zend\Cloud\DocumentService\Adapter\Exception
{}

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* 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 [email protected] so we can send you a copy immediately.
*
* @category Zend
* @package Zend\Cloud\DocumentService
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Cloud\DocumentService\Adapter\Exception;

use Zend\Cloud\DocumentService\Adapter\Exception;

/**
* @package Zend\Cloud\DocumentService\Adapter
* @subpackage Exception
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException extends \RuntimeException implements Exception
{
}
Loading

0 comments on commit 9bd4f0a

Please sign in to comment.