PHP Интерфейс Puli\Manager\Api\Module\ModuleManager

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
clearModules ( ) Removes all modules.
findModules ( Webmozart\Expression\Expression $expr ) : ModuleList Returns all modules matching the given expression.
getContext ( ) : Puli\Manager\Api\Context\ProjectContext Returns the manager's context.
getModule ( string $name ) : Puli\Manager\Api\Module\Module Returns a module by name.
getModules ( ) : ModuleList Returns all installed modules.
getRootModule ( ) : Puli\Manager\Api\Module\RootModule Returns the root module.
hasModule ( string $name ) : boolean Returns whether the manager has the module with the given name.
hasModules ( Webmozart\Expression\Expression $expr = null ) : boolean Returns whether the manager has any modules.
installModule ( string $installPath, string | null $name = null, string $installerName = InstallInfo::DEFAULT_INSTALLER_NAME, string $env = Environment::PROD ) Installs the module at the given path in the repository.
removeModule ( string $name ) Removes the module with the given name.
removeModules ( Webmozart\Expression\Expression $expr ) Removes all modules matching the given expression.
renameModule ( string $name, string $newName ) Renames the module with the given name.

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

clearModules() публичный метод

If matching modules are found, this method does nothing.
public clearModules ( )

findModules() публичный метод

Returns all modules matching the given expression.
public findModules ( Webmozart\Expression\Expression $expr ) : ModuleList
$expr Webmozart\Expression\Expression The search criteria.
Результат ModuleList The modules matching the expression.

getContext() публичный метод

Returns the manager's context.
public getContext ( ) : Puli\Manager\Api\Context\ProjectContext
Результат Puli\Manager\Api\Context\ProjectContext The project context.

getModule() публичный метод

Returns a module by name.
public getModule ( string $name ) : Puli\Manager\Api\Module\Module
$name string The module name.
Результат Puli\Manager\Api\Module\Module The module.

getModules() публичный метод

Returns all installed modules.
public getModules ( ) : ModuleList
Результат ModuleList The installed modules.

getRootModule() публичный метод

Returns the root module.
public getRootModule ( ) : Puli\Manager\Api\Module\RootModule
Результат Puli\Manager\Api\Module\RootModule The root module.

hasModule() публичный метод

Returns whether the manager has the module with the given name.
public hasModule ( string $name ) : boolean
$name string The module name.
Результат boolean Whether the manager has a module with that name.

hasModules() публичный метод

You can optionally pass an expression to check whether the manager has modules matching the expression.
public hasModules ( Webmozart\Expression\Expression $expr = null ) : boolean
$expr Webmozart\Expression\Expression The search criteria.
Результат boolean Returns `true` if the manager has modules and `false` otherwise. If an expression was passed, this method only returns `true` if the manager has modules matching the expression.

installModule() публичный метод

Installs the module at the given path in the repository.
public installModule ( string $installPath, string | null $name = null, string $installerName = InstallInfo::DEFAULT_INSTALLER_NAME, string $env = Environment::PROD )
$installPath string The path to the module.
$name string | null The module name or `null` if the name should be read from the module's puli.json.
$installerName string The name of the installer.
$env string The environment to install the module in.

removeModule() публичный метод

Removes the module with the given name.
public removeModule ( string $name )
$name string The module name.

removeModules() публичный метод

If no matching modules are found, this method does nothing.
public removeModules ( Webmozart\Expression\Expression $expr )
$expr Webmozart\Expression\Expression The search criteria.

renameModule() публичный метод

Renames the module with the given name.
public renameModule ( string $name, string $newName )
$name string The module name.
$newName string The new module name.