private function patternMatchView($pattern, $str) { return preg_match($pattern, $str, $matches) ? true : false; }