web/lib/Zend/Cloud/QueueService/Factory.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Cloud
    16  * @package    Zend_Cloud
    17  * @subpackage QueueService
    17  * @subpackage QueueService
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  */
    20  */
    21 
    21 
    22 require_once 'Zend/Cloud/AbstractFactory.php';
    22 require_once 'Zend/Cloud/AbstractFactory.php';
    23 
    23 
    24 /**
    24 /**
    25  * @category   Zend
    25  * @category   Zend
    26  * @package    Zend_Cloud
    26  * @package    Zend_Cloud
    27  * @subpackage QueueService
    27  * @subpackage QueueService
    28  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    28  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    29  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    29  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    30  */
    30  */
    31 class Zend_Cloud_QueueService_Factory extends Zend_Cloud_AbstractFactory
    31 class Zend_Cloud_QueueService_Factory extends Zend_Cloud_AbstractFactory
    32 {
    32 {
    33     const QUEUE_ADAPTER_KEY = 'queue_adapter';
    33     const QUEUE_ADAPTER_KEY = 'queue_adapter';
    37      */
    37      */
    38     protected static $_adapterInterface = 'Zend_Cloud_QueueService_Adapter';
    38     protected static $_adapterInterface = 'Zend_Cloud_QueueService_Adapter';
    39 
    39 
    40     /**
    40     /**
    41      * Constructor
    41      * Constructor
    42      * 
    42      *
    43      * @return void
    43      * @return void
    44      */
    44      */
    45     private function __construct()
    45     private function __construct()
    46     {
    46     {
    47         // private ctor - should not be used
    47         // private ctor - should not be used
    48     }
    48     }
    49     
    49 
    50     /**
    50     /**
    51      * Retrieve QueueService adapter
    51      * Retrieve QueueService adapter
    52      * 
    52      *
    53      * @param  array $options 
    53      * @param  array $options
    54      * @return void
    54      * @return void
    55      */
    55      */
    56     public static function getAdapter($options = array()) 
    56     public static function getAdapter($options = array())
    57     {
    57     {
    58         $adapter = parent::_getAdapter(self::QUEUE_ADAPTER_KEY, $options);
    58         $adapter = parent::_getAdapter(self::QUEUE_ADAPTER_KEY, $options);
    59         if (!$adapter) {
    59         if (!$adapter) {
    60             require_once 'Zend/Cloud/QueueService/Exception.php';
    60             require_once 'Zend/Cloud/QueueService/Exception.php';
    61             throw new Zend_Cloud_QueueService_Exception('Class must be specified using the \'' .
    61             throw new Zend_Cloud_QueueService_Exception('Class must be specified using the \'' .