/** * Retrieve an adapter instance * * @param array $options * @return void */ public static function getAdapter($options = array()) { $adapter = parent::_getAdapter(self::DOCUMENT_ADAPTER_KEY, $options); if (!$adapter) { throw new Zend_Cloud_DocumentService_Exception('Class must be specified using the \'' . self::DOCUMENT_ADAPTER_KEY . '\' key'); } elseif (!$adapter instanceof self::$_adapterInterface) { throw new Zend_Cloud_DocumentService_Exception('Adapter must implement \'' . self::$_adapterInterface . '\''); } return $adapter; }
/** * Retrieve an adapter instance * * @param array $options * @return void */ public static function getAdapter($options = array()) { $adapter = parent::_getAdapter(self::INFRASTRUCTURE_ADAPTER_KEY, $options); if (!$adapter) { throw new Zend_Cloud_Infrastructure_Exception(sprintf('Class must be specified using the "%s" key', self::INFRASTRUCTURE_ADAPTER_KEY)); } elseif (!$adapter instanceof self::$_adapterInterface) { throw new Zend_Cloud_Infrastructure_Exception(sprintf('Adapter must implement "%s"', self::$_adapterInterface)); } return $adapter; }
/** * Retrieve StorageService adapter * * @param array $options * @return Zend_Cloud_StorageService_Adapter */ public static function getAdapter($options = array()) { $adapter = parent::_getAdapter(self::STORAGE_ADAPTER_KEY, $options); if (!$adapter) { require_once 'Zend/Cloud/StorageService/Exception.php'; throw new Zend_Cloud_StorageService_Exception('Class must be specified using the \'' . self::STORAGE_ADAPTER_KEY . '\' key'); } elseif (!$adapter instanceof self::$_adapterInterface) { require_once 'Zend/Cloud/StorageService/Exception.php'; throw new Zend_Cloud_StorageService_Exception('Adapter must implement \'' . self::$_adapterInterface . '\''); } return $adapter; }