public function saveAttachments(
        $attach_dir,
        $include_inline = true,
        $filenameStrategy = self::ATTACHMENT_DUPLICATE_SUFFIX
    ) {
        $attachments = $this->getAttachments($include_inline);

        $attachments_paths = [];
        foreach ($attachments as $attachment) {
            $attachments_paths[] = $attachment->save($attach_dir, $filenameStrategy);
        }

        return $attachments_paths;
    }
public function saveAttachments(
        $attach_dir,
        $include_inline = true,
        $filenameStrategy = self::ATTACHMENT_DUPLICATE_SUFFIX
    ) {
        $attachments = $this->getAttachments($include_inline);

        $attachments_paths = [];
        foreach ($attachments as $attachment) {
            $attachments_paths[] = $attachment->save($attach_dir, $filenameStrategy);
        }

        return $attachments_paths;
    }
public function saveAttachments ( $ attach_dir , $ include_inline = true , $ filenameStrategy = self :: ATTACHMENT_DUPLICATE_SUFFIX ) { $ attachments = $ this -> getAttachments ( $ include_inline ) ; $ attachments_paths = [ ] ; foreach ( $ attachments as $ attachment ) { $ attachments_paths [ ] = $ attachment -> save ( $ attach_dir , $ filenameStrategy ) ; } return $ attachments_paths ; }
Save attachments in a folder

@param string $attach_dir directory
@param bool $include_inline
@param string $filenameStrategy How to generate attachment filenames

@return array Saved attachments paths
@throws Exception
Save attachments in a folder