Return's the input method used (GET, POST, DELETE, etc.)

@return  string
426578
public static function method($default = 'GET')
	{
		// get the method from the current active request
		if ($request = \Request::active() and $method = $request->get_method())
		{
			return $method;
		}

		// if called before a request is active, fall back to the global server setting
		if (\Config::get('security.allow_x_headers', false))
		{
			return \Input::server('HTTP_X_HTTP_METHOD_OVERRIDE', \Input::server('REQUEST_METHOD', $default));
		}
		else
		{
			return \Input::server('REQUEST_METHOD', $default);
		}
	}
148627
public function getHttpMethod()
    {
        switch ($this->method) {
            case Method::LINK:
                return Method::POST;
            case Method::UNLINK:
                return Method::DELETE;

            default:
                return $this->method;
        }
    }
485651
public function input($name=null, $default=null)
    {
        if (!$name) {
            return $this->getRequestParams();
        } else {
            $method = $name2 = null;
            $name = str_replace('.', ':', $name);
            if (($pos = strpos($name, ':')) !== false) {
                $names = explode(':', $name);
                $method = strtoupper(trim($names[0]));
                if (in_array($method, ['GET', 'POST', 'OPTION', 'DELETE', 'PUT'])) {
                    $name = trim($names[1]);
                    if (isset($names[2])) {
                        $name2 = trim($names[2]);
                    }
                } else {
                    $method = null;
                    $name = trim($names[0]);
                    $name2 = trim($names[1]);
                }
            } elseif (strtoupper($name) == 'GET' || strtoupper($name) == 'POST') {
                $method = strtoupper($name);
                $name = null;
            }
            
            if ($name === '*') {
                $name = null;
            }
            
            switch ($method) {
                case 'GET':
                    if ($name2) {
                        return isset($this->getQueryParam()[$name][$name2]) ? $this->getQueryParam()[$name][$name2] : $default;
                    } else {
                        return $name ? $this->getQueryParam($name, $default) : $this->getQueryParams();
                    }
                    break;
                case 'POST':
                    if ($name2) {
                        return isset($this->getPostParams()[$name][$name2]) ? $this->getPostParams()[$name][$name2] : $default;
                    } else {
                        return $name ? (isset($this->getPostParams()[$name]) ? $this->getPostParams()[$name] : $default) : $this->getPostParams();
                    }
                    break;
                default:
                    if ($name2) {
                        return isset($this->getRequestParams()[$name][$name2]) ? $this->getRequestParams()[$name][$name2] : $default;
                    } else {
                        return $name ? (isset($this->getRequestParams()[$name]) ? $this->getRequestParams()[$name] : $default) : $this->getRequestParams();
                    }
                    break;
            }
        }
    }
218004
public function usageHelp()
    {
        $help = 'Available actions: ' . "\n";
        $methods = get_class_methods($this);
        foreach ($methods as $method) {
            if (substr($method, -6) == 'Action') {
                $help .= '    --action ' . substr($method, 0, -6);
                $helpMethod = $method . 'Help';
                if (method_exists($this, $helpMethod)) {
                    $help .= ' ' . $this->$helpMethod();
                }
                $help .= "\n";
            }
        }
        return $help;
    }
248854
public function getInput()
    {
        if (is_null($this->_input)) {
            $this->_input = new Input($this->getName());
        }
        return $this->_input;
    }
284073
public function getRequestInputByType()
    {
        $data = $this->instance->getRealMethod() == 'GET' ? HttpFoundation::createFromGlobals()->query :
            HttpFoundation::createFromGlobals()->request;

        if ($data) {
            foreach ($data->all() as $key => $value) {
                session()->createFlashMessage($key, $value);
            }

            session()->createFlashMessage('request', $data);
        }

        return $data;
    }
1277669
public function input() {

		$input = '<select ' . $this->build_attributes() . ' data-default="' . esc_attr( $this->get_value() ) . '">';

		if ( ! isset( $this->struct['value'] ) ) {
			$input .= '<option></option>';
		}

		$input .= $this->build_options();

		$input .= '</select>';

		return $input;
	}
702112
public function getMethod() :? int
  {
    switch($this->server('REQUEST_METHOD')) {
      case 'GET':
        return self::HTTP_GET;
      case 'POST':
        return self::HTTP_POST;
      case 'HEAD':
        return self::HTTP_HEAD;
      case 'PUT':
        return self::HTTP_PUT;
      case 'DELETE':
        return self::HTTP_DELETE;
      case 'TRACE':
        return self::HTTP_TRACE;
      case 'OPTIONS':
        return self::HTTP_OPTIONS;
      case 'CONNECT':
        return self::HTTP_CONNECT;
    }

    return null;
  }
