ProjetPP/PPP-datamodel-PHP · AbstractReducerNodeDeserializer.php
php logo
public function deserialize($serialization) {
		$this->assertCanDeserialize($serialization);
		$this->requireAttribute($serialization, 'list');
		$nodeDeserializer = $this->deserializerFactory->newNodeDeserializer();

		return $this->getDeserialization($nodeDeserializer->deserialize($serialization['list']));
	}
Similar code snippets
1.
ProjetPP/PPP-datamodel-PHP · AbstractOperatorNodeDeserializer.php
Match rating: 86.15% · See similar code snippets
php logo
public function deserialize($serialization) {
		$this->assertCanDeserialize($serialization);
		$this->requireAttribute($serialization, 'list');
		$this->assertAttributeIsArray($serialization, 'list');
		$nodeDeserializer = $this->deserializerFactory->newNodeDeserializer();

		$list = array();
		foreach($serialization['list'] as $resourceSerialization) {
			$list[] = $nodeDeserializer->deserialize($resourceSerialization);
		}

		return $this->getDeserialization($list);
	}
2.
ProjetPP/PPP-datamodel-PHP · SortNodeDeserializer.php
Match rating: 85.51% · 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'])
		);
	}
3.
ProjetPP/PPP-datamodel-PHP · TripleNodeDeserializer.php
Match rating: 71.85% · See similar code snippets
php logo
private function getDeserialization(array $serialization) {
		$this->requireAttributes($serialization, 'subject', 'predicate', 'object');

		$nodeDeserializer = $this->deserializerFactory->newNodeDeserializer();
		$baseTriple = new TripleNode(
			$nodeDeserializer->deserialize($serialization['subject']),
			$nodeDeserializer->deserialize($serialization['predicate']),
			$nodeDeserializer->deserialize($serialization['object'])
		);

		if(!array_key_exists('inverse-predicate', $serialization)) {
			return $baseTriple;
		}

		return new UnionNode(array(
			$baseTriple,
			new TripleNode(
				$baseTriple->getObject(),
				$nodeDeserializer->deserialize($serialization['inverse-predicate']),
				$baseTriple->getSubject()
			)
		));
	}
4.
24HOURSMEDIA/tesla-esync · SqsNotificationReceiver.php
Match rating: 71.71% · See similar code snippets
php logo
function getDeserializer()
    {
        if (!$this->deserializer) {
            $this->deserializer = new JsonMessageDeserializer($this->getMessageFactory());
        }

        return $this->deserializer;
    }
5.
ProjetPP/PPP-datamodel-PHP · DeserializerFactory.php
Match rating: 71.58% · See similar code snippets
php logo
private function buildNodeDeserializer(array $customResourceNodesDeserializers) {
		$resourceNodeDeserializer = $this->buildResourceNodeDeserializer($customResourceNodesDeserializers);
		return new DispatchingDeserializer(array(
			new MissingNodeDeserializer(),
			new TripleNodeDeserializer($this),
			new UnionNodeDeserializer($this),
			new IntersectionNodeDeserializer($this),
			new FirstNodeDeserializer($this),
			new LastNodeDeserializer($this),
			new SentenceNodeDeserializer(),
			new SortNodeDeserializer($this, $resourceNodeDeserializer),
			new ResourceListNodeDeserializer($resourceNodeDeserializer),
			new ResourceAsResourceListNodeDeserializer($resourceNodeDeserializer)
		));
	}
6.
ProjetPP/WikibaseEntityStore · SerializedEntityDeserializer.php
Match rating: 71.09% · See similar code snippets
php logo
public function deserialize( $serialization ) {
		if ( !$this->isDeserializerFor( $serialization ) ) {
			throw new DeserializationException( 'SerializedEntityDeserializer serialization should be an array' );
		}

		return new SerializedEntity(
			$this->getIdFromSerialization( $serialization ),
			$serialization
		);
	}
7.
giftcards/Encryption · SerializerDeserializerBuilder.php
Match rating: 70.97% · See similar code snippets
php logo
public function addDeserializer($deserializer, array $options = array())
    {
        if (!$deserializer instanceof DeserializerInterface) {
            $deserializer = $this->deserializerFactory->create($deserializer, $options);
        }
        
        $this->deserializers[] = $deserializer;
        return $this;
    }
8.
giftcards/Encryption · AbstractSerializerDeserializer.php
Match rating: 70.95% · 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);
    }
9.
transfer-framework/bridge · SerializationWorker.php
Match rating: 70.67% · See similar code snippets
php logo
public function handle($object)
    {
        if (isset($this->deserialization['serializer'])) {
            $serializer = $this->deserialization['serializer'];
        } else {
            $serializer = $this->getDefaultSerializer();
        }

        $object = $serializer->deserialize(
            $object,
            $this->deserialization['type'],
            $this->source['format']
        );

        return $object;
    }
10.
maximegosselin/serializer · ArrayDeserializeStrategy.php
Match rating: 70.08% · 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;
    }