Manager
extends AbstractManager
in package
Module manager class
Tags
Table of Contents
Properties
- $items : array<string|int, mixed>
- Manager items
Methods
- __construct() : mixed
- Constructor
- __get() : mixed
- Get an item
- __isset() : bool
- Determine if an item exists
- __set() : void
- Register a module with the manager
- __unset() : void
- Unset an item
- addItem() : static
- Add an item
- addItems() : static
- Add items
- count() : int
- Return count
- get() : mixed
- Get a module
- getItem() : mixed
- Get an item
- getItems() : array<string|int, mixed>
- Get items
- getIterator() : ArrayIterator
- Get iterator
- hasItem() : bool
- Determine whether the manager has an item
- hasItems() : bool
- Determine whether the manager has items
- hasModule() : bool
- Determine if a module object is registered with the manager by $module object comparison
- isRegistered() : bool
- Determine if a module object is registered with the manager by $name
- offsetExists() : bool
- Determine if an item exists
- offsetGet() : mixed
- Get an item
- offsetSet() : void
- Set an item
- offsetUnset() : void
- Unset an item
- register() : static
- Register a module object
- registerModules() : static
- Register module objects
- removeItem() : static
- Remove an item
- setItems() : static
- Set items
- unregister() : static
- Unregister a module
Properties
$items
Manager items
protected
array<string|int, mixed>
$items
= []
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|null $modules = null ]) : mixed
Instantiate the module manager object.
Parameters
- $modules : array<string|int, mixed>|null = null
__get()
Get an item
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
Determine if an item exists
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
Register a module with the manager
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__unset()
Unset an item
public
__unset(string $name) : void
Parameters
- $name : string
addItem()
Add an item
public
addItem(mixed $item[, mixed $name = null ]) : static
Parameters
- $item : mixed
- $name : mixed = null
Return values
staticaddItems()
Add items
public
addItems(array<string|int, mixed> $items) : static
Parameters
- $items : array<string|int, mixed>
Return values
staticcount()
Return count
public
count() : int
Return values
intget()
Get a module
public
get(string $name) : mixed
Parameters
- $name : string
getItem()
Get an item
public
getItem(mixed $name) : mixed
Parameters
- $name : mixed
getItems()
Get items
public
getItems() : array<string|int, mixed>
Return values
array<string|int, mixed>getIterator()
Get iterator
public
getIterator() : ArrayIterator
Return values
ArrayIteratorhasItem()
Determine whether the manager has an item
public
hasItem(string $name) : bool
Parameters
- $name : string
Return values
boolhasItems()
Determine whether the manager has items
public
hasItems() : bool
Return values
boolhasModule()
Determine if a module object is registered with the manager by $module object comparison
public
hasModule(ModuleInterface $module) : bool
Parameters
- $module : ModuleInterface
Return values
boolisRegistered()
Determine if a module object is registered with the manager by $name
public
isRegistered(string $name) : bool
Parameters
- $name : string
Return values
booloffsetExists()
Determine if an item exists
public
offsetExists(string $offset) : bool
Parameters
- $offset : string
Return values
booloffsetGet()
Get an item
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
Set an item
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
Unset an item
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
register()
Register a module object
public
register(ModuleInterface $module) : static
Parameters
- $module : ModuleInterface
Return values
staticregisterModules()
Register module objects
public
registerModules(array<string|int, mixed> $modules) : static
Parameters
- $modules : array<string|int, mixed>
Return values
staticremoveItem()
Remove an item
public
removeItem(mixed $name) : static
Parameters
- $name : mixed
Return values
staticsetItems()
Set items
public
setItems(array<string|int, mixed> $items) : static
Parameters
- $items : array<string|int, mixed>
Return values
staticunregister()
Unregister a module
public
unregister(string $name) : static
Parameters
- $name : string