/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/ObjectMapper/Tests/Fixtures/TargetTransform/TargetDto.php
29 строк
676 B
soyuka
[ObjectMapper] read source metadata before transform
03 авг 2025, 11:39
Не верифицирован
03 авг 2025, 11:39
50e177d
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ObjectMapper\Tests\Fixtures\TargetTransform; use Symfony\Component\ObjectMapper\Attribute\Map; #[Map(source: SourceEntity::class, transform: [self::class, 't'])] class TargetDto { #[Map(if: false)] public bool $transformed; public string $name; public static function t(mixed $value, object $source, ?object $target) { $value->transformed = true; return $value; } }