You are here

public function Dependency::__sleep in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__sleep()

Prevents unnecessary serialization of constraint objects.

Return value

array The properties to serialize.

File

core/lib/Drupal/Core/Extension/Dependency.php, line 144

Class

Dependency
A value object representing dependency information.

Namespace

Drupal\Core\Extension

Code

public function __sleep() {
  return [
    'name',
    'project',
    'constraintString',
  ];
}