* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Attribute; /** * Controller tag to serialize response. * * @author Konstantin Myakshin */ #[\Attribute(\Attribute::TARGET_METHOD)] final class Serialize { /** * @param int $code The HTTP status code (200 "OK" by default) * @param array $headers Extra headers to set on the response * @param array $context The serialization context passed to the serializer */ public function __construct( public readonly int $code = 200, public readonly array $headers = [], public readonly array $context = [], ) { } }