Nelmio\Alice\Throwable\Exception\FixtureBuilder\Denormalizer\DenormalizerExceptionFactory::createDenormalizerNotFoundForFixture PHP Méthode

createDenormalizerNotFoundForFixture() public static méthode

public static createDenormalizerNotFoundForFixture ( string $fixtureId ) : DenormalizerNotFoundException
$fixtureId string
Résultat DenormalizerNotFoundException
    public static function createDenormalizerNotFoundForFixture(string $fixtureId) : DenormalizerNotFoundException
    {
        return new DenormalizerNotFoundException(sprintf('No suitable fixture denormalizer found to handle the fixture with the reference "%s".', $fixtureId));
    }

Usage Example

 /**
  * @inheritdoc
  */
 public function denormalize(FixtureBag $builtFixtures, string $className, string $fixtureId, array $specs, FlagBag $flags) : FixtureBag
 {
     foreach ($this->denormalizers as $denormalizer) {
         if ($denormalizer->canDenormalize($fixtureId)) {
             return $denormalizer->denormalize($builtFixtures, $className, $fixtureId, $specs, $flags);
         }
     }
     throw DenormalizerExceptionFactory::createDenormalizerNotFoundForFixture($fixtureId);
 }