public function testDom() { $html = Html::dom('example', "Lorem Ipsum", array('id' => 'app')); $this->assertEquals('<example id="app">Lorem Ipsum</example>', $html); $html = Html::dom('br'); $this->assertEquals('<br />', $html); }
/** * Create dom element * * @param string $name * @param string $text * @param array $attributes * @return string */ function h($name, $text = '', array $attributes = array()) { return Html::dom($name, $text, $attributes); }
/** * Repeat elements * * @param string $dom * @param array $values * @param array $attributes * @return string */ public static function repeat($dom, array $values, array $attributes = null) { return self::loop($values, function ($value) use($dom, $attributes) { return Html::dom($dom, $value, $attributes); }); }