public function getSubReceivedConsumer($partName)
    {
        if (empty($this->receivedConsumers[$partName])) {
            $consumer = null;
            if ($partName === 'from' || $partName === 'by') {
                $consumer = new DomainConsumer($this, $this->partFactory, $partName);
            } else if ($partName === 'date') {
                $consumer = new ReceivedDateConsumer($this, $this->partFactory);
            } else {
                $consumer = new GenericReceivedConsumer($this, $this->partFactory, $partName);
            }
            $this->receivedConsumers[$partName] = $consumer;
        }
        return $this->receivedConsumers[$partName];
    }
public function getSubReceivedConsumer($partName)
    {
        if (empty($this->receivedConsumers[$partName])) {
            $consumer = null;
            if ($partName === 'from' || $partName === 'by') {
                $consumer = new DomainConsumer($this, $this->partFactory, $partName);
            } else if ($partName === 'date') {
                $consumer = new ReceivedDateConsumer($this, $this->partFactory);
            } else {
                $consumer = new GenericReceivedConsumer($this, $this->partFactory, $partName);
            }
            $this->receivedConsumers[$partName] = $consumer;
        }
        return $this->receivedConsumers[$partName];
    }
public function getSubReceivedConsumer ( $ partName ) { if ( empty ( $ this -> receivedConsumers [ $ partName ] ) ) { $ consumer = null ; if ( $ partName === 'from' || $ partName === 'by' ) { $ consumer = new DomainConsumer ( $ this , $ this -> partFactory , $ partName ) ; } else if ( $ partName === 'date' ) { $ consumer = new ReceivedDateConsumer ( $ this , $ this -> partFactory ) ; } else { $ consumer = new GenericReceivedConsumer ( $ this , $ this -> partFactory , $ partName ) ; } $ this -> receivedConsumers [ $ partName ] = $ consumer ; } return $ this -> receivedConsumers [ $ partName ] ; }
Returns the consumer instance corresponding to the passed part name of a
Received header.

@param string $partName
@return \ZBateson\MailMimeParser\Header\Consumer\Received\FromConsumer
Returns the consumer instance corresponding to the passed part name of a Received header .