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

С версии: 1.0
Автор: Bernhard Schussek ([email protected])
Наследование: implements IteratorAggregat\IteratorAggregate, implements Countabl\Countable, implements ArrayAcces\ArrayAccess
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $modules = [] )
add ( Puli\Manager\Api\Module\Module $module ) Adds a module to the collection.
clear ( ) Removes all modules from the collection.
contains ( string $name ) : boolean Returns whether a module with the given name exists.
count ( )
get ( string $name ) : Puli\Manager\Api\Module\Module Returns the module with the given name.
getInstalledModuleNames ( ) : string[] Returns the names of all installed modules.
getInstalledModules ( ) : Puli\Manager\Api\Module\Module[] Returns all installed modules.
getIterator ( )
getModuleNames ( ) : string[] Returns the names of all modules.
getRootModule ( ) : Puli\Manager\Api\Module\RootModule | null Returns the root module.
getRootModuleName ( ) : string | null Returns the name of the root module.
isEmpty ( ) : boolean Returns whether the collection is empty.
merge ( array $modules ) Adds multiple modules to the collection.
offsetExists ( $name )
offsetGet ( $name )
offsetSet ( $name, $module )
offsetUnset ( $name )
remove ( string $name ) Removes a module from the collection.
replace ( array $modules ) Replaces the collection with the given modules.
toArray ( ) : Puli\Manager\Api\Module\Module[] Returns the modules in the collection.

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

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

public __construct ( array $modules = [] )
$modules array

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

Adds a module to the collection.
public add ( Puli\Manager\Api\Module\Module $module )
$module Puli\Manager\Api\Module\Module The added module.

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

Removes all modules from the collection.
public clear ( )

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

Returns whether a module with the given name exists.
public contains ( string $name ) : boolean
$name string The module name.
Результат boolean Whether a module with this name exists.

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

public count ( )

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

Returns the module with the given name.
public get ( string $name ) : Puli\Manager\Api\Module\Module
$name string The module name.
Результат Puli\Manager\Api\Module\Module The module with the passed name.

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

The installed modules are all modules that are not the root module.
public getInstalledModuleNames ( ) : string[]
Результат string[] The names of the installed modules.

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

The installed modules are all modules that are not the root module.
public getInstalledModules ( ) : Puli\Manager\Api\Module\Module[]
Результат Puli\Manager\Api\Module\Module[] The installed modules indexed by their names.

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

public getIterator ( )

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

Returns the names of all modules.
public getModuleNames ( ) : string[]
Результат string[] The module names.

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

If the collection contains no root module, null is returned.
public getRootModule ( ) : Puli\Manager\Api\Module\RootModule | null
Результат Puli\Manager\Api\Module\RootModule | null The root module or `null` if none exists.

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

If the collection contains no root module, null is returned.
public getRootModuleName ( ) : string | null
Результат string | null The root module name or `null` if none exists.

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

Returns whether the collection is empty.
public isEmpty ( ) : boolean
Результат boolean Returns `true` if the collection is empty and `false` otherwise.

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

Adds multiple modules to the collection.
public merge ( array $modules )
$modules array The added modules.

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

public offsetExists ( $name )

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

public offsetGet ( $name )

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

public offsetSet ( $name, $module )

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

public offsetUnset ( $name )

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

Removes a module from the collection.
public remove ( string $name )
$name string The module name.

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

Replaces the collection with the given modules.
public replace ( array $modules )
$modules array The modules to set.

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

Returns the modules in the collection.
public toArray ( ) : Puli\Manager\Api\Module\Module[]
Результат Puli\Manager\Api\Module\Module[] The modules in the collection.