You are here

public function Extension::unserialize in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Core/Extension/Extension.php \Drupal\Core\Extension\Extension::unserialize()

Implements Serializable::unserialize().

File

lib/Drupal/Core/Extension/Extension.php, line 189
Contains \Drupal\Core\Extension\Extension.

Class

Extension
Defines an extension (file) object.

Namespace

Drupal\Core\Extension

Code

public function unserialize($data) {
  $data = unserialize($data);
  $this->root = $data['root'];
  $this->type = $data['type'];
  $this->pathname = $data['pathname'];
  $this->filename = $data['filename'];

  // @todo ThemeHandler::listInfo(), ThemeHandler::rebuildThemeData(), and
  //   system_list() are adding custom properties to the Extension object.
  foreach ($data as $property => $value) {
    if (!isset($this->{$property})) {
      $this->{$property} = $value;
    }
  }
}