public function Connection::unserialize in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::unserialize()
 
File
- lib/
Drupal/ Core/ Database/ Connection.php, line 219  - Contains \Drupal\Core\Database\Connection.
 
Class
Namespace
Drupal\Core\DatabaseCode
public function unserialize($serialized) {
  throw new \Exception('unserialize is not implemented yet.');
  $data = unserialize($serialized);
  foreach ($data as $key => $value) {
    $this->{$key} = $value;
  }
  // Re-establish the PDO connection using the original options.
  $this->connection = static::open($this->connectionOptions);
  // Re-set a Statement class if necessary.
  if (!empty($this->statementClass)) {
    $this->connection
      ->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array(
      $this->statementClass,
      array(
        $this,
      ),
    ));
  }
}