public function option($option, $value = '') {

        // if a connection was already made
        if ($this->connection)

            // inform the user that options can only be set before connecting
            return $this->_log('errors', array(

                'message'   => $this->language['options_before_connect'],

            ));

        // if option is given as an array
        if (is_array($option))

            // iterate over the options
            foreach ($option as $property => $value)

                // save them to a private property
                $this->options[$property] = $value;

        // if option is not given as an array
        else $this->options[$option] = $value;

    }
public function option($option, $value = '') {

        // if a connection was already made
        if ($this->connection)

            // inform the user that options can only be set before connecting
            return $this->_log('errors', array(

                'message'   => $this->language['options_before_connect'],

            ));

        // if option is given as an array
        if (is_array($option))

            // iterate over the options
            foreach ($option as $property => $value)

                // save them to a private property
                $this->options[$property] = $value;

        // if option is not given as an array
        else $this->options[$option] = $value;

    }
public function option ( $ option , $ value = '' ) { // if a connection was already made if ( $ this -> connection ) // inform the user that options can only be set before connecting return $ this -> _log ( 'errors' , array ( 'message' => $ this -> language [ 'options_before_connect' ] , ) ) ; // if option is given as an array if ( is_array ( $ option ) ) // iterate over the options foreach ( $ option as $ property => $ value ) // save them to a private property $ this -> options [ $ property ] = $ value ; // if option is not given as an array else $ this -> options [ $ option ] = $ value ; }
Sets one or more options that affect the behavior of a connection.

See {@link http://php.net/manual/en/mysqli.options.php the options} that can be set.

<samp>This method must to be called before connecting to a MySQL server. Keep in mind that because the library
uses "lazy connection", it will not actually connect to the given MySQL server until the first query is run, unless
the {@link connect()} method is called with the "connect" argument set to TRUE. Therefore, you can call it after
the {@link connect()} method but only if you run no queries until calling this method.</samp>

<i>This method may be called multiple times to set several options.</i>

<code>
// instantiate the library
$db = new Zebra_Database();

// set a single option
$db->option(MYSQLI_OPT_CONNECT_TIMEOUT, 5);

// set an array of options
$db->option(array(
MYSQLI_OPT_CONNECT_TIMEOUT  =>  5,
MYSQLI_INIT_COMMAND         =>  'SET AUTOCOMMIT = 0',
));

// connect to a MySQL server using the options set above
$db->connect(...)

</code>

@param  mixed   $option     One of the valid values described {@link http://php.net/manual/en/mysqli.options.php here},
or an array of key/value pairs where the keys are valid values described in the previous
link.

@param  mixed   $value      (Optional) When setting a single option this is the value to be associated with that
option. When setting an array of options this argument is ignored.

@since  2.9.5

@return void
Sets one or more options that affect the behavior of a connection .