Unserialize an embedded collection

Return a collection of serialized objects (arrays)

@param MapperInterface $mapper
@param array           $data

@return array
105
protected function unserializeEmbeddedCollection(MapperInterface $mapper, array $data)
    {
        $collection = array();
        foreach ($data as $document) {
            $collection[] = $mapper->unserialize($document);
        }

        return $collection;
    }
948282
public function unserialise($input, $class = null)
    {
        $contents = json_decode($input);

        if (!is_null($class)) {
            return (new Mapper())->map($contents, $class);
        }

        return (array) $contents;
    }
772218
protected function factory($mapper) {
		if (is_array($mapper)) {
			$mp = clone($this->mapper);
			$mp->reset();
			$cx = $this->factory($mp);
			$cx->copyfrom($mapper);
		} else {
			$cx = clone($this);
			$cx->reset(false);
			$cx->mapper = $mapper;
		}
		$cx->emit('load');
		return $cx;
	}
260314
public function unserialize($data) {
        $value = $this->fromData($data);
        foreach ($this->getFilters() as $filter) {
            $value = $filter->toValue($value);
        }
        return $value;
    }
884369
public static function deserializeObject(array $data)
    {
        $subAttributes = [];
        if (isset($data['subAttributes'])) {
            foreach ($data['subAttributes'] as $subAttribute) {
                $subAttributes[] = static::deserializeObject($subAttribute);
            }
        }
        $result = new static(
            $data['name'],
            $data['type'],
            $data['multiValued'],
            $data['required'],
            isset($data['description']) ? $data['description'] : null,
            $subAttributes,
            isset($data['canonicalValues']) ? $data['canonicalValues'] : [],
            isset($data['caseExact']) ? $data['caseExact'] : false,
            $data['mutability'],
            $data['returned'],
            isset($data['uniqueness']) ? $data['uniqueness'] : null,
            isset($data['referenceTypes']) ? $data['referenceTypes'] : []
        );

        return $result;
    }
1320432
public function unserialize($data)
    {
        $object = unserialize($data);

        $this->resolver = $object['resolver'];
        $this->collection = $object['collection'];
    }
1097998
public function unserialize($data)
    {
        if ($data) {
            $data = explode(',', pick($data, ''));
            $data = array_combine($data, $data);
        } else {
            $data = array();
        }

        $this->_data = $data;

        return $this;
    }
478005
private function createList(Mapper $mapper, array $items)
    {
        $result = [];
        foreach ($items as $item) {
            $result[] = $mapper->createObject($item);
        }

        return $result;
    }
431180
protected function getQueuedCallable(array $data)
	{
		if (Str::contains($data['callback'], 'SerializableClosure'))
		{
			if ( class_exists('\SuperClosure\Serializer') )
			{
				return (new \SuperClosure\Serializer)->unserialize($data['callback']);
			}
			else
			{
				return with(unserialize($data['callback']))->getClosure();
			}
		}

		return $data['callback'];
	}
1210696
protected function unserialize(string $data)
    {
        $unserializedData = json_decode($data, true);
        $unserializedData['d'] = unserialize($unserializedData['d']);

        return $unserializedData;
    }
503879
public static function unserialize ($data) {
		foreach (unserialize($data) ?? [] as $name => $datum) {
			static::$multitonInstances[$name] = unserialize($datum);
		}
	}
8700
public function update($json, ChildrenOrderSaverMapperInterface $mapper)
    {
        $array = $this->parse($json);

        foreach ($array as $range => $value) {
            if (is_array($value)) {
                $mapper->save($value[RelationBuilder::TREE_PARAM_ID], $value[RelationBuilder::TREE_PARAM_PARENT_ID], $range);
            }
        }

        return true;
    }
486035
public static function unserialize( $data )
    {
        $data = json_decode( $data, true );
        return new static( $data[0], $data[1], $data[2], $data[3] );
    }
1316860
protected function unmapAttributes(array &$data)
    {
        $map = array_flip($this->attributeMap);
        $out = [];

        foreach ($data as $key => &$value) {
            if (isset($map[$key])) {
                $key = $map[$key];
            }
            $out[$key] = $value;
        }

        return $out;
    }
151543
protected function createObject($mapperClass, $element, $included)
    {
        /** @var Mapper $mapper */
        $mapper = new $mapperClass;

        return $mapper->createObject(array_merge($this->getAttributes($element), $included));
    }
1088635
public function newEntityCollection(array $data): array {
		if (empty($this->entityType)) {
			throw new EntityFactoryException("Cannot produce entity without type.", EntityFactoryException::UNSET_ENTITY_TYPE);
		}
		
		$entities = [];
		foreach ($data as $datum) {
			$entities[] = $this->newEntity($datum);
		}
		
		return $entities;
	}
741240
public static Collection map(Mapper mapper, Object[] arr) {
        return map(mapper, arr, false);
    }