/** * {@inheritdoc} */ public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value && strpos($value, ';') === false) { $value = base64_decode($value); } return parent::convertToPHPValue($value, $platform); }
/** * {@inheritdoc} */ public function convertToPHPValue($value, AbstractPlatform $platform) { if ($value && !$this->isSerialized($value)) { $value = base64_decode($value); } return parent::convertToPHPValue($value, $platform); }
/** * @param mixed $value * @param AbstractPlatform $platform * * @return mixed|null */ public function convertToPHPValue($value, AbstractPlatform $platform) { if ($platform instanceof OrientDBPlatform) { return parent::convertToPHPValue($value, $platform); } return $value; }
public function convertToPHPValue($value, AbstractPlatform $platform) { $data = parent::convertToPHPValue($value, $platform); if (null === $data) { return null; } else { if (is_array($data)) { foreach ($data as $name => $value) { if (true === $value[1]) { $data[$name][0] = unserialize(self::$encryptionService->decrypt($value[0])); } } $extendedData = new ExtendedData(); $reflection = new \ReflectionProperty($extendedData, 'data'); $reflection->setAccessible(true); $reflection->setValue($extendedData, $data); $reflection->setAccessible(false); return $extendedData; } else { throw ConversionException::conversionFailed($value, $this->getName()); } } }