ExtensionManager
class ExtensionManager
Modules class for TastyIgniter.
Provides utility functions for working with modules.
Traits
Singleton trait.
Properties
static protected | $instance | from Singleton | |
protected | $app | The application instance, since Extensions are an extension of a Service Provider |
|
protected array | $extensions | ||
protected array | $installedExtensions | ||
protected array | $registrationMethodCache | ||
protected array | $paths | ||
protected array | $booted | ||
protected array | $registered | ||
protected string | $metaFile | ||
static protected | $directories |
Methods
No description
No description
Return the path to the extension and its specified folder.
Return an associative array of files within one or more extensions.
Search a extension folder for files.
Returns an array of the folders in which extensions may be stored.
Returns a list of all extensions in the system.
Scans extensions to locate any dependencies that are not currently installed. Returns an array of extension codes that are needed.
Checks all extensions and their dependencies, if not met extensions are disabled.
Returns the extension codes that are required by the supplied extension.
Sorts extensions, in the order that they should be actioned, according to their given dependencies. Least required come first.
Create a Directory Map of all extensions
Finds all available extensions and loads them in to the $extensions array.
Loads a single extension in to the manager.
Runs the boot() method on all extensions. Can only be called once.
Runs the register() method on all extensions. Can only be called once.
Returns an array with all registered extensions The index is the extension name, the value is the extension object.
Returns a extension registration class based on its name.
Checks to see if an extension name is well formed.
No description
No description
No description
Checks to see if an extension has been registered.
No description
Returns a flat array of extensions namespaces and their paths
Determines if an extension is disabled by looking at the installed extensions config.
Spins over every extension object and collects the results of a method call.
Loads all installed extension from application config.
No description
Delete extension the filesystem
Extract uploaded extension zip folder
Install a new or existing extension by code
Uninstall a new or existing extension by code
Delete a single extension by code
No description
Details
in
Singleton at line 18
final static
instance()
Create a new instance of this singleton.
in
Singleton at line 28
final static
forgetInstance()
Forget this singleton's instance if it exists
in
Singleton at line 36
final protected
__construct()
Constructor.
at line 65
initialize()
No description
in
Singleton at line 48
__clone()
No description
in
Singleton at line 53
__wakeup()
No description
at line 77
static
addDirectory($directory)
No description
at line 90
string
path($extension = null, $folder = null)
Return the path to the extension and its specified folder.
at line 126
bool|array
files(string $extensionName = null, string $subFolder = null)
Return an associative array of files within one or more extensions.
at line 148
array
filesPath($extensionName, $path = null)
Search a extension folder for files.
at line 175
array
folders()
Returns an array of the folders in which extensions may be stored.
at line 184
array
listExtensions()
Returns a list of all extensions in the system.
at line 194
array
findMissingDependencies()
Scans extensions to locate any dependencies that are not currently installed. Returns an array of extension codes that are needed.
at line 220
protected void
loadDependencies()
Checks all extensions and their dependencies, if not met extensions are disabled.
at line 246
bool|array
getDependencies(string $extension)
Returns the extension codes that are required by the supplied extension.
at line 271
array
listByDependencies(array $extensions = null)
Sorts extensions, in the order that they should be actioned, according to their given dependencies. Least required come first.
at line 307
array
paths()
Create a Directory Map of all extensions
at line 334
array
loadExtensions()
Finds all available extensions and loads them in to the $extensions array.
at line 354
object|bool
loadExtension(string $code, string $path)
Loads a single extension in to the manager.
at line 391
void
bootExtensions()
Runs the boot() method on all extensions. Can only be called once.
at line 411
void
bootExtension(BaseExtension $extension = null)
Boot a single extension.
at line 428
void
registerExtensions()
Runs the register() method on all extensions. Can only be called once.
at line 448
void
registerExtension($code, BaseExtension $extension = null)
Register a single extension.
at line 499
BaseExtension[]
getExtensions()
Returns an array with all registered extensions The index is the extension name, the value is the extension object.
at line 517
mixed|null
findExtension($code)
Returns a extension registration class based on its name.
at line 533
string
checkName($code)
Checks to see if an extension name is well formed.
at line 538
getIdentifier($namespace)
No description
at line 545
getNamePath($code)
No description
at line 550
getExtensionPath($code, $path = '')
No description
at line 562
bool
hasExtension($code)
Checks to see if an extension has been registered.
at line 567
hasVendor($path)
No description
at line 575
namespaces()
Returns a flat array of extensions namespaces and their paths
at line 595
bool
isDisabled($code)
Determines if an extension is disabled by looking at the installed extensions config.
at line 605
array
getRegistrationMethodValues(string $methodName)
Spins over every extension object and collects the results of a method call.
at line 627
loadInstalled()
Loads all installed extension from application config.
at line 640
bool
updateInstalledExtensions(string $code, bool $enable = true)
No description
at line 668
bool
removeExtension(array $extCode = null)
Delete extension the filesystem
at line 696
bool
extractExtension($zipPath)
Extract uploaded extension zip folder
at line 731
bool
installExtension(string $code, string $version = null)
Install a new or existing extension by code
at line 765
bool
uninstallExtension(string $code, bool $purgeData = false)
Uninstall a new or existing extension by code
at line 784
bool
deleteExtension(string $code, bool $purgeData = true)
Delete a single extension by code
at line 801
protected
mergeConfigFrom(string $namespace, string $path)
No description