for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Chubbyphp\Deserialization\Mapping;
use Psr\Container\ContainerInterface;
final class LazyDenormalizationObjectMapping implements DenormalizationObjectMappingInterface
{
/**
* @var ContainerInterface
*/
private $container;
* @var string
private $serviceId;
private $class;
* @param ContainerInterface $container
* @param string $serviceId
* @param string $class
public function __construct(ContainerInterface $container, $serviceId, string $class)
$this->container = $container;
$this->serviceId = $serviceId;
$this->class = $class;
}
* @return string
public function getClass(): string
return $this->class;
* @param string|null $type
*
* @return callable
public function getDenormalizationFactory(string $type = null): callable
return $this->container->get($this->serviceId)->getDenormalizationFactory($type);
* @return DenormalizationFieldMappingInterface[]
public function getDenormalizationFieldMappings(string $type = null): array
return $this->container->get($this->serviceId)->getDenormalizationFieldMappings($type);