Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 611 Bytes

DeserializerFactory.md

File metadata and controls

33 lines (21 loc) · 611 Bytes

DeserializerFactory

without name (default)

<?php

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

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

$factory = new DeserializerFactory();

$deserializer = $factory($container);

with name default

<?php

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

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

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

$deserializer = $factory($container);