ImapQueryBuilder
class ImapQueryBuilder (View source)
Properties
| protected array | $wheres | The where conditions for the query. |
|
| protected string | $dateFormat | The date format to use for date based queries. |
Methods
Add a where "ALL" clause to the query.
Add a where "NEW" clause to the query.
Add a where "OLD" clause to the query.
Add a where "SEEN" clause to the query.
Add a where "DRAFT" clause to the query.
Add a where "RECENT" clause to the query.
Add a where "UNSEEN" clause to the query.
Add a where "FLAGGED" clause to the query.
Add a where "DELETED" clause to the query.
Add a where "ANSWERED" clause to the query.
Add a where "UNDELETED" clause to the query.
Add a where "UNFLAGGED" clause to the query.
Add a where "UNANSWERED" clause to the query.
Add a where "FROM" clause to the query.
Add a where "TO" clause to the query.
Add a where "CC" clause to the query.
Add a where "BCC" clause to the query.
Add a where "BODY" clause to the query.
Add a where "KEYWORD" clause to the query.
Add a where "ON" clause to the query.
Add a where "SINCE" clause to the query.
Add a where "BEFORE" clause to the query.
Add a where "SUBJECT" clause to the query.
Add a where "TEXT" clause to the query.
Add a where "HEADER" clause to the query.
Add a where "UID" clause to the query.
Add a "where" condition.
Add an "or where" condition.
Add a "where not" condition.
Determine if the query has any where conditions.
Transform the instance into an IMAP-compatible query string.
Create a new query instance (like Eloquent's newQuery).
Add a basic condition to the query.
Prepare the where value, escaping it as needed.
Add a nested condition group to the query.
Attempt to parse a date string into a Carbon instance.
Build a single expression node from a basic or nested where.
Merge the existing expression with the next expression, respecting the boolean operator.
Recursively compile the wheres array into an IMAP-compatible string.
Compile a basic where condition into an IMAP-compatible string.
Details
ImapQueryBuilder
all()
Add a where "ALL" clause to the query.
ImapQueryBuilder
new()
Add a where "NEW" clause to the query.
ImapQueryBuilder
old()
Add a where "OLD" clause to the query.
ImapQueryBuilder
seen()
Add a where "SEEN" clause to the query.
ImapQueryBuilder
draft()
Add a where "DRAFT" clause to the query.
ImapQueryBuilder
recent()
Add a where "RECENT" clause to the query.
ImapQueryBuilder
unseen()
Add a where "UNSEEN" clause to the query.
ImapQueryBuilder
flagged()
Add a where "FLAGGED" clause to the query.
ImapQueryBuilder
deleted()
Add a where "DELETED" clause to the query.
ImapQueryBuilder
answered()
Add a where "ANSWERED" clause to the query.
ImapQueryBuilder
undeleted()
Add a where "UNDELETED" clause to the query.
ImapQueryBuilder
unflagged()
Add a where "UNFLAGGED" clause to the query.
ImapQueryBuilder
unanswered()
Add a where "UNANSWERED" clause to the query.
ImapQueryBuilder
from(string $email)
Add a where "FROM" clause to the query.
ImapQueryBuilder
to(string $value)
Add a where "TO" clause to the query.
ImapQueryBuilder
cc(string $value)
Add a where "CC" clause to the query.
ImapQueryBuilder
bcc(string $value)
Add a where "BCC" clause to the query.
ImapQueryBuilder
body(string $value)
Add a where "BODY" clause to the query.
ImapQueryBuilder
keyword(string $value)
Add a where "KEYWORD" clause to the query.
ImapQueryBuilder
on(mixed $date)
Add a where "ON" clause to the query.
ImapQueryBuilder
since(mixed $date)
Add a where "SINCE" clause to the query.
ImapQueryBuilder
before(mixed $value)
Add a where "BEFORE" clause to the query.
ImapQueryBuilder
subject(string $value)
Add a where "SUBJECT" clause to the query.
ImapQueryBuilder
text(string $value)
Add a where "TEXT" clause to the query.
ImapQueryBuilder
header(string $header, string $value)
Add a where "HEADER" clause to the query.
ImapQueryBuilder
uid(int|string|array $from, int|float|null $to = null)
Add a where "UID" clause to the query.
ImapQueryBuilder
where(mixed $column, mixed $value = null)
Add a "where" condition.
ImapQueryBuilder
orWhere(mixed $column, mixed $value = null)
Add an "or where" condition.
ImapQueryBuilder
whereNot(mixed $column, mixed $value = null)
Add a "where not" condition.
bool
isEmpty()
Determine if the query has any where conditions.
string
toImap()
Transform the instance into an IMAP-compatible query string.
protected ImapQueryBuilder
newQuery()
Create a new query instance (like Eloquent's newQuery).
protected void
addBasicCondition(string $boolean, mixed $column, mixed $value, bool $not = false)
Add a basic condition to the query.
protected RawQueryValue|string|null
prepareWhereValue(mixed $value)
Prepare the where value, escaping it as needed.
protected void
addNestedCondition(string $boolean, callable $callback)
Add a nested condition group to the query.
protected CarbonInterface
parseDate(mixed $date)
Attempt to parse a date string into a Carbon instance.
protected array
makeExpressionNode(array $where)
Build a single expression node from a basic or nested where.
protected string
mergeExpressions(string $existing, string $next, string $boolean)
Merge the existing expression with the next expression, respecting the boolean operator.
protected string
compileWheres(array $wheres)
Recursively compile the wheres array into an IMAP-compatible string.
protected string
compileBasic(array $where)
Compile a basic where condition into an IMAP-compatible string.