Get string with method type.
@return string
769764
protected function toStringFunction()
    {
        $string = ($this->isFinal() ? 'final ' : '')
            . ($this->isAbstract() ? 'abstract ' : '')
            . $this->getVisibility() . ' '
            . ($this->isStatic() ? 'static ' : '')
            . 'function ';

        return $string;
    }
511399
public function getType() : ?string 
    {
        if ( ! $this->hasType()) {
            $this->setType($this->getDefaultType());
        }
        return $this->type;
    }
210926
public function getFormattedString()
    {
        $string = (string) $this->code;

        if (null !== $this->message) {
            $string = $string . ' ' . $this->message;
        }

        return $string;
    }
381991
public function stringify(): string
    {
        if ($this->isConvertibleToString()) {
            return (string) $this->getValue();
        }

        if ($this->isHashable()) {
            return (string) $this->getValue()->hash();
        }

        return $this->getTypeName();
    }
53445
private function getMethods($methods)
    {
        $methods = $methods ?? $this->methods;

        if (is_string($methods))
            $methods = (array) $methods;

        return is_array($methods) ? array_map('strtoupper', $methods) : [];
    }
1069554
public function getMethod()
    {
        // method in request.
        if ($method = $this->get('_method')) {
            return strtoupper($method);
        }

        $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
        return strtoupper($method);
    }
730055
protected function getElementType()
    {
        $class   = $this->getElementClass($this);
        $parts   = explode('\\', $class);
        $type    = end($parts);
        $replace = '$1_$2';

        return ctype_lower($type) ? $type : strtolower(preg_replace('/(.)([A-Z])/', $replace, $type));
    }
237171
private function getMethod()
    {
        if (is_array($this->handler) && 2 === sizeof($this->handler)) {
            return $this->handler[1];
        }

        if ($this->isStaticMethod()) {
            list (, $method) = explode('::', $this->handler);

            return $method;
        }

        return '';
    }
57113
protected static function getReturnType(\ReflectionMethod $method) : string
    {
        if ($method->getReturnType()->isBuiltin()) {
            return (string)$method->getReturnType();
        } else {
            $type = (string)$method->getReturnType();
            return '\\' . ($type === 'self' ? $method->getDeclaringClass()->getName() : $type);
        }
    }
250946
public function getMethods()
    {
        if (!$this->__methods)
        {
            $methods = array();

            $reflection = new \ReflectionClass($this);
            foreach ($reflection->getMethods() as $method) {
                $methods[$method->name] = $method->name;
            }

            $this->__methods = $methods;
        }

        return $this->__methods;
    }
1319670
public function getCompiled()
    {
        if ($this->compiled === null) {
            $regexp = "/^";

            // Method(s)
            $methodIdx = 0;
            foreach($this->methods as $method) {
                $regexp .= "(?:" . strtoupper($method) . ")";
                if (($methodIdx + 1) < count($this->methods)) {
                    $regexp .= "|";
                }
                $methodIdx++;
            }

            // Separator
            $regexp .= "~";

            // Url
            $regexp .= str_replace('/', '\/', $this->match);

            $regexp .= "$/";

            $this->compiled = $regexp;
        }
        return $this->compiled;
    }
1282414
public function toString()
    {
        if ($this->isEmpty()) {
            return '';
        }

        $traitNames = $this->toArray();
        $tabulationFormatted = $this->getTabulationFormatted();

        $compositionMethods = ';' . PHP_EOL;
        if (!$this->getMethods()->isEmpty()) {
            $compositionMethods = ' ' . $this->getMethods()->toString();
        }

        return $tabulationFormatted . 'use ' . implode(', ', $traitNames) . $compositionMethods;
    }
455219
function getType()
    {
        if($this->_type) {
            return $this->_type;
        }
        else {
            $myclass = get_class($this);
            return strtolower(substr($myclass, strrpos($myclass, '\\') + 1, -5));
        }
    }
359222
public function getMethod()
    {
        // Get actual request method
        $method = $this->env->get('REQUEST_METHOD');
        $methodOverride = $this->headers->get('HTTP_X_HTTP_METHOD_OVERRIDE');

        // Detect method override (by HTTP header or POST parameter)
        if (!empty($methodOverride)) {
            $method = strtoupper($methodOverride);
        } else if ($method === static::METHOD_POST) {
            $customMethod = $this->post(static::METHOD_OVERRIDE, false);
            if ($customMethod !== false) {
                $method = strtoupper($customMethod);
            }
        }

        return $method;
    }
582063
public function getMethodNameGet()
    {
        $methodName = str_replace(' ', '', ucwords(str_replace(array(
            '_is_', '_has_', '_in_', '_',
        ), ' ', strtolower($this->getName(true)))));

        $type = $this->getType();

        switch (true) {
            case ($type instanceof Type\TypeBool) && stripos($this->getName(), '_has_') !== false:
                $methodPrefix = 'has';
                break;
            case ($type instanceof Type\TypeBool) && stripos($this->getName(), '_is_') !== false:
                $methodPrefix = 'is';
                break;
            case ($type instanceof Type\TypeBool) && stripos($this->getName(), '_in_') !== false:
                $methodPrefix = 'in';
                break;
            default:
                $methodPrefix = 'get';
                break;
        }

        return $methodPrefix . $methodName;
    }
741799
public static function get_method() {
	if (empty($_SERVER['REQUEST_METHOD'])) {
		return 'GET';
	}
	
	$allowed_methods = ['GET', 'PUT', 'POST', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD'];
	if (in_array($_SERVER['REQUEST_METHOD'], $allowed_methods) == false) {
		return false;
	}
	
	return $_SERVER['REQUEST_METHOD'];
}
694060
protected function _getMethodNameForType($type = null) {
		$result = '_getValueForString';
		if (empty($type)) {
			return $result;
		}

		$type = mb_strtolower($type);
		$methodName = '_getValueFor' . Inflector::camelize($type);
		if (method_exists($this, $methodName)) {
			$result = $methodName;
		}

		return $result;
	}