manager
class manager
The extension manager provides means to activate/deactivate extensions.
Properties
protected ContainerInterface | $container | ||
protected | $db | ||
protected | $config | ||
protected | $finder_factory | ||
protected | $cache | ||
protected | $extensions | ||
protected | $extension_table | ||
protected | $phpbb_root_path | ||
protected | $cache_name |
Methods
Creates a manager and loads information from database
Loads all extension information from the database
Generates the path to an extension
Instantiates the extension meta class for the extension with the given name
Instantiates the metadata manager for the extension with the given name
Update the database entry for an extension
Runs a step of the extension enabling process.
Enables an extension
Disables an extension
Disables an extension
Purge an extension
Purge an extension
Retrieves a list of all available extensions on the filesystem
Retrieves all configured extensions.
Retrieves all enabled extensions.
Retrieves all disabled extensions.
Check to see if a given extension is available on the filesystem
Check to see if a given extension is enabled
Check to see if a given extension is disabled
Check to see if a given extension is configured
Check the version and return the available updates (for an extension).
Check to see if a given extension is purged
Instantiates a \phpbb\finder\finder.
Details
at line 50
__construct(ContainerInterface $container, driver_interface $db, config $config, factory $finder_factory, string $extension_table, string $phpbb_root_path, service $cache = null, string $cache_name = '_ext')
Creates a manager and loads information from database
at line 74
null
load_extensions()
Loads all extension information from the database
at line 116
string
get_extension_path(string $name, bool $phpbb_relative = false)
Generates the path to an extension
at line 130
extension_interface
get_extension(string $name)
Instantiates the extension meta class for the extension with the given name
at line 152
metadata_manager
create_extension_metadata_manager(string $name)
Instantiates the metadata manager for the extension with the given name
at line 169
protected
update_state(string $name, array $data, string $action = 'update')
Update the database entry for an extension
at line 213
bool
enable_step(string $name)
Runs a step of the extension enabling process.
Allows the exentension to enable in a long running script that works in multiple steps across requests. State is kept for the extension in the extensions table.
at line 259
null
enable(string $name)
Enables an extension
This method completely enables an extension. But it could be long running so never call this in a script that has a max_execution time.
at line 275
bool
disable_step(string $name)
Disables an extension
Calls the disable method on the extension's meta class to allow it to process the event.
at line 307
null
disable(string $name)
Disables an extension
Disables an extension completely at once. This process could run for a while so never call this in a script that has a max_execution time.
at line 323
bool
purge_step(string $name)
Purge an extension
Disables the extension first if active, and then calls purge on the extension's meta class to delete the extension's database content.
at line 362
null
purge(string $name)
Purge an extension
Purges an extension completely at once. This process could run for a while so never call this in a script that has a max_execution time.
at line 375
array
all_available()
Retrieves a list of all available extensions on the filesystem
at line 418
array
all_configured(bool $phpbb_relative = true)
Retrieves all configured extensions.
All enabled and disabled extensions are considered configured. A purged extension that is no longer in the database is not configured.
at line 440
array
all_enabled(bool $phpbb_relative = true)
Retrieves all enabled extensions.
at line 461
array
all_disabled(bool $phpbb_relative = true)
Retrieves all disabled extensions.
at line 480
bool
is_available(string $name)
Check to see if a given extension is available on the filesystem
at line 499
bool
is_enabled(string $name)
Check to see if a given extension is enabled
at line 510
bool
is_disabled(string $name)
Check to see if a given extension is disabled
at line 524
bool
is_configured(string $name)
Check to see if a given extension is configured
All enabled and disabled extensions are considered configured. A purged extension that is no longer in the database is not configured.
at line 539
array
version_check(metadata_manager $md_manager, bool $force_update = false, bool $force_cache = false, string $stability = null)
Check the version and return the available updates (for an extension).
at line 566
bool
is_purged(string $name)
Check to see if a given extension is purged
An extension is purged if it is available, not enabled and not disabled.
at line 577
finder
get_finder(bool $use_all_available = false)
Instantiates a \phpbb\finder\finder.