You are here

public function Constraint::__sleep in Plug 7

Optimizes the serialized value to minimize storage space.

@internal This method may be replaced by an implementation of {@link \Serializable} in the future. Please don't use or overwrite it.

@since 2.6

Return value

array The properties to serialize

File

lib/Symfony/validator/Symfony/Component/Validator/Constraint.php, line 314

Class

Constraint
Contains the properties of a constraint definition.

Namespace

Symfony\Component\Validator

Code

public function __sleep() {

  // Initialize "groups" option if it is not set
  $this->groups;
  return array_keys(get_object_vars($this));
}