interface MessageQueryInterface mixin ImapQueryBuilder (View source)

Methods

leaveUnread()

Don't mark messages as read when fetching.

markAsRead()

Mark all messages as read when fetching.

limit(int $limit, int $page = 1)

Set the limit and page for the current query.

int|null
getLimit()

Get the set fetch limit.

setLimit(int $limit)

Set the fetch limit.

int
getPage()

Get the set page.

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.

withFlags()

Fetch the flags of messages.

withBody()

Fetch the body of messages.

withHeaders()

Fetch the headers of messages.

withSize()

Fetch the size of messages.

withoutBody()

Don't fetch the body of messages.

withoutHeaders()

Don't fetch the headers of messages.

withoutFlags()

Don't fetch the flags of messages.

withoutSize()

Don't fetch the size of messages.

setFetchOrder(string $fetchOrder)

Set the fetch order.

string
getFetchOrder()

Get the fetch order.

setFetchOrderAsc()

Set the fetch order to 'ascending'.

setFetchOrderDesc()

Set the fetch order to 'descending'.

oldest()

Set the fetch order to show oldest messages first (ascending).

newest()

Set the fetch order to show newest messages first (descending).

int
count()

Count all available messages matching the current search criteria.

first()

Get the first message in the resulting collection.

firstOrFail()

Get the first message in the resulting collection or throw an exception.

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.

paginate(int $perPage = 5, $page = null, string $pageName = 'page')

Paginate the current query.

findOrFail(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)

Find a message by the given identifier type or throw an exception.

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.

Details

MessageQueryInterface leaveUnread()

Don't mark messages as read when fetching.

Return Value

MessageQueryInterface

MessageQueryInterface markAsRead()

Mark all messages as read when fetching.

Return Value

MessageQueryInterface

MessageQueryInterface limit(int $limit, int $page = 1)

Set the limit and page for the current query.

Parameters

int $limit
int $page

Return Value

MessageQueryInterface

int|null getLimit()

Get the set fetch limit.

Return Value

int|null

MessageQueryInterface setLimit(int $limit)

Set the fetch limit.

Parameters

int $limit

Return Value

MessageQueryInterface

int getPage()

Get the set page.

Return Value

int

MessageQueryInterface setPage(int $page)

Set the page.

Parameters

int $page

Return Value

MessageQueryInterface

bool isFetchingBody()

Determine if the body of messages is being fetched.

Return Value

bool

bool isFetchingFlags()

Determine if the flags of messages is being fetched.

Return Value

bool

bool isFetchingHeaders()

Determine if the headers of messages is being fetched.

Return Value

bool

bool isFetchingSize()

Determine if the size of messages is being fetched.

Return Value

bool

MessageQueryInterface withFlags()

Fetch the flags of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withBody()

Fetch the body of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withHeaders()

Fetch the headers of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withSize()

Fetch the size of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withoutBody()

Don't fetch the body of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withoutHeaders()

Don't fetch the headers of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withoutFlags()

Don't fetch the flags of messages.

Return Value

MessageQueryInterface

MessageQueryInterface withoutSize()

Don't fetch the size of messages.

Return Value

MessageQueryInterface

MessageQueryInterface setFetchOrder(string $fetchOrder)

Set the fetch order.

Parameters

string $fetchOrder

Return Value

MessageQueryInterface

string getFetchOrder()

Get the fetch order.

Return Value

string

MessageQueryInterface setFetchOrderAsc()

Set the fetch order to 'ascending'.

Return Value

MessageQueryInterface

MessageQueryInterface setFetchOrderDesc()

Set the fetch order to 'descending'.

Return Value

MessageQueryInterface

MessageQueryInterface oldest()

Set the fetch order to show oldest messages first (ascending).

Return Value

MessageQueryInterface

MessageQueryInterface newest()

Set the fetch order to show newest messages first (descending).

Return Value

MessageQueryInterface

int count()

Count all available messages matching the current search criteria.

Return Value

int

MessageInterface|null first()

Get the first message in the resulting collection.

Return Value

MessageInterface|null

MessageInterface firstOrFail()

Get the first message in the resulting collection or throw an exception.

Return Value

MessageInterface

MessageCollection get()

Get the messages matching the current query.

Return Value

MessageCollection

int append(string $message, mixed $flags = null)

Append a new message to the folder.

Parameters

string $message
mixed $flags

Return Value

int

void each(callable $callback, int $chunkSize = 10, int $startChunk = 1)

Execute a callback over each message via a chunked query.

Parameters

callable $callback
int $chunkSize
int $startChunk

Return Value

void

void chunk(callable $callback, int $chunkSize = 10, int $startChunk = 1)

Execute a callback over each chunk of messages.

Parameters

callable $callback
int $chunkSize
int $startChunk

Return Value

void

LengthAwarePaginator paginate(int $perPage = 5, $page = null, string $pageName = 'page')

Paginate the current query.

Parameters

int $perPage
$page
string $pageName

Return Value

LengthAwarePaginator

MessageInterface findOrFail(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)

Find a message by the given identifier type or throw an exception.

Parameters

int $id
ImapFetchIdentifier $identifier

Return Value

MessageInterface

MessageInterface|null find(int $id, ImapFetchIdentifier $identifier = ImapFetchIdentifier::Uid)

Find a message by the given identifier type.

Parameters

int $id
ImapFetchIdentifier $identifier

Return Value

MessageInterface|null

void destroy(array|int $uids, bool $expunge = false)

Destroy the given messages.

Parameters

array|int $uids
bool $expunge

Return Value

void