AsyncPluginsInstallLogger
in package
implements
PluginsInstallLogger
A logger to log plugin installation progress in real time to an option.
Interfaces, Classes and Traits
- PluginsInstallLogger
- A logger used in PluginsHelper::install_plugins to log the installation progress.
Table of Contents
- $option_name : string
- Variable to store logs.
- __construct() : mixed
- Constructor.
- activated() : void
- Change status to activated.
- add_error() : void
- Add an error.
- complete() : void
- Record completed_time.
- install_requested() : void
- Add requested plugin.
- installed() : void
- Add installed plugin.
- get() : false|mixed|void
- Retreive the option.
- update() : bool
- Update the option.
Properties
$option_name
Variable to store logs.
private
string
$option_name
Methods
__construct()
Constructor.
public
__construct(string $option_name) : mixed
Parameters
- $option_name : string
-
option name.
Return values
mixed —activated()
Change status to activated.
public
activated(string $plugin_name) : void
Parameters
- $plugin_name : string
-
plugin name.
Return values
void —add_error()
Add an error.
public
add_error(string $plugin_name[, string|null $error_message = null ]) : void
Parameters
- $plugin_name : string
-
plugin name.
- $error_message : string|null = null
-
error message.
Return values
void —complete()
Record completed_time.
public
complete() : void
Return values
void —install_requested()
Add requested plugin.
public
install_requested(string $plugin_name) : void
Parameters
- $plugin_name : string
-
plugin name.
Return values
void —installed()
Add installed plugin.
public
installed(string $plugin_name, int $duration) : void
Parameters
- $plugin_name : string
-
plugin name.
- $duration : int
-
time took to install plugin.
Return values
void —get()
Retreive the option.
private
get() : false|mixed|void
Return values
false|mixed|void —update()
Update the option.
private
update(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
-
New data.