abstract class provider implements IteratorAggregate

Provides a set of items found in extensions.

This abstract class is essentially a wrapper around item-specific finding logic. It handles storing the extension manager via constructor for the finding logic to use to find the items, and provides an iterator interface over the items found by the finding logic.

Items could be anything, for example template paths or cron task names. Derived classes completely define what the items are.

Properties

protected array|null $items

Array holding all found items

protected manager $extension_manager

An extension manager to search for items in extensions

Methods

__construct(manager $extension_manager)

Constructor. Loads all available items.

array
find()

Finds items using the extension manager.

getIterator()

Retrieve an iterator over all items

Details

at line 46
__construct(manager $extension_manager)

Constructor. Loads all available items.

Parameters

manager $extension_manager

phpBB extension manager

at line 56
abstract protected array find()

Finds items using the extension manager.

Return Value

array

List of task names

at line 63
ArrayIterator getIterator()

Retrieve an iterator over all items

Return Value

ArrayIterator

An iterator for the array of template paths