Added comments to HTML class.

This commit is contained in:
Taylor Otwell 2011-07-05 06:58:27 -07:00
parent 181237e9ef
commit 64704cf5c4
1 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,7 @@ public static function email($email)
public static function image($url, $alt = '', $attributes = array())
{
$attributes['alt'] = static::entities($alt);
return '<img src="'.static::entities(URL::to_asset($url)).'"'.static::attributes($attributes).'>';
}
@ -205,6 +206,11 @@ public static function attributes($attributes)
foreach ($attributes as $key => $value)
{
// -------------------------------------------------------
// If the attribute key is numeric, assign the attribute
// value to the key. This allows for attributes such as
// "required", "checked", etc.
// -------------------------------------------------------
if (is_numeric($key))
{
$key = $value;