HTML
class HTML
HTML helper.
Traits
Properties
static protected array | $_extensions | Class extensions. | from ExtendableTrait |
protected bool | $xhtml | Should we return XHTML? |
Methods
Executes class extensions.
Constructor.
Takes an array of attributes and turns it into a string.
Creates a HTML5 tag.
Helper method for building media tags.
Creates audio tag with support for multiple sources.
Creates video tag with support for multiple sources.
Helper method for building list tags.
Builds an un-ordered list.
Builds am ordered list.
Details
in ExtendableTrait at line 35
static
addMethod(string $methodName, Closure $closure)
Adds a method to the class.
in ExtendableTrait at line 47
mixed
__call(string $name, array $arguments)
Executes class extensions.
in ExtendableTrait at line 64
static mixed
__callStatic(string $name, array $arguments)
Executes class extensions.
at line 36
__construct(bool $xhtml = false)
Constructor.
at line 47
protected string
attributes(array $attributes)
Takes an array of attributes and turns it into a string.
at line 72
string
tag(string $name, array $attributes = [], string|null $content = null)
Creates a HTML5 tag.
at line 85
protected string
buildMedia(string $type, string|array $files, array $attributes)
Helper method for building media tags.
at line 104
string
audio(string|array $files, array $attributes = [])
Creates audio tag with support for multiple sources.
at line 116
string
video(string|array $files, array $attributes = [])
Creates video tag with support for multiple sources.
at line 129
protected string
buildList(string $type, array $items, array $attributes)
Helper method for building list tags.
at line 155
string
ul(array $items, array $attributes = [])
Builds an un-ordered list.
at line 167
string
ol(array $items, array $attributes = [])
Builds am ordered list.