Doctrine\OXM\Mapping\ClassMetadata::__sleep PHP Méthode

__sleep() public méthode

It is only serialized what is necessary for best unserialization performance. That means any metadata properties that are not set or empty or simply have their default value are NOT serialized. Parts that are also NOT serialized because they can not be properly unserialized: - reflClass (ReflectionClass) - reflFields (ReflectionProperty array)
public __sleep ( ) : array
Résultat array The names of all the fields that should be serialized.
    public function __sleep()
    {
        // This metadata is always serialized/cached.
        $serialized = array('fieldMappings', 'xmlFieldMap', 'identifier', 'name', 'namespace', 'isRoot', 'xmlName', 'generatorType', 'idGenerator');
        // The rest of the metadata is only serialized if necessary.
        if ($this->lifecycleCallbacks) {
            $serialized[] = 'lifecycleCallbacks';
        }
        if ($this->changeTrackingPolicy != self::CHANGETRACKING_DEFERRED_IMPLICIT) {
            $serialized[] = 'changeTrackingPolicy';
        }
        if ($this->customRepositoryClassName) {
            $serialized[] = 'customRepositoryClassName';
        }
        if ($this->isMappedSuperclass) {
            $serialized[] = 'isMappedSuperclass';
        }
        if ($this->xmlNamespaces) {
            $serialized[] = 'xmlNamespaces';
        }
        return $serialized;
    }