lithium\security\validation\FormSignature::config()
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|voidIf $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'];
}
}