protected function getRequestMethod($timing)
    {
        $timing = ltrim($timing);
        preg_match('/^([a-zA-z]*)/', $timing, $matches);

        return count($matches) ? $matches[0] : '';
    }
protected function getRequestMethod($timing)
    {
        $timing = ltrim($timing);
        preg_match('/^([a-zA-z]*)/', $timing, $matches);

        return count($matches) ? $matches[0] : '';
    }
protected function getRequestMethod ( $ timing ) { $ timing = ltrim ( $ timing ) ; preg_match ( '/^([a-zA-z]*)/' , $ timing , $ matches ) ; return count ( $ matches ) ? $ matches [ 0 ] : '' ; }
Returns HTTP request method.

@param string $timing timing procedure string
@return string request method such as GET, POST, PUT, etc.
Returns HTTP request method .