Interface: ISettingsValidator

Interface for settings validation.

Authors

Oleg Schildt

Package

Source code

Used by

 

Methods
public

Validates the settings of a settings manager.


Method: ISettingsValidator::validate()

public function validate(\SmartFactory\Interfaces\ISettingsManager $settingsmanager, string $context): void;

Validates the settings of a settings manager.

Parameters

Name Pass type Value type Default value Description
$settingsmanager by value \SmartFactory\Interfaces\ISettingsManager

The settings manager whose settings should be validated.

$context by value string

The settings context.

Settings might be edited not in one dialog, There can be several masks for different type of settings, or the settings can be configured in a wizard. In this case, only a subset of settings has to be saved and validated. To be able to write a flexible validator for the subsets, the $context is used. It can be - step1, step1, server_settings, db_connection_settings etc.

Returns

void

Throws

\SmartFactory\SmartException|\SmartFactory\SmartExceptionCollection
  • It might throw an exception in the case of any errors.

Authors

Oleg Schildt

Source code