PHP Класс Puli\Manager\Api\Module\RootModuleFile

You can pass a base configuration to the constructor that the module's configuration will inherit.
С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Наследование: extends ModuleFile
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string | null $moduleName = null, string | null $path = null, Puli\Manager\Api\Config\Config $baseConfig = null ) Creates a new root module file.
addInstallInfo ( Puli\Manager\Api\Module\InstallInfo $installInfo ) Adds install info for an installed module.
addPluginClass ( string $pluginClass ) Adds a plugin class.
addPluginClasses ( array $pluginClasses ) Adds multiple plugin classes.
clearInstallInfos ( ) Removes all install infos.
clearPluginClasses ( ) Removes all plugin classes.
getConfig ( ) : Puli\Manager\Api\Config\Config Returns the configuration of the module.
getInstallInfo ( string $moduleName ) : Puli\Manager\Api\Module\InstallInfo Returns the install info of an installed module.
getInstallInfos ( ) : Puli\Manager\Api\Module\InstallInfo[] Returns the install infos of all installed modules.
getModuleOrder ( ) : string[] Returns the order in which modules should be loaded.
getPluginClasses ( ) : string[] Returns the plugin classes.
hasInstallInfo ( string $moduleName ) : boolean Returns whether an install info with a given name exists.
hasInstallInfos ( ) : boolean Returns whether the module file contains any install infos.
hasPluginClass ( string $pluginClass ) : boolean Returns whether the configuration contains a plugin class.
hasPluginClasses ( ) : boolean Returns whether the configuration contains any plugin classes.
removeInstallInfo ( string $moduleName ) Removes the install info of an installed module.
removePluginClass ( string $pluginClass ) Removes a plugin class.
setInstallInfos ( array $installInfos ) Sets the install infos of all installed modules.
setModuleOrder ( array $moduleOrder ) Sets the order in which modules should be loaded.
setPluginClasses ( array $pluginClasses ) Sets the plugin classes.

Описание методов

__construct() публичный Метод

The file's configuration will inherit its settings from the base configuration passed to the constructor.
public __construct ( string | null $moduleName = null, string | null $path = null, Puli\Manager\Api\Config\Config $baseConfig = null )
$moduleName string | null The module name. Optional.
$path string | null The path where the configuration is stored or `null` if this configuration is not stored on the file system.
$baseConfig Puli\Manager\Api\Config\Config The configuration that the module will inherit its configuration values from.

addInstallInfo() публичный Метод

Adds install info for an installed module.
public addInstallInfo ( Puli\Manager\Api\Module\InstallInfo $installInfo )
$installInfo Puli\Manager\Api\Module\InstallInfo The install info.

addPluginClass() публичный Метод

The plugin class must be a fully-qualified class name that implements {@link PuliPlugin}. If the class is not found or does not implement that interface, an exception is thrown. The plugin class must not have required parameters in its constructor so that it can be successfully instantiate. If the constructor has required parameters, an exception is thrown. Leading backslashes are removed from the fully-qualified class name.
public addPluginClass ( string $pluginClass )
$pluginClass string The fully qualified plugin class name.

addPluginClasses() публичный Метод

The plugin classes must be fully-qualified class names that implement {@link Puli\Manager\Api\PuliPlugin}. If a class is not found or does not implement that interface, an exception is thrown. The plugin classes must not have required parameters in their constructor so that they can be successfully instantiated. If a constructor has required parameters, an exception is thrown. Leading backslashes are removed from the fully-qualified class names.
public addPluginClasses ( array $pluginClasses )
$pluginClasses array The fully qualified plugin class names.

clearInstallInfos() публичный Метод

Removes all install infos.
public clearInstallInfos ( )

clearPluginClasses() публичный Метод

Removes all plugin classes.
public clearPluginClasses ( )

getConfig() публичный Метод

Returns the configuration of the module.
public getConfig ( ) : Puli\Manager\Api\Config\Config
Результат Puli\Manager\Api\Config\Config The configuration.

getInstallInfo() публичный Метод

Returns the install info of an installed module.
public getInstallInfo ( string $moduleName ) : Puli\Manager\Api\Module\InstallInfo
$moduleName string The module name.
Результат Puli\Manager\Api\Module\InstallInfo The install info.

getInstallInfos() публичный Метод

Returns the install infos of all installed modules.
public getInstallInfos ( ) : Puli\Manager\Api\Module\InstallInfo[]
Результат Puli\Manager\Api\Module\InstallInfo[] The install infos.

getModuleOrder() публичный Метод

If modules contain path mappings for the same resource paths, this setting can be used to specify in which order these modules should be loaded. Alternatively, you can use {@link setOverriddenModules()} to mark one of the modules to override the other one.
public getModuleOrder ( ) : string[]
Результат string[] A list of module names.

getPluginClasses() публичный Метод

Returns the plugin classes.
См. также: setPluginClasses()
public getPluginClasses ( ) : string[]
Результат string[] The fully qualified plugin class names.

hasInstallInfo() публичный Метод

Returns whether an install info with a given name exists.
public hasInstallInfo ( string $moduleName ) : boolean
$moduleName string The name of the module.
Результат boolean Whether install info with that name exists.

hasInstallInfos() публичный Метод

Returns whether the module file contains any install infos.
public hasInstallInfos ( ) : boolean
Результат boolean Returns `true` if the file contains install infos and `false` otherwise.

hasPluginClass() публичный Метод

Returns whether the configuration contains a plugin class.
public hasPluginClass ( string $pluginClass ) : boolean
$pluginClass string The fully qualified plugin class name.
Результат boolean Whether the configuration contains the plugin class.

hasPluginClasses() публичный Метод

Returns whether the configuration contains any plugin classes.
public hasPluginClasses ( ) : boolean
Результат boolean Whether the configuration contains any plugin classes.

removeInstallInfo() публичный Метод

Removes the install info of an installed module.
public removeInstallInfo ( string $moduleName )
$moduleName string The module name.

removePluginClass() публичный Метод

If the plugin class has not been added, this method does nothing. This method also does not validate whether the passed value is actually a plugin class. Leading backslashes are removed from the fully-qualified class name.
public removePluginClass ( string $pluginClass )
$pluginClass string The fully qualified plugin class name.

setInstallInfos() публичный Метод

Sets the install infos of all installed modules.
public setInstallInfos ( array $installInfos )
$installInfos array

setModuleOrder() публичный Метод

If modules contain path mappings for the same resource paths, this setting can be used to specify in which order these modules should be loaded. Alternatively, you can use {@link setOverriddenModules()} to mark one of the modules to override the other one.
public setModuleOrder ( array $moduleOrder )
$moduleOrder array A list of module names.

setPluginClasses() публичный Метод

The plugin classes must be fully-qualified class names that implement {@link Puli\Manager\Api\PuliPlugin}. If a class is not found or does not implement that interface, an exception is thrown. The plugin classes must not have required parameters in their constructor so that they can be successfully instantiated. If a constructor has required parameters, an exception is thrown. Leading backslashes are removed from the fully-qualified class names.
public setPluginClasses ( array $pluginClasses )
$pluginClasses array The fully qualified plugin class names.