<commit_before><?php

namespace Reborn\Util;

/**
 * Html Tag Helper class
 *
 * @package Reborn\Util
 * @author <NAME> Web Development Team
 **/
class Html
{

	/**
	 * Single(< />) tag lists
	 *
	 * @var array
	 **/
	protected static $singleTags = array('input', 'hr', 'br', 'img', 'base', 'link', 'meta');

	/**
	 * HTML Anchor Tag. (<a>Title</a>)
	 *
	 * @param string $url
	 * @param string $text a tag's text (<a>$text</a>)
	 * @param array $options
	 * @return string
	 **/
	public static function a($url, $text = null, $options = array())
	{
		if ('@admin' == substr($url, 0, 6)) {
			$url = adminUrl(ltrim(substr($url, 6), '/'));
		} elseif (false == strpos($url, 'http')) {
			$url = rbUrl($url);
		}

		$options['href'] = $url;

		if (is_null($text)) {
			$text = $url;
		}

		return static::tag('a', $text, $options);
	}

	/**
	 * HTML Anchor Tag for mailto. (<a href="mailto:">Title</a>)
	 *
	 * @param string $address
	 * @param string $text a tag's text (<a>$text</a>)
	 * @param array $options
	 * @return string
	 **/
	public static function mailto($address, $text = null, $options = array())
	{
		$options['href'] = 'mailto:'.$address;

		if (is_null($text)) {
			$text = $address;
		}

		return static::tag('a', $text, $options);
	}

	/**
	 * HTML Unorder List Tag. (<ul>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function ul($lists_array, $options = array())
	{
		$lists = static::li($lists_array);

		return static::tag('ul', "\n".$lists."\n", $options);
	}

	/**
	 * HTML Order List Tag. (<ol>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function ol($lists_array, $options = array())
	{
		$lists = static::li($lists_array);

		return static::tag('ol', "\n".$lists."\n", $options);
	}

	/**
	 * HTML List Tag. (<li>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function li($list_array, $options = array())
	{
		$list = '';

		foreach ($list_array as $li) {
			$list .= static::tag('li', "\n".$li."\n", $options);
		}
		return $list;
	}

	/**
	 * HTML base Tag. (<base href="#">)
	 *
	 * @param string $href
	 * @return string
	 **/
	public static function base($href)
	{
		return static::tag('base', '', array('href' => $href) );
	}

	/**
	 * HTML Header Tag. (<ul>)
	 *
	 * @param string $head (h1, h2, h3, h4, h5 or h6)
	 * @param string $content
	 * @param array $options
	 * @return string
	 **/
	public static function header($head = 'h1', $content, $options = array())
	{
		return static::tag($head, $content, $options);
	}

	/**
	 * HTML br Tag. (<br />)
	 *
	 * @param int $repeat<commit_msg>Add meta Tag in Html Class.<commit_after><?php

namespace Reborn\Util;

/**
 * Html Tag Helper class
 *
 * @package Reborn\Util
 * @author Myanmar Links Web Development Team
 **/
class Html
{

	/**
	 * Single(< />) tag lists
	 *
	 * @var array
	 **/
	protected static $singleTags = array('input', 'hr', 'br', 'img', 'base', 'link', 'meta');

	/**
	 * HTML Anchor Tag. (<a>Title</a>)
	 *
	 * @param string $url
	 * @param string $text a tag's text (<a>$text</a>)
	 * @param array $options
	 * @return string
	 **/
	public static function a($url, $text = null, $options = array())
	{
		if ('@admin' == substr($url, 0, 6)) {
			$url = adminUrl(ltrim(substr($url, 6), '/'));
		} elseif (false == strpos($url, 'http')) {
			$url = rbUrl($url);
		}

		$options['href'] = $url;

		if (is_null($text)) {
			$text = $url;
		}

		return static::tag('a', $text, $options);
	}

	/**
	 * HTML Anchor Tag for mailto. (<a href="mailto:">Title</a>)
	 *
	 * @param string $address
	 * @param string $text a tag's text (<a>$text</a>)
	 * @param array $options
	 * @return string
	 **/
	public static function mailto($address, $text = null, $options = array())
	{
		$options['href'] = 'mailto:'.$address;

		if (is_null($text)) {
			$text = $address;
		}

		return static::tag('a', $text, $options);
	}

	/**
	 * HTML Unorder List Tag. (<ul>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function ul($lists_array, $options = array())
	{
		$lists = static::li($lists_array);

		return static::tag('ul', "\n".$lists."\n", $options);
	}

	/**
	 * HTML Order List Tag. (<ol>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function ol($lists_array, $options = array())
	{
		$lists = static::li($lists_array);

		return static::tag('ol', "\n".$lists."\n", $options);
	}

	/**
	 * HTML List Tag. (<li>)
	 *
	 * @param array $lists_array
	 * @param array $options
	 * @return string
	 **/
	public static function li($list_array, $options = array())
	{
		$list = '';

		foreach ($list_array as $li) {
			$list .= static::tag('li', "\n".$li."\n", $options);
		}
		return $list;
	}

	/**
	 * HTML base Tag. (<base href="#">)
	 *
	 * @param string $href
	 * @return string
	 **/
	public static function base($href)
	{
		return static::tag('base', '', array('href' => $href) );
	}

	/**
	 * HTML meta Tag. (<meta name="keywords" content="Reborncms, Myanmar, CMS" >)
	 *
	 * @param string $name Meta tag name
	 * @param string $content Meta tag content
	 * @return string
	 **/
	public static function meta($name, $content)
	{
		return static::tag('meta', '', array('name' => $name, 'content' => $content));
	}

	/**
	 * HTML Header Tag. (<ul>)
	 *
	 * @param string $head (h1, h2, h3, h4, h5 or h6)
	 * @param string $content
	 * @param array $options
	 * @return string
	 **/
	public static function header($head = 'h1', $content, $options = array())
	{
		return static::tag($head, $content, $options);
	}

	/**
	 * HTML br Tag. (<br />)
	 *
	 * @param int $repeat
{'fraction_non_alphanumeric': 0.20980118590861527, 'fraction_numerical': 0.003487966515521451, 'mean_word_length': 3.21071953010279, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3936936', 'n_tokens_mistral': 2243, 'n_tokens_neox': 1995, 'n_words': 558}