chemisus/provider · JsonSerializer.php
php logo
public function deserialize($string)
    {
        return json_decode($string, $this->deserializeAssoc, $this->deserializeDepth, $this->deserializeOptions);
    }
Similar code snippets
1.
martyn82/apha · SagaSerializer.php
Match rating: 71.8% · See similar code snippets
php logo
public function deserialize(string $data, string $type)
    {
        /* @var $deserialized Saga */
        $deserialized = $this->serializer->deserialize($data, $type);
        $this->factory->hydrate($deserialized);
        return $deserialized;
    }
2.
maximegosselin/serializer · ArrayDeserializeStrategy.php
Match rating: 68.81% · See similar code snippets
php logo
public function deserialize(array $data)
    {
        $this->assertValidData($data);

        $payload = $data['payload'];
        $deserializer = $this->deserializer;
        array_walk($payload, function (&$value) use ($deserializer) {
            $value = $deserializer->deserialize($value);
        });

        return $payload;
    }
3.
maximegosselin/serializer · Engine.php
Match rating: 67.26% · See similar code snippets
php logo
public function deserialize(array $data)
    {
        /** @var DeserializeStrategyInterface $strategy */
        foreach ($this->deserializeStrategies as $strategy) {
            if ($strategy->canDeserialize($data)) {
                return $strategy->deserialize($data);
            }
        }

        throw new DeserializationException('Could not deserialize data.');
    }
4.
infomaniac-amf/php · AMF.php
Match rating: 67.19% · See similar code snippets
php logo
public static function deserialize($data, $forceType = null)
    {
        try {
            self::init();

            $stream       = new Input($data);
            $deserializer = new Deserializer($stream);

            return $deserializer->deserialize($forceType);
        } catch (Exception $e) {
            $ex = new DeserializationException($e->getMessage(), $e->getCode(), $e);
            $ex->setData($data);
            throw $ex;
        }
    }
5.
giftcards/Encryption · AbstractSerializerDeserializer.php
Match rating: 66.81% · See similar code snippets
php logo
public function deserialize($string)
    {
        if (!$this->canDeserialize($string)) {
            throw new FailedToDeserializeException($string, 'unserialization is not supported for this cipher text');
        }
        
        return $this->doDeserialize($string);
    }
6.
mtils/php-ems · JsonSerializer.php
Match rating: 66.71% · See similar code snippets
php logo
public function deserialize($string, array $options=[])
    {
        $deserialized = json_decode(
            $string,
            $this->shouldDecodeAsArray($options),
            $this->getDepth($options),
            $this->bitmask($options, true)
        );

        return $deserialized;

    }
7.
Match rating: 66.62% · See similar code snippets
php logo
public static function deserialize(string $json)
    {
        $deserialized = json_decode($json, true);
        $objects = [];

        return self::decode($deserialized, $objects);
    }
8.
EDDYCJY/grpc-mri · Parser.php
Match rating: 66.32% · See similar code snippets
php logo
public static function deserializeMessage($deserialize, string $value)
    {
        if (empty($value)) {
            return null;
        } else {
            $value = self::unpack($value);
        }
        if (is_array($deserialize)) {
            list($className, $deserializeFunc) = $deserialize;
            /** @var $obj \Google\Protobuf\Internal\Message */
            $obj = new $className();
            if ($deserializeFunc && method_exists($obj, $deserializeFunc)) {
                $obj->$deserializeFunc($value);
            } else {
                /** @noinspection PhpUndefinedMethodInspection */
                $obj->mergeFromString($value);
            }
            return $obj;
        }
        return call_user_func($deserialize, $value);
    }
9.
issei-m/simple-job-queue · Queue.php
Match rating: 65.82% · See similar code snippets
php logo
public function dequeue(): ?Job
    {
        $this->checkDelayed();

        $deserialized = $this->redis->lpop($this->key);
        if (null === $deserialized) {
            return null;
        }

        return $this->serializer->deserialize(\json_decode($deserialized, true));
    }
10.
24HOURSMEDIA/tesla-esync · SqsNotificationReceiver.php
Match rating: 65.57% · See similar code snippets
php logo
function getDeserializer()
    {
        if (!$this->deserializer) {
            $this->deserializer = new JsonMessageDeserializer($this->getMessageFactory());
        }

        return $this->deserializer;
    }