public function open($action = null, $method = 'POST', $attributes = array(), $https = null)
{
$method = strtoupper($method);
$attributes['method'] = $this->method($method);
$attributes['action'] = $this->action($action, $https);
// If a character encoding has not been specified in the attributes, we will
// use the default encoding as specified in the variable $encoding above
// for the "accept-charset" attribute.
if (!array_key_exists('accept-charset', $attributes)) {
$attributes['accept-charset'] = $this->encoding;
}
$append = '';
// Since PUT and DELETE methods are not actually supported by HTML forms,
// we'll create a hidden input element that contains the request method
// and set the actual request method variable to POST.
if ($method == 'PUT' or $method == 'DELETE') {
$append = $this->hidden($this->spoofer, $method);
}
return '<form' . $this->html->attributes($attributes) . '>' . $append;
}