EncodedHtmlString
class EncodedHtmlString extends HtmlString (View source)
Properties
| protected DeferringDisplayableValue|Htmlable|BackedEnum|string|int|float|null | $html | The HTML string. |
|
| static protected callable|null | $encodeUsingFactory | The callback that should be used to encode the HTML strings. |
Methods
Create a new encoded HTML string instance.
Get the HTML string.
Convert the special characters in the given value.
Set the callable that will be used to encode the HTML strings.
Flush the class's global state.
Details
__construct(string $html = '', bool $doubleEncode = true)
Create a new encoded HTML string instance.
string
toHtml()
Get the HTML string.
bool
isEmpty()
Determine if the given HTML string is empty.
bool
isNotEmpty()
Determine if the given HTML string is not empty.
string
__toString()
Get the HTML string.
static string
convert(string|null $value, bool $withQuote = true, bool $doubleEncode = true)
| internal |
Convert the special characters in the given value.
static void
encodeUsing(callable|null $factory = null)
Set the callable that will be used to encode the HTML strings.
static void
flushState()
Flush the class's global state.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.