I'm trying to use the following method of a class (DbConnector):
public function closeConnector() {
//
echo "<p>in closeConnector()";
var_dump(DbConnector::$connector);
echo "</p>";
//make sure the db object is cleaned up properly
if ( gettype(DbConnector::$connector) == 'object' ) {
echo "<br><br>close the ADOdb connection<br><br>";
DbConnector::$connector->Close();
}
//put things back the way they were found
$this->connector = false;
}
DbConnector is meant to be a singleton class that manages an ADOdb
object. However, when the code executes and it gets to this line:
DbConnector::$connector->Close();
the script fails and says "Call to undefined method
DbConnector::Close()" Is trying to call the Close() method of the
static member var (which holds an ADOdb object) not possible?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php