eee
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Kiri\Router\Annotate;
|
|
||||||
|
|
||||||
#[\Attribute(((\Attribute::TARGET_METHOD)))]
|
|
||||||
class ContentType
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $contentType
|
|
||||||
*/
|
|
||||||
public function __construct(public string $contentType = "text/html")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Kiri\Router\Annotate;
|
||||||
|
|
||||||
|
use Kiri\Router\ContentType;
|
||||||
|
|
||||||
|
#[\Attribute(\Attribute::TARGET_METHOD)]
|
||||||
|
class ResponseContentType
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ContentType $contentType
|
||||||
|
*/
|
||||||
|
public function __construct(public ContentType $contentType = ContentType::JSON)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+644
-643
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user