src/includes/classes/Core/Utils/Email.php
protected function parseAttachments($value): array
    {
        $attachments = []; // Initialize.

        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => $_value) {
                $attachments = array_merge($attachments, $this->parseAttachments($_value));
            } // unset($_key, $_value); // Housekeeping.
            return $attachments;
        }
        $string = (string) $value;

        if (is_file($string)) {
            $attachments[$string] = $string;
        }
        return $attachments;
    }
protected function parseAttachments($value): array
    {
        $attachments = []; // Initialize.

        if (is_array($value) || is_object($value)) {
            foreach ($value as $_key => $_value) {
                $attachments = array_merge($attachments, $this->parseAttachments($_value));
            } // unset($_key, $_value); // Housekeeping.
            return $attachments;
        }
        $string = (string) $value;

        if (is_file($string)) {
            $attachments[$string] = $string;
        }
        return $attachments;
    }
Parse attachments.

@since 151121 Email utilities.

@param mixed $value Any input value w/ attachments.

@return array Unique/associative array of all attachments.