Gets the form method.

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

@return string The method
557829
public function getMethod()
    {
        if (null !== $this->method) {
            return $this->method;
        }

        // If the form was created from a button rather than the form node, check for HTML5 method override
        if ($this->button !== $this->node && $this->button->getAttribute('formmethod')) {
            return strtoupper($this->button->getAttribute('formmethod'));
        }

        return $this->node->getAttribute('method') ? strtoupper($this->node->getAttribute('method')) : 'GET';
    }
388400
def get_form(self, form_class=None):
        """"""
        form = super().get_form(form_class)
        if self._save:
            make_form_or_formset_fields_not_required(form)
        return form
854111
public function getFormName()
    {
        $form = $this->getForm();
        $formName = $form->getName();

        if ($form instanceof FormCollectionInterface) {
            $formName .= '[' . $this->getEntityContainer()->getName() . ']';
        }

        $formName .= '[' . $this->getName() . ']';
        return $formName;
    }
1238863
public function getForm(string $name = '', array $form = null)
    {
        if (!isset($this->_forms[$name])) {
            $this->_forms[$name] = $this->createFormObject($name, $form);
        }

        return $this->_forms[$name];
    }
885437
public HttpMethod getRequestMethod() {
        final Object method = getHeader(HttpMessageHeaders.HTTP_REQUEST_METHOD);

        if (method != null) {
            return HttpMethod.valueOf(method.toString());
        }

        return null;
    }
1343805
private static function getMethodFromInput ()
	{
		// Take the method as found in $_SERVER
		$method = $_SERVER['REQUEST_METHOD'];

		// If it's a HEAD request override it to being GET and prevent any output, as per HTTP Specification
		// @url http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4
		if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {
			ob_start();
			$method = 'GET';
		}

		// If it's a POST request, check for a method override header
		else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
			$headers = self::getHeadersFromInput ();
			if (isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], array('PUT', 'DELETE', 'PATCH'))) {
				$method = $headers['X-HTTP-Method-Override'];
			}
		}

		return $method;
	}
1316019
public function getAction()
    {
        if ($this->action) {
            return $this->action;
        }

        if ($this->isMode(static::MODE_EDIT)) {
            return $this->form->resource().'/'.$this->id;
        }

        if ($this->isMode(static::MODE_CREATE)) {
            return $this->form->resource(-1);
        }

        return '';
    }
815275
public function findFormClassName()
    {
        $this->runIfNotCached(
            'formClassName',
            function () {
                return $this->findFormTag()->attr(self:: FORM_CLASS_NAME_ATTR_NAME);
            }
        );

        return $this->formClassName;
    }
1011045
public static function getMethod() {
    if(null === self::$method) {
      // Make the method upper case.
      self::$method = @strtoupper($_SERVER['REQUEST_METHOD']);

      // A quick-and-dirty test to drop invalid methods.
      if(!self::$method || !ctype_upper(self::$method)) {
        self::$method = '';
      }
    }
    return self::$method;
  }
1159435
public function getMethod() : ?int 
    {
        if ( ! $this->hasMethod()) {
            $this->setMethod($this->getDefaultMethod());
        }
        return $this->method;
    }
443972
public function method()
    {
        $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null;

        if ($method !== 'POST') {
            return $method;
        }

        if (array_key_exists('HTTP_X_HTTP_METHOD', $_SERVER)) {
            if (in_array($_SERVER['HTTP_X_HTTP_METHOD'], ['PUT', 'DELETE'])) {
                $method = $_SERVER['HTTP_X_HTTP_METHOD'];
            }
        }

        return $method;
    }
919313
public function getMethods()
    {
        if (count($this->methods) > 0) {
            return $this->methods;
        }

        $this->addMagicMethods();
        $this->detectMethods();
        return $this->methods;
    }
1116363
public function getMethod()
    {
        if(!isset($this->_method) && isset($_SERVER['REQUEST_METHOD']))
        {
            $method = strtoupper($_SERVER['REQUEST_METHOD']);

            if($method == 'POST')
            {
                if($this->_headers->has('X-Http-Method-Override')) {
                    $method = strtoupper($this->_headers->get('X-Http-Method-Override'));
                }

                if($this->data->has('_method')) {
                    $method = strtoupper($this->data->get('_method', 'alpha'));
                }
            }

            $this->_method = $method;
        }

        return $this->_method;
    }
255707
public function getForm()
    {

        $view = new View();

        return $view->render(__DIR__ . '/../views/ulogin', [
            'widget' => $this->widget,
            'fields' => $this->requiredFields,
            'optional' => $this->optionalFields,
            'providers' => $this->requiredProviders,
            'hidden' => $this->hiddenProviders,
            'url' => $this->url
        ]);

    }
466888
public final String getMethod() {
		if(method == null) {
			method = message instanceof Request ? ((Request) message).getMethod()
				: ((CSeqHeader) message.getHeader(CSeqHeader.NAME)).getMethod();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getMethod - return=" + method);
		}
		return method;
	}
767398
public function get_form() {
		$this->throws_if_locked( 'access' );

		$form = new Form( $this->get_form_config() );

		// Create the field object instance.
		foreach ( $this->prop( 'fields' ) as $args ) {
			$form->add( $this->get_field( $args )->initialize() );
		}

		// Automatically initialize the form if it is configured so.
		if ( $this->get_auto_initialize() ) {
			$form->initialize();
		}

		return $form;
	}
159259
public function getFormId()
    {
        // allowed are a-zA-Z0-9-_:.
        // no spaces

        $form = $this->getForm();
        $formId = $form->getName();

        if ($form instanceof FormCollectionInterface) {
            $formId .= '_' . $this->getEntityContainer()->getName();
        }

        $formId .= '_' . $this->getName();
        return $formId;
    }