class FakeMailbox implements MailboxInterface (View source)

Properties

protected FolderInterface|null $selected

The currently selected folder.

Methods

__construct(array $config = [], array $folders = [], array $capabilities = [])

Constructor.

mixed
config(string|null $key = null, mixed $default = null)

Get mailbox configuration values.

connection()

Get the mailbox connection.

bool
connected()

Determine if connection was established.

void
reconnect()

Force a reconnection to the server.

void
connect(ConnectionInterface|null $connection = null)

Connect to the server.

void
disconnect()

Disconnect from server.

inbox()

Get the mailbox's inbox folder.

folders()

Begin querying for mailbox folders.

array
capabilities()

Get the mailbox's capabilities.

void
select(FolderInterface $folder, bool $force = false)

Select the given folder.

bool
selected(FolderInterface $folder)

Determine if the given folder is selected.

Details

__construct(array $config = [], array $folders = [], array $capabilities = [])

Constructor.

Parameters

array $config
array $folders
array $capabilities

mixed config(string|null $key = null, mixed $default = null)

Get mailbox configuration values.

Parameters

string|null $key
mixed $default

Return Value

mixed

ConnectionInterface connection()

Get the mailbox connection.

Return Value

ConnectionInterface

bool connected()

Determine if connection was established.

Return Value

bool

void reconnect()

Force a reconnection to the server.

Return Value

void

void connect(ConnectionInterface|null $connection = null)

Connect to the server.

Parameters

ConnectionInterface|null $connection

Return Value

void

void disconnect()

Disconnect from server.

Return Value

void

FolderInterface inbox()

Get the mailbox's inbox folder.

Return Value

FolderInterface

FolderRepositoryInterface folders()

Begin querying for mailbox folders.

array capabilities()

Get the mailbox's capabilities.

Return Value

array

void select(FolderInterface $folder, bool $force = false)

Select the given folder.

Parameters

FolderInterface $folder
bool $force

Return Value

void

bool selected(FolderInterface $folder)

Determine if the given folder is selected.

Parameters

FolderInterface $folder

Return Value

bool