private function match($pattern, $name) { return $pattern !== '' ? (bool) preg_match($pattern, $name) : true; }