src/PartResolverRegistry.php
public function getResolverForPart(EmailPart $part): EmailPartResolver
    {
        $identifier = get_class($part);

        if (!array_key_exists($identifier, $this->resolvers)) {
            throw new InvalidArgumentException(sprintf(
                'Resolver for the part "%s" does not exists. Please choose one of the following: %s',
                $identifier,
                implode(', ', array_keys($this->resolvers))
            ));
        }

        return $this->resolvers[$identifier];
    }
public function getResolverForPart(EmailPart $part): EmailPartResolver
    {
        $identifier = get_class($part);

        if (!array_key_exists($identifier, $this->resolvers)) {
            throw new InvalidArgumentException(sprintf(
                'Resolver for the part "%s" does not exists. Please choose one of the following: %s',
                $identifier,
                implode(', ', array_keys($this->resolvers))
            ));
        }

        return $this->resolvers[$identifier];
    }
public function getResolverForPart ( EmailPart $ part ) : EmailPartResolver { $ identifier = get_class ( $ part ) ; if ( ! array_key_exists ( $ identifier , $ this -> resolvers ) ) { throw new InvalidArgumentException ( sprintf ( 'Resolver for the part "%s" does not exists. Please choose one of the following: %s' , $ identifier , implode ( ', ' , array_keys ( $ this -> resolvers ) ) ) ) ; } return $ this -> resolvers [ $ identifier ] ; }
Get resolver for given email part.

@param EmailPart $part

@return EmailPartResolver
Get resolver for given email part .