options() public method

Sets the query options.
See also: addOptions()
public options ( array $options )
$options array query options in format: optionName => optionValue
Example #1
0
 public function testOptions()
 {
     $query = new Query();
     $options = ['cutoff' => 50, 'max_matches' => 50];
     $query->options($options);
     $this->assertEquals($options, $query->options);
     $newMaxMatches = $options['max_matches'] + 10;
     $query->addOptions(['max_matches' => $newMaxMatches]);
     $this->assertEquals($newMaxMatches, $query->options['max_matches']);
 }