lithium\security\validation\FormSignature::config()

public static method

Configures the class or retrieves current class configuration.

Parameters

  • array $config

    Available configuration options are:

    • 'classes' array: May be used to inject dependencies.
    • 'secret' string: Must be provided.

Returns

array|void

If $config is empty, returns an array with the current configurations.

Source

	public static function config(array $config = []) {
		if (!$config) {
			return [
				'classes' => static::$_classes,
				'secret' => static::$_secret
			];
		}
		if (isset($config['classes'])) {
			static::$_classes = $config['classes'] + static::$_classes;
		}
		if (isset($config['secret'])) {
			static::$_secret = $config['secret'];
		}
	}