Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 946 Bytes

DenormalizationFieldMappingFactoryFactory.md

File metadata and controls

39 lines (25 loc) · 946 Bytes

DenormalizationFieldMappingFactoryFactory

without name (default)

<?php

use Chubbyphp\Deserialization\Decoder\TypeDecoderInterface;
use Chubbyphp\Deserialization\ServiceFactory\DenormalizationFieldMappingFactoryFactory;
use Psr\Container\ContainerInterface;

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

// $container->get(TypeDecoderInterface::class.'[]')

$factory = new DenormalizationFieldMappingFactoryFactory();

$decoder = $factory($container);

with name default

<?php

use Chubbyphp\Deserialization\Decoder\TypeDecoderInterface;
use Chubbyphp\Deserialization\ServiceFactory\DenormalizationFieldMappingFactoryFactory;
use Psr\Container\ContainerInterface;

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

// $container->get(TypeDecoderInterface::class.'[]default')

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

$decoder = $factory($container);