You are here

public function Form::getMethod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dom-crawler/Form.php \Symfony\Component\DomCrawler\Form::getMethod()

Gets the form method.

If no method is defined in the form, GET is returned.

Return value

string The method

Overrides Link::getMethod

2 calls to Form::getMethod()
Form::getFiles in vendor/symfony/dom-crawler/Form.php
Gets the file field values.
Form::getUri in vendor/symfony/dom-crawler/Form.php
Gets the URI of the form.

File

vendor/symfony/dom-crawler/Form.php, line 220

Class

Form
Form represents an HTML form.

Namespace

Symfony\Component\DomCrawler

Code

public function getMethod() {
  if (null !== $this->method) {
    return $this->method;
  }
  return $this->node
    ->getAttribute('method') ? strtoupper($this->node
    ->getAttribute('method')) : 'GET';
}