public function option($option, $mode = 'select')
    {
        // Case with comma-separated options
        if (is_string($option) && strpos($option, ',') !== false) {
            $option = explode(',', $option);
        }

        if (is_array($option)) {
            foreach ($option as $opt) {
                $this->args['option'][$mode][] = $opt;
            }

            return $this;
        }

        $this->args['option'][$mode][] = $option;

        return $this;
    }
public function option($option, $mode = 'select')
    {
        // Case with comma-separated options
        if (is_string($option) && strpos($option, ',') !== false) {
            $option = explode(',', $option);
        }

        if (is_array($option)) {
            foreach ($option as $opt) {
                $this->args['option'][$mode][] = $opt;
            }

            return $this;
        }

        $this->args['option'][$mode][] = $option;

        return $this;
    }
public function option ( $ option , $ mode = 'select' ) { // Case with comma-separated options if ( is_string ( $ option ) && strpos ( $ option , ',' ) !== false ) { $ option = explode ( ',' , $ option ) ; } if ( is_array ( $ option ) ) { foreach ( $ option as $ opt ) { $ this -> args [ 'option' ] [ $ mode ] [ ] = $ opt ; } return $ this ; } $ this -> args [ 'option' ] [ $ mode ] [ ] = $ option ; return $ this ; }
Set options for particular mode.

@param mixed  $option
@param string $mode   select|insert|replace

@return $this
Set options for particular mode .