Skip to content

Commit c1c7e3f

Browse files
authored
feat: Add Htmlable contract interface for HTTP responses (#6794)
1 parent 774cefb commit c1c7e3f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Htmlable.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
/**
5+
* This file is part of Hyperf.
6+
*
7+
* @link https://www.hyperf.io
8+
* @document https://hyperf.wiki
9+
* @contact [email protected]
10+
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
11+
*/
12+
13+
namespace Hyperf\Contract;
14+
15+
use Stringable;
16+
17+
interface Htmlable extends Stringable
18+
{
19+
/**
20+
* Get content as a string of HTML.
21+
*
22+
* @return string
23+
*/
24+
public function toHtml();
25+
}

0 commit comments

Comments
 (0)