ConnectionOptionsValidator
extends Validator
in package
Validate the connection options to access the database.
Tags
Table of Contents
Methods
- __construct() : mixed
- ConnectionOptionsValidator constructor.
- getConnectionOptions() : array<string|int, mixed>
- Return all connection options.
- rules() : array<string|int, mixed>
- Rules for connection
- validate() : true
- Validate user data
Methods
__construct()
ConnectionOptionsValidator constructor.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Attributes to validate.
getConnectionOptions()
Return all connection options.
public
getConnectionOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>rules()
Rules for connection
public
rules() : array<string|int, mixed>
Return values
array<string|int, mixed>validate()
Validate user data
public
validate() : true
Tags
Return values
true —if validation is successful, throw an exception otherwise.