1269571
private function input() {
		if ($this->input===null) {
			$this->input=new ValidationInputOne($this->prefix,$this->messageList); // we used the same message list
		}
		return $this->input;
	}
1059644
public function input($fieldName)
    {
        if ($this->isMethod('post')) {
            return (isset($_POST[$fieldName])) ? $_POST[$fieldName] : '';
        }

        if ($this->isMethod('get')) {
            return (isset($_GET[$fieldName])) ? $_GET[$fieldName] : '';
        }

        if ($this->isMethod('put')) {
            parse_str(file_get_contents("php://input"), $PUT);

            return (isset($PUT[$fieldName])) ? $PUT[$fieldName] : '';
        }

        if ($this->isMethod('patch')) {
            parse_str(file_get_contents("php://input"), $PATCH);

            return (isset($PATCH[$fieldName])) ? $PATCH[$fieldName] : '';
        }

        if ($this->isMethod('delete')) {
            parse_str(file_get_contents("php://input"), $DELETE);

            return (isset($DELETE[$fieldName])) ? $DELETE[$fieldName] : '';
        }
    }
832708
public function input_get($params) {
        $index = isset($params['index']) ? $params['index'] : null;
        $default = isset($params['default']) ? $params['default'] : null;
        return Input::get($index, $default);
    }
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;
    }
770365
public function getMethod()
    {
        if (isset($this->swooleRequest->post[$this->methodParam])) {
            return strtoupper($this->swooleRequest->post[$this->methodParam]);
        }

        if (isset($this->swooleRequest->server['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            return strtoupper($this->swooleRequest->server['HTTP_X_HTTP_METHOD_OVERRIDE']);
        }

        if (isset($this->swooleRequest->server['REQUEST_METHOD'])) {
            return strtoupper($this->swooleRequest->server['REQUEST_METHOD']);
        }

        return 'GET';
    }
489745
protected function getInputSource()
    {
        if ($this->isJson()) {
            return $this->json();
        }

        return in_array($this->getRealMethod(), ['GET', 'HEAD']) ? $this->query : $this->request;
    }
291759
protected function _readInput()
    {
        if (empty($this->_input)) {
            $fh = fopen('php://input', 'rb');
            $content = stream_get_contents($fh);
            fclose($fh);
            $this->_input = $content;
        }

        return $this->_input;
    }
787360
protected function getInput()
	{
		// Initialize some field attributes.
		$attributes = array(
			'type'         => 'text',
			'name'         => $this->name,
			'id'           => $this->id,
			'class'        => ($this->element['class']     ? (string) $this->element['class']  : ''),
			'cols'         => ($this->element['cols'] ? (int) $this->element['cols'] : ''),
			'rows'         => ($this->element['rows'] ? (int) $this->element['rows'] : ''),
			'disabled'     => ((string) $this->element['disabled'] == 'true'    ? 'disabled' : ''),
			'onchange'     => ($this->element['onchange']  ? (string) $this->element['onchange'] : '')
		);

		$attr = array();
		foreach ($attributes as $key => $value)
		{
			if (!$value)
			{
				continue;
			}

			$attr[] = $key . '="' . $value . '"';
		}
		$attr = implode(' ', $attr);

		return '<textarea ' . $attr . '>' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '</textarea>';
	}
1340638
protected function getCommandInput()
    {
        $input = new ResourceInput(Config::getDefaultMapperFileName());
        $input->viewsDirectory = trim($this->option('views-directory'));
        $input->perPage = intval($this->option('models-per-page'));
        $input->formRequest = $this->option('with-form-request');
        $input->controllerDirectory = $this->option('controller-directory');
        $input->controllerExtends = $this->option('controller-extends') ?: null;
        $input->withMigration = $this->option('with-migration');
        $input->force = $this->option('force');
        $input->modelDirectory = $this->option('model-directory');
        $input->primaryKey = $this->option('primary-key');
        $input->withSoftDelete = $this->option('with-soft-delete');
        $input->withoutTimeStamps = $this->option('without-timestamps');
        $input->connectionName = $this->option('connection-name');
        $input->engineName = $this->option('engine-name');
        $input->template = $this->getTemplateName();
        $input->layoutName = $this->option('layout-name') ?: 'layouts.app';
        $input->tableExists = $this->option('table-exists');
        $input->translationFor = $this->option('translation-for');
        $input->withAuth = $this->option('with-auth');
        $input->formRequestDirectory = $this->option('form-request-directory');

        return $input;
    }