/** * 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 InvalidArgumentException(sprintf('Class must be specified using the "%s" key', self::INFRASTRUCTURE_ADAPTER_KEY)); } elseif (!$adapter instanceof self::$_adapterInterface) { throw new InvalidArgumentException(sprintf('Adapter must implement "%s"', self::$_adapterInterface)); } return $adapter; }
/** * Retrieve QueueService adapter * * @param array $options * @return void */ public static function getAdapter($options = array()) { $adapter = parent::_getAdapter(self::QUEUE_ADAPTER_KEY, $options); if (!$adapter) { throw new Exception\InvalidArgumentException('Class must be specified using the \'' . self::QUEUE_ADAPTER_KEY . '\' key'); } elseif (!$adapter instanceof self::$_adapterInterface) { throw new Exception\InvalidArgumentException('Adapter must implement \'' . self::$_adapterInterface . '\''); } return $adapter; }