function Extension::__sleep
Magic method implementation to serialize the extension object.
Return value
array The names of all variables that should be serialized.
File
-
core/
lib/ Drupal/ Core/ Extension/ Extension.php, line 180
Class
- Extension
- Defines an extension (file) object.
Namespace
Drupal\Core\ExtensionCode
public function __sleep() : array {
// @todo \Drupal\Core\Extension\ThemeExtensionList is adding custom
// properties to the Extension object.
$properties = get_object_vars($this);
// Don't serialize the app root, since this could change if the install is
// moved. Don't serialize splFileInfo because it can not be.
unset($properties['splFileInfo'], $properties['root']);
return array_keys($properties);
}