maximegosselin/serializer · Engine.php
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.');
    }
Similar code snippets
1.
martyn82/apha · SagaSerializer.php
Match rating: 71.96% · 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: 71.35% · 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.
ProjetPP/PPP-datamodel-PHP · AbstractReducerNodeDeserializer.php
Match rating: 67.52% · See similar code snippets
php logo
public function deserialize($serialization) {
		$this->assertCanDeserialize($serialization);
		$this->requireAttribute($serialization, 'list');
		$nodeDeserializer = $this->deserializerFactory->newNodeDeserializer();

		return $this->getDeserialization($nodeDeserializer->deserialize($serialization['list']));
	}
4.
chemisus/provider · JsonSerializer.php
Match rating: 67.26% · See similar code snippets
php logo
public function deserialize($string)
    {
        return json_decode($string, $this->deserializeAssoc, $this->deserializeDepth, $this->deserializeOptions);
    }
5.
infomaniac-amf/php · AMF.php
Match rating: 66.54% · 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;
        }
    }
6.
ProjetPP/PPP-datamodel-PHP · SortNodeDeserializer.php
Match rating: 65.95% · See similar code snippets
php logo
private function getDeserialization(array $serialization) {
		$this->requireAttributes($serialization, 'list', 'predicate');

		$nodeDeserializer = $this->deserializerFactory->newNodeDeserializer();
		return new SortNode(
			$nodeDeserializer->deserialize($serialization['list']),
			$this->resourceDeserializer->deserialize($serialization['predicate'])
		);
	}
7.
qandidate-labs/qandidate-toggle · ToggleSerializer.php
Match rating: 65.89% · See similar code snippets
php logo
private function deserializeConditions(array $conditions)
    {
        $deserialized = array();

        foreach ($conditions as $condition) {
            $deserialized[] = $this->operatorConditionSerializer->deserialize($condition);
        }

        return $deserialized;
    }
8.
aboutcoders/job-bundle · Serializer.php
Match rating: 65.17% · See similar code snippets
php logo
public function deserialize($data, $type, $format, DeserializationContext $context = null)
    {
        return $this->serializer->deserialize($data, $type, $format, $context);
    }
9.
giftcards/Encryption · AbstractSerializerDeserializer.php
Match rating: 65.11% · 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);
    }
10.
flash-global/connect-client · Metadata.php
Match rating: 64.83% · See similar code snippets
php logo
public function createEntityDescriptor($xml)
    {
        $deserializationContext = new DeserializationContext();
        $deserializationContext->getDocument()->loadXML($xml);

        $ed = new EntityDescriptor();
        $ed->deserialize($deserializationContext->getDocument(), $deserializationContext);

        return $ed;
    }