public function setOption($option)
    {
        if (!isset(static::$availableOptions[$option])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid option specified: "%s". Expected one of (%s)',
                $option,
                implode(', ', array_keys(static::$availableOptions))
            ));
        }
        if (!in_array(static::$availableOptions[$option], $this->options, true)) {
            $this->options[] = static::$availableOptions[$option];
        }
    }
public function setOption($option)
    {
        if (!isset(static::$availableOptions[$option])) {
            throw new \InvalidArgumentException(sprintf(
                'Invalid option specified: "%s". Expected one of (%s)',
                $option,
                implode(', ', array_keys(static::$availableOptions))
            ));
        }
        if (!in_array(static::$availableOptions[$option], $this->options, true)) {
            $this->options[] = static::$availableOptions[$option];
        }
    }
public function setOption ( $ option ) { if ( ! isset ( static :: $ availableOptions [ $ option ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid option specified: "%s". Expected one of (%s)' , $ option , implode ( ', ' , array_keys ( static :: $ availableOptions ) ) ) ) ; } if ( ! in_array ( static :: $ availableOptions [ $ option ] , $ this -> options , true ) ) { $ this -> options [ ] = static :: $ availableOptions [ $ option ] ; } }
Sets some specific style option.

@param string $option The option name

@throws \InvalidArgumentException When the option name isn't defined
Sets some specific style option .