Menu

## ConnectionOptionsValidator extends Validator
in package

ConnectionOptionsValidator.php : 15

Validate the connection options to access the database.

##### Tags

author

  Lucas S. Vieira

### 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.php : 40

ConnectionOptionsValidator constructor.

`public __construct([array<string|int, mixed> $data = [] ]) : mixed`

##### Parameters

$data : array<string|int, mixed> = []

  Attributes to validate.

#### getConnectionOptions()

ConnectionOptionsValidator.php : 73

Return all connection options.

`public getConnectionOptions() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### rules()

ConnectionOptionsValidator.php : 54

Rules for connection

`public rules() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### validate()

Validator.php : 56

Validate user data

`public validate() : true`

##### Tags

throws
  MissingParameterException|InvalidParameterException

##### Return values

true —

if validation is successful, throw an exception otherwise.

## Search results