public function matches(Pattern $pattern) { return (bool) preg_match((string) $pattern, $this->getSubject()); }