public function getRediska() { if (!is_object($this->_rediska)) { $this->_rediska = Rediska_Options_RediskaInstance::getRediskaInstance($this->_rediska, 'Zend_Cache_Exception', 'backend'); } return $this->_rediska; }
/** * Constructor * * @param array|Zend_Config $options * @param null|Zend_Queue $queue * @return void */ public function __construct($options, Zend_Queue $queue = null) { parent::__construct($options, $queue); if (!empty($this->_options['driverOptions'])) { $this->_rediska = $options['driverOptions']; } $this->_rediska = Rediska_Options_RediskaInstance::getRediskaInstance($this->_rediska, 'Zend_Queue_Exception', 'driverOptions'); $this->_queues = new Rediska_Key_Set($this->_getKeyName('queues'), array('rediska' => $this->_rediska)); }
public function testGetRediskaByOptions() { $r = Rediska_Options_RediskaInstance::getRediskaInstance(array('namespace' => 'byOptions')); $this->assertEquals('byOptions', $r->getOption('namespace')); $this->assertEquals(array(), Rediska_Manager::getAll()); }