EmailVerification
in package
YetiForce admin email verification class.
Table of Contents
- PROCESS_INIT = 0
- Process identificator - init
- PROCESS_REGISTER = 1
- Process identificator - register
- URL = 'https://api.yetiforce.eu/emails'
- TYPES = [self::PROCESS_INIT => 'POST', self::PROCESS_REGISTER => 'PUT']
- $error : string|null
- $success : bool
- $type : int
- $email : string
- $newsletter : bool
- $token : string
- getError() : string
- Get last error.
- postProcess() : void
- Post processes.
- send() : bool
- Request sending an email with a verification token.
- setCode() : self
- Set code.
- setEmail() : self
- Set e-mail address.
- setNewsletter() : self
- Set newsletter agreement.
- setType() : $this
- Set type request.
- getData() : array<string|int, mixed>
- Get data for request.
Constants
PROCESS_INIT
Process identificator - init
public
mixed
PROCESS_INIT
= 0
PROCESS_REGISTER
Process identificator - register
public
mixed
PROCESS_REGISTER
= 1
URL
public
string
URL
= 'https://api.yetiforce.eu/emails'
URL
TYPES
private
string
TYPES
= [self::PROCESS_INIT => 'POST', self::PROCESS_REGISTER => 'PUT']
Endpoints
Properties
$error
protected
string|null
$error
Last eroor
$success
protected
bool
$success
Response result
$type
protected
int
$type
Type
private
string
$email
E-mail address
$newsletter
private
bool
$newsletter
Newsletter agreement
$token
private
string
$token
Code
Methods
getError()
Get last error.
public
getError() : string
Return values
string —postProcess()
Post processes.
public
postProcess() : void
Return values
void —send()
Request sending an email with a verification token.
public
send() : bool
Return values
bool —setCode()
Set code.
public
setCode(string $code) : self
Parameters
- $code : string
Return values
self —setEmail()
Set e-mail address.
public
setEmail(string $email) : self
Parameters
- $email : string
Return values
self —setNewsletter()
Set newsletter agreement.
public
setNewsletter(bool $newsletter) : self
Parameters
- $newsletter : bool
Return values
self —setType()
Set type request.
public
setType(int $type) : $this
Parameters
- $type : int
-
Types self::TYPES
Return values
$this —getData()
Get data for request.
private
getData() : array<string|int, mixed>