class AttachmentUtils (View source)

Stampie Attachment utility functions

Methods

static array
processAttachments(array $attachments)

Applies a function to each attachment, and finds a unique name for any conflicting names

static string
findUniqueName(string $name, array $claimed)

No description

Details

static array processAttachments(array $attachments)

Applies a function to each attachment, and finds a unique name for any conflicting names

Parameters

array $attachments

Return Value

array

Exceptions

InvalidArgumentException

static string findUniqueName(string $name, array $claimed)

Parameters

string $name The name to make unique
array $claimed Names already in use to avoid

Return Value

string A unique name