Instantiator\Instantiator::getSerializationFormat PHP 메소드

getSerializationFormat() 개인적인 메소드

Verifies if the given PHP version implements the Serializable interface serialization with an incompatible serialization format. If that's the case, use serialization marker "C" instead of "O".
private getSerializationFormat ( ReflectionClass $reflectionClass ) : string
$reflectionClass ReflectionClass
리턴 string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER
    private function getSerializationFormat(ReflectionClass $reflectionClass)
    {
        if ($this->isPhpVersionWithBrokenSerializationFormat() && $reflectionClass->implementsInterface('Serializable')) {
            return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER;
        }
        return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER;
    }