-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm.php
More file actions
32 lines (23 loc) · 700 Bytes
/
Form.php
File metadata and controls
32 lines (23 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Onimla\HTML;
#require_once 'Element.class.php';
class Form extends Element {
public function __construct($method = FALSE, $action = FALSE) {
parent::__construct('form');
$this->action($action);
$this->method($method);
$this->selfClose(FALSE);
}
public function action($url = FALSE) {
if ($url === FALSE) {
return $this->attr(__FUNCTION__);
}
return $this->attr(__FUNCTION__, $url);
}
public function method($value = FALSE) {
if ($value === FALSE) {
return $this->attr(__FUNCTION__);
}
return $this->attr(__FUNCTION__, $value);
}
}