Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 628 Bytes

LazyNormalizationObjectMapping.md

File metadata and controls

28 lines (20 loc) · 628 Bytes

LazyNormalizationObjectMapping

<?php

use Chubbyphp\Serialization\Mapping\LazyNormalizationObjectMapping;
use MyProject\Model\Model;

$container = ...;

$objectMapping = new LazyNormalizationObjectMapping(
    $container,
    'myproject.normalizer.mapping.model',
    Model::class
);

echo $objectMapping->getClass();
// 'MyProject\Model\Model'

echo $objectMapping->getNormalizationType();
// 'model'

$objectMapping->getNormalizationFieldMappings('');
// array<int, NormalizationFieldMappingInterface>

$objectMapping->getNormalizationEmbeddedFieldMappings('');
// array<int, NormalizationFieldMappingInterface>