Google
extends AbstractGoogle
in package
implements
HttpClientInterface
Google mail client class
Tags
Table of Contents
Interfaces
- HttpClientInterface
- Http client interface
Properties
- $accountId : string|null
- Account ID
- $baseUri : string|null
- Base URL
- $client : mixed
- Client
- $clientId : string|null
- Client ID
- $clientSecret : string|null
- Client Secret
- $scope : string|null
- Scope
- $token : string|null
- Token
- $tokenExpires : string|null
- Token expires
- $tokenRequestUri : string|null
- Token request URI
- $username : string|null
- Account username
Methods
- __construct() : mixed
- Create Office 365 object
- createClient() : AbstractHttp
- Create client
- getAccountId() : string|null
- Get account ID
- getAttachment() : mixed
- Get message attachment
- getAttachments() : mixed
- Get message attachments
- getClient() : mixed
- Get client
- getClientId() : string|null
- Get client ID
- getClientSecret() : string|null
- Get client ID
- getMessage() : mixed
- Get messages
- getMessages() : mixed
- Get messages
- getScope() : string|null
- Get scope ID
- getToken() : string|null
- Get token
- getTokenExpires() : string|null
- Get token expires
- getUsername() : string|null
- Get account username
- hasAccountId() : bool
- Has account ID
- hasClient() : bool
- Has client
- hasClientId() : bool
- Has client ID
- hasClientSecret() : bool
- Has client ID
- hasScope() : bool
- Has scope ID
- hasToken() : bool
- Has token
- hasTokenExpires() : bool
- Has token expires
- hasUsername() : bool
- Has account username
- isTokenExpired() : bool
- Check if token is expired
- markAsRead() : Google
- Mark message as read
- markAsUnread() : Google
- Mark message as unread
- parseOptions() : array<string|int, mixed>
- Parse options
- requestToken() : AbstractHttpClient
- Request token
- setAccountId() : AbstractHttpClient
- Set account ID
- setClient() : AbstractHttp
- Set client
- setClientId() : AbstractHttpClient
- Set client ID
- setClientSecret() : AbstractHttpClient
- Set client secret
- setScope() : AbstractHttpClient
- Set scope
- setToken() : AbstractHttpClient
- Set token
- setTokenExpires() : AbstractHttpClient
- Set token expires
- setUsername() : AbstractHttpClient
- Set account username
- verifyToken() : bool
- Verify token and refresh is expired
Properties
$accountId
Account ID
protected
string|null
$accountId
= null
$baseUri
Base URL
protected
string|null
$baseUri
= null
$client
Client
protected
mixed
$client
= null
$clientId
Client ID
protected
string|null
$clientId
= null
$clientSecret
Client Secret
protected
string|null
$clientSecret
= null
$scope
Scope
protected
string|null
$scope
= null
$token
Token
protected
string|null
$token
= null
$tokenExpires
Token expires
protected
string|null
$tokenExpires
= null
$tokenRequestUri
Token request URI
protected
string|null
$tokenRequestUri
= null
$username
Account username
protected
string|null
$username
= null
Methods
__construct()
Create Office 365 object
public
__construct([array<string|int, mixed>|string|null $options = null ]) : mixed
Parameters
- $options : array<string|int, mixed>|string|null = null
createClient()
Create client
public
abstract createClient(array<string|int, mixed>|string $options) : AbstractHttp
Parameters
- $options : array<string|int, mixed>|string
Return values
AbstractHttpgetAccountId()
Get account ID
public
getAccountId() : string|null
Return values
string|nullgetAttachment()
Get message attachment
public
getAttachment(string $messageId, string $attachmentId[, string $folder = 'Inbox' ]) : mixed
Parameters
- $messageId : string
- $attachmentId : string
- $folder : string = 'Inbox'
Tags
getAttachments()
Get message attachments
public
getAttachments(string $messageId[, string $folder = 'Inbox' ]) : mixed
Parameters
- $messageId : string
- $folder : string = 'Inbox'
Tags
getClient()
Get client
public
getClient() : mixed
getClientId()
Get client ID
public
getClientId() : string|null
Return values
string|nullgetClientSecret()
Get client ID
public
getClientSecret() : string|null
Return values
string|nullgetMessage()
Get messages
public
getMessage(string $messageId[, bool $raw = false ]) : mixed
Parameters
- $messageId : string
- $raw : bool = false
Tags
getMessages()
Get messages
public
getMessages([string $folder = 'Inbox' ][, array<string|int, mixed> $search = [] ][, int $limit = 10 ]) : mixed
Parameters
- $folder : string = 'Inbox'
- $search : array<string|int, mixed> = []
- $limit : int = 10
Tags
getScope()
Get scope ID
public
getScope() : string|null
Return values
string|nullgetToken()
Get token
public
getToken() : string|null
Return values
string|nullgetTokenExpires()
Get token expires
public
getTokenExpires() : string|null
Return values
string|nullgetUsername()
Get account username
public
getUsername() : string|null
Return values
string|nullhasAccountId()
Has account ID
public
hasAccountId() : bool
Return values
boolhasClient()
Has client
public
hasClient() : bool
Return values
boolhasClientId()
Has client ID
public
hasClientId() : bool
Return values
boolhasClientSecret()
Has client ID
public
hasClientSecret() : bool
Return values
boolhasScope()
Has scope ID
public
hasScope() : bool
Return values
boolhasToken()
Has token
public
hasToken() : bool
Return values
boolhasTokenExpires()
Has token expires
public
hasTokenExpires() : bool
Return values
boolhasUsername()
Has account username
public
hasUsername() : bool
Return values
boolisTokenExpired()
Check if token is expired
public
isTokenExpired() : bool
Return values
boolmarkAsRead()
Mark message as read
public
markAsRead(string $messageId[, bool $isRead = true ]) : Google
Parameters
- $messageId : string
- $isRead : bool = true
Tags
Return values
GooglemarkAsUnread()
Mark message as unread
public
markAsUnread(string $messageId) : Google
Parameters
- $messageId : string
Tags
Return values
GoogleparseOptions()
Parse options
public
parseOptions(array<string|int, mixed>|string $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>|string
Tags
Return values
array<string|int, mixed>requestToken()
Request token
public
abstract requestToken() : AbstractHttpClient
Tags
Return values
AbstractHttpClientsetAccountId()
Set account ID
public
setAccountId(string $accountId) : AbstractHttpClient
Parameters
- $accountId : string
Return values
AbstractHttpClientsetClient()
Set client
public
setClient(mixed $client) : AbstractHttp
Parameters
- $client : mixed
Return values
AbstractHttpsetClientId()
Set client ID
public
setClientId(string $clientId) : AbstractHttpClient
Parameters
- $clientId : string
Return values
AbstractHttpClientsetClientSecret()
Set client secret
public
setClientSecret(string $clientSecret) : AbstractHttpClient
Parameters
- $clientSecret : string
Return values
AbstractHttpClientsetScope()
Set scope
public
setScope(string $scope) : AbstractHttpClient
Parameters
- $scope : string
Return values
AbstractHttpClientsetToken()
Set token
public
setToken(string $token) : AbstractHttpClient
Parameters
- $token : string
Return values
AbstractHttpClientsetTokenExpires()
Set token expires
public
setTokenExpires(string $tokenExpires) : AbstractHttpClient
Parameters
- $tokenExpires : string
Return values
AbstractHttpClientsetUsername()
Set account username
public
setUsername(string $username) : AbstractHttpClient
Parameters
- $username : string
Return values
AbstractHttpClientverifyToken()
Verify token and refresh is expired
public
verifyToken() : bool