/** * Initialize options * * Several options need some extra checks or setup work, for these options * the setters are called. * * @return void */ protected function init() { parent::init(); foreach ($this->options as $name => $value) { switch ($name) { case 'set': $this->setSet($value); break; } } }
public function testSetExcludes() { $this->facet->addExcludes(array('e1', 'e2')); $this->facet->setExcludes(array('e3', 'e4')); $this->assertEquals(array('e3', 'e4'), $this->facet->getExcludes()); }
/** * Initialize options. * * Several options need some extra checks or setup work, for these options * the setters are called. */ protected function init() { parent::init(); foreach ($this->options as $name => $value) { switch ($name) { case 'include': $this->setInclude($value); break; case 'other': $this->setOther($value); break; } } }
/** * Initialize options. * * Several options need some extra checks or setup work, for these options * the setters are called. */ protected function init() { parent::init(); foreach ($this->options as $name => $value) { switch ($name) { case 'query': if (!is_array($value)) { $value = array(array('query' => $value)); } $this->addQueries($value); break; } } }