SimpleForm::getMethod PHP Method

getMethod() public method

Accessor for method of form submission.
public getMethod ( ) : string
return string Either get or post.
    public function getMethod()
    {
        return $this->method ? strtolower($this->method) : 'get';
    }

Usage Example

 function testFormAttributes()
 {
     $tag = new SimpleFormTag(array('method' => 'GET', 'action' => 'here.php', 'id' => '33'));
     $form = new SimpleForm($tag, $this->page('http://host/a/index.html'));
     $this->assertEqual($form->getMethod(), 'get');
     $this->assertIdentical($form->getId(), '33');
     $this->assertNull($form->getValue(new SimpleByName('a')));
 }
All Usage Examples Of SimpleForm::getMethod