SwatDB/SwatDBRecordsetWrapper.php
public function setOptions($options, $value = null)
    {
        // if options passed as string then second param is option value
        if (is_string($options)) {
            $options = array($options => $value);
        }

        if (!is_array($options)) {
            throw new InvalidArgumentException(
                'The $options parameter must either be an array or a string ' .
                    'containing the option name.'
            );
        }

        // new options override existing options
        $this->options = array_merge($options, $this->options);

        return $this;
    }
public function setOptions($options, $value = null)
    {
        // if options passed as string then second param is option value
        if (is_string($options)) {
            $options = array($options => $value);
        }

        if (!is_array($options)) {
            throw new InvalidArgumentException(
                'The $options parameter must either be an array or a string ' .
                    'containing the option name.'
            );
        }

        // new options override existing options
        $this->options = array_merge($options, $this->options);

        return $this;
    }
public function setOptions ( $ options , $ value = null ) { // if options passed as string then second param is option value if ( is_string ( $ options ) ) { $ options = array ( $ options => $ value ) ; } if ( ! is_array ( $ options ) ) { throw new InvalidArgumentException ( 'The $options parameter must either be an array or a string ' . 'containing the option name.' ) ; } // new options override existing options $ this -> options = array_merge ( $ options , $ this -> options ) ; return $ this ; }
Sets one or more options for this recordset wrapper

Subclasses may define additional options. The default options are:

- <kbd>boolean read_only</kbd> if true, records are initialized as
read only. Defaults to false.

@param array|string $options either an array containing key-value pairs
or a string cotnaining the option name to
set.
@param mixed        $value   optional. If <kbd>$options</kbd> was passed
as a string, this is the option value.

@return SwatDBRecordsetWrapper the current object for fluent interface.
Sets one or more options for this recordset wrapper