public function canMatch($pattern) { return is_string($pattern) && 0 !== preg_match_all(self::MATCH_PATTERN, $pattern, $matches); }