DB_common::getOption()

DB_common::getOption() – Determines current state of a PEAR DB configuration option

Synopsis

mixed getOption ( string $option )

Description

Determines current state of a PEAR DB configuration option

Parameter

string $option

name of the option to examine

Return value

mixed the option's value

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
NULL unknown option The given option does not exist Check $option for typographical errors

Note

This function can not be called statically.

Example

Simple getOption() example

<?php
// Once you have a valid DB object named $db...
if ($db->getOption('autofree')) {
    
// do something...
}
?>