Jyxo\Mail\Parser::getMime PHP Method

getMime() public method

Returns a list of part Ids of given types.
public getMime ( array $types ) : array
$types array Part types
return array
    public function getMime(array $types) : array
    {
        try {
            $this->checkIfParsed();
        } catch (\Jyxo\Mail\Parser\EmailNotExistException $e) {
            throw $e;
        }
        $parts = [];
        if (is_array($this->structure['ftype'])) {
            foreach ($types as $type) {
                foreach (array_keys($this->structure['ftype'], $type) as $key) {
                    $parts[] = $this->structure['pid'][$key];
                }
            }
        }
        return $parts;
    }