Resources\Uri::getMethod PHP Method

getMethod() public method

Get method name from the url.
public getMethod ( $default = 'index' ) : string
return string
    public function getMethod($default = 'index')
    {
        $uriString = $this->path(1);
        if (isset($uriString) && !empty($uriString)) {
            if ($this->stripUriString($uriString)) {
                return $uriString;
            }
            return '';
        }
        return $default;
    }