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
파일 보기 프로젝트 열기: puli/manager 1 사용 예제들

공개 메소드들

메소드 설명
__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.