Html Class

package Fuel
subpackage Core
category Core
author Alfredo Rivera
link http://docs.fuelphp.com/classes/html.html

 Methods

Creates an html link

anchor(string $href, string $text, array $attr, bool $secure) : string

Parameters

$href

string

the url

$text

string

the text value

$attr

array

the attributes array

$secure

bool

true to force https, false to force http

Returns

stringthe html link

Generates a html5 audio tag It is required that you set html5 as the doctype to use this method

audio(string | array $src, array $attr) : string

Parameters

$src

stringarray

one or multiple audio sources

$attr

array

tag attributes

Returns

string

Generates a html doctype tag

doctype(string $type) : string

Parameters

$type

string

doctype declaration key from doctypes config

Returns

string

Creates an html image tag

img(string $src, array $attr) : string

Sets the alt attribute to filename of it is not supplied.

Parameters

$src

string

the source

$attr

array

the attributes array

Returns

stringthe image tag

Creates a mailto link.

mail_to(string $email, string $text, string $subject, array $attr) : string

Parameters

$email

string

The email address

$text

string

The text value

$subject

string

The subject

$attr

array

attributes for the tag

Returns

stringThe mailto link

Creates a mailto link with Javascript to prevent bots from picking up the email address.

mail_to_safe(string $email, string $text, string $subject, array $attr) : string

Parameters

$email

string

the email address

$text

string

the text value

$subject

string

the subject

$attr

array

attributes for the tag

Returns

stringthe javascript code containing email

Generates a html meta tag

meta(string | array $name, string $content, string $type) : string

Parameters

$name

stringarray

multiple inputs or name/http-equiv value

$content

string

content value

$type

string

name or http-equiv

Returns

string

Generates a html ordered list tag

ol(array $list, array | string $attr) : string

Parameters

$list

array

list items, may be nested

$attr

arraystring

outer list attributes

Returns

string

Adds the given schema to the given URL if it is not already there.

prep_url(string $url, string $schema) : string

Parameters

$url

string

the url

$schema

string

the schema

Returns

stringurl with schema

Generates a html un-ordered list tag

ul(array $list, array | string $attr) : string

Parameters

$list

array

list items, may be nested

$attr

arraystring

outer list attributes

Returns

string

Generates the html for the list methods

build_list(string $type, array $list, array $attr, string $indent) : string

Parameters

$type

string

list type (ol or ul)

$list

array

list items, may be nested

$attr

array

tag attributes

$indent

string

indentation

Returns

string

 Properties

 

$doctypes

$doctypes 

 

$html5

$html5