You are here

public function ClassMetadata::__sleep in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Mapping/ClassMetadata.php \Symfony\Component\Validator\Mapping\ClassMetadata::__sleep()
  2. 8 vendor/symfony/serializer/Mapping/ClassMetadata.php \Symfony\Component\Serializer\Mapping\ClassMetadata::__sleep()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Mapping/ClassMetadata.php \Symfony\Component\Validator\Mapping\ClassMetadata::__sleep()

Returns the names of the properties that should be serialized.

Return value

string[]

Overrides GenericMetadata::__sleep

File

vendor/symfony/validator/Mapping/ClassMetadata.php, line 173

Class

ClassMetadata
Default implementation of {@link ClassMetadataInterface}.

Namespace

Symfony\Component\Validator\Mapping

Code

public function __sleep() {
  $parentProperties = parent::__sleep();

  // Don't store the cascading strategy. Classes never cascade.
  unset($parentProperties[array_search('cascadingStrategy', $parentProperties)]);
  return array_merge($parentProperties, array(
    'getters',
    'groupSequence',
    'groupSequenceProvider',
    'members',
    'name',
    'properties',
    'defaultGroup',
  ));
}