public function setOptions($options = [], $update = false)
  {
		if (! $update) {
			$defaults = $this->setOptionDefaults();
		} else {
			$defaults = $this->getOptions();
		}

    $options = array_intersect_key(array_filter($options), $defaults);
    $options = array_merge($options, array_diff_key($defaults, $options));
    foreach ($options as $key => $option) {
        $this->$key = $option;
    }
    return $this;
  }
public function setOptions($options = [], $update = false)
  {
		if (! $update) {
			$defaults = $this->setOptionDefaults();
		} else {
			$defaults = $this->getOptions();
		}

    $options = array_intersect_key(array_filter($options), $defaults);
    $options = array_merge($options, array_diff_key($defaults, $options));
    foreach ($options as $key => $option) {
        $this->$key = $option;
    }
    return $this;
  }
public function setOptions ( $ options = [ ] , $ update = false ) { if ( ! $ update ) { $ defaults = $ this -> setOptionDefaults ( ) ; } else { $ defaults = $ this -> getOptions ( ) ; } $ options = array_intersect_key ( array_filter ( $ options ) , $ defaults ) ; $ options = array_merge ( $ options , array_diff_key ( $ defaults , $ options ) ) ; foreach ( $ options as $ key => $ option ) { $ this -> $ key = $ option ; } return $ this ; }
Set Notification options to instance.

@param  	array 		$options
@param 	bool			$update
@return 	$this
Set Notification options to instance .