The FormatAbstract
class implements the FormatInterface
interface with basic functional behavior and adds common helper functions for new formats:
Functions
setContentType
function
The The setContentType
function receives a string defining the content type for the HTML header and must return the object instance.
setContentType(string): self
callContentType
function
The The callContentType
function applies the content type to the header data and must return the object instance.
callContentType(): self
sanitizeHtml
function
The The sanitizeHtml
function receives an HTML formatted string and returns the string with disabled <script>
, <iframe>
and <link>
tags.
sanitizeHtml(string $html): string
array_trim
function
The The array_trim
function receives an array of strings and returns the same array with all elements trimmed (like using the trim
function on all elements)
array_trim(array $elements): array