WooCommerce_Module
final class WooCommerce_Module extends Module
This Module manages the WooCommerce features.
Properties
| static protected Singleton[] | $_instances | from Singleton | |
| protected bool | $is_submodule | from Module | |
| protected bool | $enabled | from Module | |
| static string | $includes_dir | from Module | |
| static string | $modules_dir | from Module | |
| static array | $includes | from Module | |
| protected array | $loaded_modules | from Module |
Methods
A protected constructor to ensure only singleton instances of plugins exist.
Maybe initialize singleton instance and return the instance.
A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.
An empty, placeholder function for overriding, this is where the module "starts" it's WordPress code.
The function which gets called when a module is being constructed. This ensures the submodule construct sequences don't get fired when a submodule is first initialized.
The function which gets called if this module is being imported as a submodule.
Our special function for searching for submodule folders, loading them into the current module and PHP environment.
Loop through all loaded modules and run their initialization functions.
Given a Module class name and a file path, loads the file into the PHP environment, then checks to make sure the given class extends Module and adds it to { $this->loaded_modules }
Load a class from a file and return the full class name.
Details
in
Module at line 61
protected
__construct(bool $is_submodule = false)
A protected constructor to ensure only singleton instances of plugins exist.
in
Singleton at line 42
final static Singleton
instance(mixed $args = null)
Maybe initialize singleton instance and return the instance.
in
Singleton at line 63
final static array
get_instances()
Return a copy of the instances array.
in
Singleton at line 72
final protected ReflectionClass
get_class_reflection()
A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.
in
Module at line 82
static
construct()
An empty, placeholder function for overriding, this is where the module "starts" it's WordPress code.
in
Module at line 87
static
submodule_construct()
The function which gets called when a module is being constructed. This ensures the submodule construct sequences don't get fired when a submodule is first initialized.
in
Module at line 98
final static
submodule_instance()
The function which gets called if this module is being imported as a submodule.
in
Module at line 105
final protected
register_submodules()
Our special function for searching for submodule folders, loading them into the current module and PHP environment.
in
Module at line 136
final protected
construct_submodules()
Loop through all loaded modules and run their initialization functions.
in
Module at line 149
final protected
import_module(string $module_path)
Given a Module class name and a file path, loads the file into the PHP environment, then checks to make sure the given class extends Module and adds it to { $this->loaded_modules }
in
Module at line 173
final protected string|false
load_class_file(string $file_path)
Load a class from a file and return the full class name.
in
Module at line 225
final array
get_loaded_modules()
Get the currently loaded modules.