QueryPath\Options::set PHP Méthode

set() public static méthode

The passed-in array will be used as the default options list.
public static set ( array $array )
$array array An associative array of options.
    public static function set($array)
    {
        self::$options = $array;
    }

Usage Example

 public function testQPMerge()
 {
     $options = array('test1' => 'val1', 'test2' => 'val2');
     $options2 = array('test1' => 'val3', 'test4' => 'val4');
     Options::set($options);
     Options::merge($options2);
     $results = Options::get();
     $this->assertTrue(Options::has('test4'));
     $this->assertEquals('val3', $results['test1']);
 }
All Usage Examples Of QueryPath\Options::set