Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 593 Bytes

NormalizerFactory.md

File metadata and controls

33 lines (21 loc) · 593 Bytes

NormalizerFactory

without name (default)

<?php

use Chubbyphp\Serialization\ServiceFactory\NormalizerFactory;
use Psr\Container\ContainerInterface;

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

$factory = new NormalizerFactory();

$normalizer = $factory($container);

with name default

<?php

use Chubbyphp\Serialization\ServiceFactory\NormalizerFactory;
use Psr\Container\ContainerInterface;

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

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

$normalizer = $factory($container);