MessageQueryInterface
interface MessageQueryInterface mixin ImapQueryBuilder (View source)
Methods
Don't mark messages as read when fetching.
Mark all messages as read when fetching.
Set the limit and page for the current query.
Get the set fetch limit.
Set the fetch limit.
Get the set page.
Set the page.
Determine if the body of messages is being fetched.
Determine if the flags of messages is being fetched.
Determine if the headers of messages is being fetched.
Determine if the size of messages is being fetched.
Determine if the body structure of messages is being fetched.
Fetch the flags of messages.
Fetch the body of messages.
Fetch the headers of messages.
Fetch the size of messages.
Fetch the body structure of messages.
Don't fetch the body of messages.
Don't fetch the headers of messages.
Don't fetch the flags of messages.
Don't fetch the size of messages.
Don't fetch the body structure of messages.
Set the fetch order.
Get the fetch order.
Set the fetch order to 'ascending'.
Set the fetch order to 'descending'.
Set the fetch order to show oldest messages first (ascending).
Set the fetch order to show newest messages first (descending).
Set the sort key for server-side sorting (RFC 5256).
Get the sort key for server-side sorting.
Set the sort direction for server-side sorting.
Get the sort direction for server-side sorting.
Sort messages by a field using server-side sorting (RFC 5256).
Sort messages by a field in descending order using server-side sorting.
Count all available messages matching the current search criteria.
Get the first message in the resulting collection.
Get the first message in the resulting collection or throw an exception.
Get the messages matching the current query.
Append a new message to the folder.
Execute a callback over each message via a chunked query.
Execute a callback over each chunk of messages.
Paginate the current query.
Find a message by the given identifier type or throw an exception.
Find a message by the given identifier type.
Destroy the given messages.
Add or remove a flag from all messages matching the current query.
Mark all messages matching the current query as read.
Mark all messages matching the current query as unread.
Mark all messages matching the current query as flagged.
Unmark all messages matching the current query as flagged.
Delete all messages matching the current query.
Move all messages matching the current query to the given folder.
Copy all messages matching the current query to the given folder.
Details
MessageQueryInterface
leaveUnread()
Don't mark messages as read when fetching.
MessageQueryInterface
markAsRead()
Mark all messages as read when fetching.
MessageQueryInterface
limit(int $limit, int $page = 1)
Set the limit and page for the current query.
int|null
getLimit()
Get the set fetch limit.
MessageQueryInterface
setLimit(int $limit)
Set the fetch limit.
int
getPage()
Get the set page.
MessageQueryInterface
setPage(int $page)
Set the page.
bool
isFetchingBody()
Determine if the body of messages is being fetched.
bool
isFetchingFlags()
Determine if the flags of messages is being fetched.
bool
isFetchingHeaders()
Determine if the headers of messages is being fetched.
bool
isFetchingSize()
Determine if the size of messages is being fetched.
bool
isFetchingBodyStructure()
Determine if the body structure of messages is being fetched.
MessageQueryInterface
withFlags()
Fetch the flags of messages.
MessageQueryInterface
withBody()
Fetch the body of messages.
MessageQueryInterface
withHeaders()
Fetch the headers of messages.
MessageQueryInterface
withSize()
Fetch the size of messages.
MessageQueryInterface
withBodyStructure()
Fetch the body structure of messages.
MessageQueryInterface
withoutBody()
Don't fetch the body of messages.
MessageQueryInterface
withoutHeaders()
Don't fetch the headers of messages.
MessageQueryInterface
withoutFlags()
Don't fetch the flags of messages.
MessageQueryInterface
withoutSize()
Don't fetch the size of messages.
MessageQueryInterface
withoutBodyStructure()
Don't fetch the body structure of messages.
MessageQueryInterface
setFetchOrder(string $fetchOrder)
Set the fetch order.
string
getFetchOrder()
Get the fetch order.
MessageQueryInterface
setFetchOrderAsc()
Set the fetch order to 'ascending'.
MessageQueryInterface
setFetchOrderDesc()
Set the fetch order to 'descending'.
MessageQueryInterface
oldest()
Set the fetch order to show oldest messages first (ascending).
MessageQueryInterface
newest()
Set the fetch order to show newest messages first (descending).
MessageQueryInterface
setSortKey(ImapSortKey|string|null $key)
Set the sort key for server-side sorting (RFC 5256).
ImapSortKey|null
getSortKey()
Get the sort key for server-side sorting.
MessageQueryInterface
setSortDirection(string $direction)
Set the sort direction for server-side sorting.
string
getSortDirection()
Get the sort direction for server-side sorting.
MessageQueryInterface
sortBy(ImapSortKey|string $key, string $direction = 'asc')
Sort messages by a field using server-side sorting (RFC 5256).
MessageQueryInterface
sortByDesc(ImapSortKey|string $key)
Sort messages by a field in descending order using server-side sorting.
int
count()
Count all available messages matching the current search criteria.
MessageInterface|null
first()
Get the first message in the resulting collection.
MessageInterface
firstOrFail()
Get the first message in the resulting collection or throw an exception.
MessageCollection
get()
Get the messages matching the current query.
int
append(string $message, mixed $flags = null)
Append a new message to the folder.
void
each(callable $callback, int $chunkSize = 10, int $startChunk = 1)
Execute a callback over each message via a chunked query.
void
chunk(callable $callback, int $chunkSize = 10, int $startChunk = 1)
Execute a callback over each chunk of messages.
LengthAwarePaginator
paginate(int $perPage = 5, $page = null, string $pageName = 'page')
Paginate the current query.
MessageInterface
findOrFail(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)
Find a message by the given identifier type or throw an exception.
MessageInterface|null
find(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)
Find a message by the given identifier type.
void
destroy(array|int $uids, bool $expunge = false)
Destroy the given messages.
int
flag(BackedEnum|string $flag, string $operation, bool $expunge = false)
Add or remove a flag from all messages matching the current query.
int
markRead()
Mark all messages matching the current query as read.
int
markUnread()
Mark all messages matching the current query as unread.
int
markFlagged()
Mark all messages matching the current query as flagged.
int
unmarkFlagged()
Unmark all messages matching the current query as flagged.
int
delete(bool $expunge = false)
Delete all messages matching the current query.
int
move(string $folder, bool $expunge = false)
Move all messages matching the current query to the given folder.
int
copy(string $folder)
Copy all messages matching the current query to the given folder.