public function setOptions(array $options = null): void
    {
        // store options by default
        $this->options = (array)$options;

        // apply options
        foreach ($this->options as $key => $value) {
            $this->setOption($key, $value);
        }
    }
public function setOptions(array $options = null): void
    {
        // store options by default
        $this->options = (array)$options;

        // apply options
        foreach ($this->options as $key => $value) {
            $this->setOption($key, $value);
        }
    }
public function setOptions ( array $ options = null ) : void { // store options by default $ this -> options = ( array ) $ options ; // apply options foreach ( $ this -> options as $ key => $ value ) { $ this -> setOption ( $ key , $ value ) ; } }
Setup, check and init options

Requirements
- options must be a array
- options can be null

@param  array $options

@return void
Setup check and init options