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