You are here

function DB_common::__wakeup in Flickr API 5

Automatically reconnects to the database when PHP's unserialize() function is called

The reconnection attempt is only performed if the object was connected at the time PHP's serialize() function was run.

Return value

void

File

phpFlickr/PEAR/DB/common.php, line 188

Class

DB_common
DB_common is the base class from which each database driver class extends

Code

function __wakeup() {
  if ($this->was_connected) {
    $this
      ->connect($this->dsn, $this->options);
  }
}