Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 611 Bytes

DenormalizerFactory.md

File metadata and controls

33 lines (21 loc) · 611 Bytes

DenormalizerFactory

without name (default)

<?php

use Chubbyphp\Deserialization\ServiceFactory\DenormalizerFactory;
use Psr\Container\ContainerInterface;

/** @var ContainerInterface $container */
$container = ...;

$factory = new DenormalizerFactory();

$denormalizer = $factory($container);

with name default

<?php

use Chubbyphp\Deserialization\ServiceFactory\DenormalizerFactory;
use Psr\Container\ContainerInterface;

/** @var ContainerInterface $container */
$container = ...;

$factory = [DenormalizerFactory::class, 'default'];

$denormalizer = $factory($container);