Umil.umil start

umil::umil_start –– A function that is run almost every time a Core function from the Umil Library is ran.

This is used to reset any previous errors and set the $umil->command up (which holds the name of the command to be shown to the user).

Description
string umil::umil_start

Parameters
The parameters for umil_start are special. If a parameter is sent, the first one us used for the name of the command. Any following that will be used in vsprintf on the name of the command. For more information see the examples.

vsprintf PHP documentation

Return Values
Does not return anything

Example #1
Set $umil->command to $user->lang['AUTH_CACHE_PURGE'] if it exists, otherwise 'AUTH_CACHE_PURGE'. $umil->umil_start('AUTH_CACHE_PURGE');

Example #2
Set $umil->command to $user->lang['CONFIG_ADD'] if it exists, otherwise 'CONFIG_ADD'. Will also run vsprintf($umil->command, $config_name)

Assuming the stand-alone version is not being run, $user->lang['CONFIG_ADD'] should be:

'Adding new config variable: %s'

After running vsprintf on it, it would look like the following, although with $config_name being replaced with whatever the $config_name was:

'Adding new config variable: $config_name'

$umil->umil_start('CONFIG_ADD', $config_name);