Stuff
public text v1 · immutableclass htmlConstructor {
function init ( $lang = "" ) {
echo "<html" . (strlen($lang) ? " lang='" . htmlentities($lang) . "'" : "") . ">\n";
}
function contHead ( $contenido = "" ) {
echo "<head>\n" . $contenido . "\n</head>\n";
}
function title ( $titulo = "" ) {
echo "\t<title>" . htmlentities($titulo) . "</title>\n";
}
function end () {
echo "\n</html>";
}
}
$html = new htmlConstructor();
$html->init();
$html->contHead(
$html->title("This is a title");
);
$html->end();