Html
class Html
Html builder
Methods
static string
createId(string $text, string $separator = '-')
Create valid html element id
static string
htmlTag(string $name, string|null $content, array|null $attributes = null, bool $singleTag = false, bool $startTagOnly = false)
Get html tag code
static mixed
__callStatic(string $name, array $arguments)
Call static methods
static string
getAttributes(array|null $attributes)
Convert attributes array to string
static string
attr(string|null $value, string|null $name = null, string|null $default = null)
Get html attribute
static string
singleTag(string $name, array|null $attributes = null)
Get html single tag
static string
startTag(string $name, array|null $attributes = null)
Get html start tag
static string
endTag(string $name, string|null $content = '')
Get html end tag
static string
specialcharsDecode(string $value)
Decode html chars
static string|null
removeTags(string $text, string|array $tags)
Remove html gams from text
static void
startDocument()
Start html
static void
renderDocument()
Show html code
static string
getDocument()
Get html code
static void
appendHtml(string $html)
Append html code
Details
at line 38
static string
createId(string $text, string $separator = '-')
Create valid html element id
at line 58
static string
htmlTag(string $name, string|null $content, array|null $attributes = null, bool $singleTag = false, bool $startTagOnly = false)
Get html tag code
at line 84
static mixed
__callStatic(string $name, array $arguments)
Call static methods
at line 107
static string
getAttributes(array|null $attributes)
Convert attributes array to string
at line 129
static string
attr(string|null $value, string|null $name = null, string|null $default = null)
Get html attribute
at line 143
static string
singleTag(string $name, array|null $attributes = null)
Get html single tag
at line 155
static string
startTag(string $name, array|null $attributes = null)
Get html start tag
at line 167
static string
endTag(string $name, string|null $content = '')
Get html end tag
at line 178
static string
specialcharsDecode(string $value)
Decode html chars
at line 190
static string|null
removeTags(string $text, string|array $tags)
Remove html gams from text
at line 206
static void
startDocument()
Start html
at line 217
static void
renderDocument()
Show html code
at line 227
static string
getDocument()
Get html code
at line 238
static void
appendHtml(string $html)
Append html code