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 33
static
addMethod(string $methodName, Closure $closure)
Adds a method to the class.
in ExtendableTrait at line 45
mixed
__call(string $name, array $arguments)
Executes class extensions.
in ExtendableTrait at line 62
static mixed
__callStatic(string $name, array $arguments)
Executes class extensions.
at line 34
__construct(bool $xhtml = false)
Constructor.
at line 45
protected string
attributes(array $attributes)
Takes an array of attributes and turns it into a string.
at line 70
string
tag(string $name, array $attributes = [], string|null $content = null)
Creates a HTML5 tag.
at line 83
protected string
buildMedia(string $type, array|string $files, array $attributes)
Helper method for building media tags.
at line 102
string
audio(array|string $files, array $attributes = [])
Creates audio tag with support for multiple sources.
at line 114
string
video(array|string $files, array $attributes = [])
Creates video tag with support for multiple sources.
at line 127
protected string
buildList(string $type, array $items, array $attributes)
Helper method for building list tags.
at line 153
string
ul(array $items, array $attributes = [])
Builds an un-ordered list.
at line 165
string
ol(array $items, array $attributes = [])
Builds am ordered list.