factory() public static method

Static method to instantiate the form object and return itself to facilitate chaining methods together.
public static factory ( string $action = null, string $method = 'post', array $fields = null, string $indent = null ) : Form
$action string
$method string
$fields array
$indent string
return Form
Beispiel #1
0
 public function testConstructor()
 {
     $this->assertInstanceOf('Pop\\Form\\Form', new Form('/submit', 'post'));
     $this->assertInstanceOf('Pop\\Form\\Form', Form::factory('/submit', 'post'));
 }