You are here

function DB_common::__sleep in Flickr API 5

Automatically indicates which properties should be saved when PHP's serialize() function is called

Return value

array the array of properties names that should be saved

File

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

Class

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

Code

function __sleep() {
  if ($this->connection) {

    // Don't disconnect(), people use serialize() for many reasons
    $this->was_connected = true;
  }
  else {
    $this->was_connected = false;
  }
  if (isset($this->autocommit)) {
    return array(
      'autocommit',
      'dbsyntax',
      'dsn',
      'features',
      'fetchmode',
      'fetchmode_object_class',
      'options',
      'was_connected',
    );
  }
  else {
    return array(
      'dbsyntax',
      'dsn',
      'features',
      'fetchmode',
      'fetchmode_object_class',
      'options',
      'was_connected',
    );
  }
}