IProvider
in
Mail Provider Interface
This interface is a base requirement of methods and functionality used to construct a mail provider object
Tags
Table of Contents
Methods
- findServiceByAddress() : IService|null
- retrieve a service for a specific mail address
- findServiceById() : IService|null
- retrieve a service with a specific id
- hasServices() : bool
- determine if any services are configured for a specific user
- id() : string
- arbitrary unique text string identifying this provider
- initiateService() : IService
- construct a new empty service object
- label() : string
- localized human friendly name of this provider
- listServices() : array<string, IService>
- retrieve collection of services for a specific user
Methods
findServiceByAddress()
retrieve a service for a specific mail address
public
findServiceByAddress(string $userId, string $address) : IService|null
Parameters
- $userId : string
-
user id
- $address : string
-
mail address (e.g. test@example.com)
Tags
Return values
IService|null —returns service object or null if none found
findServiceById()
retrieve a service with a specific id
public
findServiceById(string $userId, string $serviceId) : IService|null
Parameters
- $userId : string
-
user id
- $serviceId : string
-
service id
Tags
Return values
IService|null —returns service object or null if none found
hasServices()
determine if any services are configured for a specific user
public
hasServices(string $userId) : bool
Parameters
- $userId : string
-
user id
Tags
Return values
bool —true if any services are configure for the user
id()
arbitrary unique text string identifying this provider
public
id() : string
Tags
Return values
string —id of this provider (e.g. UUID or 'IMAP/SMTP' or anything else)
initiateService()
construct a new empty service object
public
initiateService() : IService
Tags
Return values
IService —blank service object
label()
localized human friendly name of this provider
public
label() : string
Tags
Return values
string —label/name of this provider (e.g. Plain Old IMAP/SMTP)
listServices()
retrieve collection of services for a specific user
public
listServices(string $userId) : array<string, IService>
Parameters
- $userId : string
-
user id
Tags
Return values
array<string, IService> —collection of service id and object ['1' => IServiceObject]