예제 #1
0
파일: Redis.php 프로젝트: J3FF3/Rediska
 public function getRediska()
 {
     if (!is_object($this->_rediska)) {
         $this->_rediska = Rediska_Options_RediskaInstance::getRediskaInstance($this->_rediska, 'Zend_Cache_Exception', 'backend');
     }
     return $this->_rediska;
 }
예제 #2
0
 /**
  * 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));
 }
예제 #3
0
 public function testGetRediskaByOptions()
 {
     $r = Rediska_Options_RediskaInstance::getRediskaInstance(array('namespace' => 'byOptions'));
     $this->assertEquals('byOptions', $r->getOption('namespace'));
     $this->assertEquals(array(), Rediska_Manager::getAll());
 }