public function addOptions(array $options)
    {
        $existingOptions = $this->getOptions();
        $newOptions = empty($existingOptions) ? $options : array_merge((array)$existingOptions, $options);
        $this->setOptions($newOptions);
        return $this;
    }
public function addOptions(array $options)
    {
        $existingOptions = $this->getOptions();
        $newOptions = empty($existingOptions) ? $options : array_merge((array)$existingOptions, $options);
        $this->setOptions($newOptions);
        return $this;
    }
public function addOptions ( array $ options ) { $ existingOptions = $ this -> getOptions ( ) ; $ newOptions = empty ( $ existingOptions ) ? $ options : array_merge ( ( array ) $ existingOptions , $ options ) ; $ this -> setOptions ( $ newOptions ) ; return $ this ; }
Allows to add multiple options at once when providing just one array.
@param array $options array of key => value for each option
@return $this
Allows to add multiple options at once when providing just one array .