matchers = $matchers; } protected function generateMatches( ComponentValueList $values, $start, array $options ) { $used = []; foreach ( $this->matchers as $matcher ) { foreach ( $matcher->generateMatches( $values, $start, $options ) as $match ) { $newMatch = $this->makeMatch( $values, $start, $match->getNext(), $match ); $mid = $newMatch->getUniqueID(); if ( !isset( $used[$mid] ) ) { $used[$mid] = 1; yield $newMatch; } } } } }