registerConstructor( * #[\OCA\Talk\Vendor\CuyZ\Valinor\Attribute\DynamicConstructor] * function (string $className, string $value): SomeInterfaceWithStaticConstructor { * return $className::from($value); * } * ) * ->mapper() * ->map(SomeClassWithInheritedStaticConstructor::class, 'foo'); * ``` * * @api */ #[Attribute(Attribute::TARGET_FUNCTION | Attribute::TARGET_METHOD)] final class DynamicConstructor {}