Nelmio\Alice\FixtureBuilder\Denormalizer\Fixture\Chainable\CollectionDenormalizerWithTemporaryFixture::denormalizeTemporaryFixture PHP Method

denormalizeTemporaryFixture() private method

This helper is used to optimize the number of call made on the decorated denormalizer: instead of building the IDs from the list or the range, and then denormalizing as many time as needed, the denormalization is done only once.
private denormalizeTemporaryFixture ( FixtureBag $builtFixtures, string $className, array $specs, FlagBag $flags ) : array
$builtFixtures Nelmio\Alice\FixtureBag
$className string
$specs array
$flags Nelmio\Alice\Definition\FlagBag
return array
    private function denormalizeTemporaryFixture(FixtureBag $builtFixtures, string $className, array $specs, FlagBag $flags) : array
    {
        $tempFixtureId = uniqid('temporary_id');
        $builtFixtures = $this->denormalizer->denormalize($builtFixtures, $className, $tempFixtureId, $specs, $flags);
        $tempFixture = $builtFixtures->get($tempFixtureId);
        $builtFixtures = $builtFixtures->without($tempFixture);
        return [$tempFixture, $builtFixtures];
    }