for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Nekhay <[email protected]>
* @copyright Copyright (c) 2018, Anatoly Nekhay
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router
*/
declare(strict_types=1);
namespace Sunrise\Http\Router\Annotation;
use Attribute;
use Sunrise\Coder\MediaTypeInterface;
* @link https://dev.sunrise-studio.io/docs/reference/routing-annotations?id=encodableresponse
* @since 3.0.0
#[Attribute(Attribute::TARGET_METHOD)]
final class EncodableResponse
{
* @param array<array-key, mixed> $codecContext
array<array-key, mixed>
2
public function __construct(
public readonly ?MediaTypeInterface $defaultMediaType = null,
public readonly array $codecContext = [],
) {
}