Class Html
Namespace: Adi\
Html
Package: adi\base
Author:
Adrian Zurkiewicz (adrian.zurkiewicz@gmail.com)
Version:
1.0
Located at Html.php
Methods summary
public static
string
|
#
closeTags( string $string )
Close all open tags.
echo HTML::closeTags($html);
Parameters
Returns
string
|
public static
string
|
#
tag( string $name, string $inner = NULL, array $attributes = array(), array $param = array() )
Renders a tag
Parameters
- $name
- Description
- $inner
- Inner HTML
- $attributes
- Tag attributes
- $param
Additional parameters:
$param['prefix'] : Tag prefix
$param['suffix'] : Tag suffix
Returns
string
|
public static
array
|
#
getUnpaired( )
Returns list of unpaired tags as array
Returns list of unpaired tags as array
Returns
array
|
public static
boolean
|
#
isUnpaired( string $name )
Returns TRUE if is unpaired tag
Returns TRUE if is unpaired tag
Parameters
Returns
boolean
|
public static
string
|
#
attrString( string $string )
Returns string ready to put as an attribute of tag
Returns string ready to put as an attribute of tag
$title = Tag::attr_string($title);
Parameters
Returns
string
|
public static
string
|
#
a( mixed $url, string $text = NULL, array $attributes = array(), array $param = array() )
Renders A tag
Parameters
- $url
- Url as string or as route array (see Route::url() documentation)
- $text
- $attributes
- Tag attributes
- $param
Additional parameters (see Html::tag() documentation)
$param['lang']
$param['module']
$param['controller']
$param['action']
$param['params']
$param['url_params']
Returns
string
|
public static
string
|
#
implodeAttributes( array $attributes )
Implode associative array into string of attributes of HTML tag
Implode associative array into string of attributes of HTML tag
Parameters
Returns
string
|
public static
string
|
#
br( integer $x = 1, array $attributes = array(), array $param = array() )
Renders BR tag
Parameters
- $x
- Number of occurrences, default: 1
- $attributes
- Tag attributes
- $param
- Additional parameters (see Html::tag() documentation)
Returns
string
|
public static
string
|
#
__callStatic( string $name, array $arguments, array $param,… )
Parameters
- $name
- $inner Inner HTML
- $arguments
- $attributes Tag attributes
- $param,…
- Additional parameters (see Html::tag() documentation)
Returns
string
|