'.PHP_EOL;
}
/**
* Generate a CSS reference.
*
* @param string $url
* @return string
*/
public static function style($url, $media = 'all')
{
return ''.PHP_EOL;
}
/**
* Generate a HTML link.
*
* @param string $url
* @param string $title
* @param array $attributes
* @param bool $https
* @param bool $asset
* @return string
*/
public static function link($url, $title, $attributes = array(), $https = false, $asset = false)
{
return ''.static::entities($title).'';
}
/**
* Generate a HTTPS HTML link.
*
* @param string $url
* @param string $title
* @param array $attributes
* @return string
*/
public static function link_to_secure($url, $title, $attributes = array())
{
return static::link($url, $title, $attributes, true);
}
/**
* Generate an HTML link to an asset.
*
* @param string $url
* @param string $title
* @param array $attributes
* @return string
*/
public static function link_to_asset($url, $title, $attributes = array())
{
return static::link($url, $title, $attributes, false, true);
}
/**
* Generate an HTML link to a route.
*
* @param string $name
* @param string $title
* @param array $parameters
* @param array $attributes
* @return string
*/
public static function link_to_route($name, $title, $parameters = array(), $attributes = array(), $https = false)
{
return static::link(URL::to_route($name, $parameters, $https), $title, $attributes);
}
/**
* Generate an HTTPS HTML link to a route.
*
* @param string $name
* @param string $title
* @param array $parameters
* @param array $attributes
* @return string
*/
public static function link_to_secure_route($name, $title, $parameters = array(), $attributes = array())
{
return static::link_to_route($name, $title, $parameters, $attributes, true);
}
/**
* Generate an HTML mailto link.
*
* @param string $email
* @param string $title
* @param array $attributes
* @return string
*/
public static function mailto($email, $title = null, $attributes = array())
{
$email = static::email($email);
if (is_null($title))
{
$title = $email;
}
return ''.static::entities($title).'';
}
/**
* Obfuscate an e-mail address to prevent spam-bots from sniffing it.
*
* @param string $email
* @return string
*/
public static function email($email)
{
return str_replace('@', '@', static::obfuscate($email));
}
/**
* Generate an HTML image.
*
* @param string $url
* @param string $alt
* @param array $attributes
* @return string
*/
public static function image($url, $alt = '', $attributes = array())
{
$attributes['alt'] = static::entities($alt);
return '';
}
/**
* Generate HTML breaks.
*
* @param int $count
* @return string
*/
public static function breaks($count = 1)
{
return str_repeat('
', $count);
}
/**
* Generate non-breaking spaces.
*
* @param int $count
* @return string
*/
public static function spaces($count = 1)
{
return str_repeat(' ', $count);
}
/**
* Generate an ordered list.
*
* @param array $list
* @param array $attributes
* @return string
*/
public static function ol($list, $attributes = array())
{
return static::list_elements('ol', $list, $attributes);
}
/**
* Generate an un-ordered list.
*
* @param array $list
* @param array $attributes
* @return string
*/
public static function ul($list, $attributes = array())
{
return static::list_elements('ul', $list, $attributes);
}
/**
* Generate an ordered or un-ordered list.
*
* @param string $type
* @param array $list
* @param array $attributes
* @return string
*/
private static function list_elements($type, $list, $attributes)
{
$html = '';
foreach ($list as $key => $value)
{
$html .= '