protected function getAllConsumers()
    {
        $found = [$this];
        do {
            $current = current($found);
            $subConsumers = $current->getSubConsumers();
            foreach ($subConsumers as $consumer) {
                if (!in_array($consumer, $found)) {
                    $found[] = $consumer;
                }
            }
        } while (next($found) !== false);
        return $found;
    }
protected function getAllConsumers()
    {
        $found = [$this];
        do {
            $current = current($found);
            $subConsumers = $current->getSubConsumers();
            foreach ($subConsumers as $consumer) {
                if (!in_array($consumer, $found)) {
                    $found[] = $consumer;
                }
            }
        } while (next($found) !== false);
        return $found;
    }
protected function getAllConsumers ( ) { $ found = [ $ this ] ; do { $ current = current ( $ found ) ; $ subConsumers = $ current -> getSubConsumers ( ) ; foreach ( $ subConsumers as $ consumer ) { if ( ! in_array ( $ consumer , $ found ) ) { $ found [ ] = $ consumer ; } } } while ( next ( $ found ) !== false ) ; return $ found ; }
Returns this consumer and all unique sub consumers.

Loops into the sub-consumers (and their sub-consumers, etc...) finding
all unique consumers, and returns them in an array.

@return \ZBateson\MailMimeParser\Header\AbstractConsumer[]
Returns this consumer and all unique sub consumers .