class Form
{
....
function open() {
$csrf = $_SESSION['_csrf'];
$str = "action}\" method=\"POST\" accept-charset=\"utf-8\">";
$str .= "";
$str .= "method\">";
return $str;
}
function close() {
return '
';
}
function text($name) {
return new \App\Field($name, $this);
}
}
"Forms: Best Practices" by Kevin Dees // TypeRocket // Robojuice