PHP 클래스 Puli\Manager\Api\Module\ModuleList

부터: 1.0
저자: Bernhard Schussek ([email protected])
상속: implements IteratorAggregat\IteratorAggregate, implements Countabl\Countable, implements ArrayAcces\ArrayAccess
파일 보기 프로젝트 열기: puli/manager 1 사용 예제들

공개 메소드들

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