You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
707 B
PHTML
47 lines
707 B
PHTML
|
10 years ago
|
<?php
|
||
|
|
|
||
|
|
namespace Illuminate\Support;
|
||
|
|
|
||
|
|
use Illuminate\Contracts\Support\Htmlable;
|
||
|
|
|
||
|
|
class HtmlString implements Htmlable
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* The HTML string.
|
||
|
|
*
|
||
|
|
* @var string
|
||
|
|
*/
|
||
|
|
protected $html;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Create a new HTML string instance.
|
||
|
|
*
|
||
|
|
* @param string $html
|
||
|
|
* @return void
|
||
|
|
*/
|
||
|
|
public function __construct($html)
|
||
|
|
{
|
||
|
|
$this->html = $html;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the the HTML string.
|
||
|
|
*
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function toHtml()
|
||
|
|
{
|
||
|
|
return $this->html;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Get the the HTML string.
|
||
|
|
*
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public function __toString()
|
||
|
|
{
|
||
|
|
return $this->toHtml();
|
||
|
|
}
|
||
|
|
}
|