for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Win\Html;
/**
* Elemento Html
*/
abstract class Html {
/** @var string */
protected $name;
/** @var string[] */
protected $attributes;
/** @return string */
abstract public function html();
* Cria o elemento
* @param string $name
* @param string[] $attributes
public function __construct($name, $attributes) {
$this->name = $name;
$this->attributes = $attributes;
}
protected function attributes() {
$html = '';
foreach ($this->attributes as $name => $value) {
$html .= $name . '="' . $value . '" ';
return $html;
public function __toString() {
return $this->html();