trait QueriesMessages (View source)

Traits

Conditionable

Properties

protected ImapQueryBuilder $query

The query builder instance.

protected int $page

The current page.

protected int|null $limit

The fetch limit.

protected bool $fetchBody

Whether to fetch the message body.

protected bool $fetchFlags

Whether to fetch the message flags.

protected bool $fetchHeaders

Whether to fetch the message headers.

protected bool $fetchSize

Whether to fetch the message size.

protected "asc"|"desc" $fetchOrder

The fetch order.

protected bool $fetchAsUnread

Whether to leave messages fetched as unread by default.

protected array $passthru

The methods that should be returned from query builder.

Methods

mixed
forwardCallTo(object $object, string $method, array $parameters)

Forward a method call to the given object.

static never
throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

mixed
__call(string $method, array $parameters)

Handle dynamic method calls into the query builder.

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

{@inheritDoc}

int|null
getLimit()

{@inheritDoc}

setLimit(int $limit)

{@inheritDoc}

int
getPage()

{@inheritDoc}

setPage(int $page)

{@inheritDoc}

bool
isFetchingBody()

{@inheritDoc}

bool
isFetchingFlags()

{@inheritDoc}

bool
isFetchingHeaders()

{@inheritDoc}

bool
isFetchingSize()

{@inheritDoc}

setFetchFlags(bool $fetchFlags)

Set whether to fetch the flags.

setFetchBody(bool $fetchBody)

Set the fetch body flag.

setFetchHeaders(bool $fetchHeaders)

Set whether to fetch the headers.

setFetchSize(bool $fetchSize)

Set whether to fetch the size.

setFetchOrder(string $fetchOrder)

{@inheritDoc}

string
getFetchOrder()

{@inheritDoc}

oldest()

{@inheritDoc}

newest()

{@inheritDoc}

Details

protected mixed forwardCallTo(object $object, string $method, array $parameters)

Forward a method call to the given object.

Parameters

object $object
string $method
array $parameters

Return Value

mixed

static protected never throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

never

mixed __call(string $method, array $parameters)

Handle dynamic method calls into the query builder.

Parameters

string $method
array $parameters

Return Value

mixed

MessageQueryInterface leaveUnread()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface markAsRead()

{@inheritDoc}

Return Value

MessageQueryInterface

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

{@inheritDoc}

Parameters

int $limit
int $page

Return Value

MessageQueryInterface

int|null getLimit()

{@inheritDoc}

Return Value

int|null

MessageQueryInterface setLimit(int $limit)

{@inheritDoc}

Parameters

int $limit

Return Value

MessageQueryInterface

int getPage()

{@inheritDoc}

Return Value

int

MessageQueryInterface setPage(int $page)

{@inheritDoc}

Parameters

int $page

Return Value

MessageQueryInterface

bool isFetchingBody()

{@inheritDoc}

Return Value

bool

bool isFetchingFlags()

{@inheritDoc}

Return Value

bool

bool isFetchingHeaders()

{@inheritDoc}

Return Value

bool

bool isFetchingSize()

{@inheritDoc}

Return Value

bool

MessageQueryInterface withFlags()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withBody()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withHeaders()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withSize()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withoutBody()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withoutHeaders()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withoutFlags()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface withoutSize()

{@inheritDoc}

Return Value

MessageQueryInterface

protected MessageQueryInterface setFetchFlags(bool $fetchFlags)

Set whether to fetch the flags.

Parameters

bool $fetchFlags

Return Value

MessageQueryInterface

protected MessageQueryInterface setFetchBody(bool $fetchBody)

Set the fetch body flag.

Parameters

bool $fetchBody

Return Value

MessageQueryInterface

protected MessageQueryInterface setFetchHeaders(bool $fetchHeaders)

Set whether to fetch the headers.

Parameters

bool $fetchHeaders

Return Value

MessageQueryInterface

protected MessageQueryInterface setFetchSize(bool $fetchSize)

Set whether to fetch the size.

Parameters

bool $fetchSize

Return Value

MessageQueryInterface

MessageQueryInterface setFetchOrder(string $fetchOrder)

{@inheritDoc}

Parameters

string $fetchOrder

Return Value

MessageQueryInterface

string getFetchOrder()

{@inheritDoc}

Return Value

string

MessageQueryInterface setFetchOrderAsc()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface setFetchOrderDesc()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface oldest()

{@inheritDoc}

Return Value

MessageQueryInterface

MessageQueryInterface newest()

{@inheritDoc}

Return Value

MessageQueryInterface