abstract class Generator implements GeneratorInterface (View source)

Properties

protected RuleInterface[] $rules

Methods

__construct()

Initializes the instance.

addRule(string $handle, RuleInterface $rule)

Add a new rule to be handled.

getRules()

Returns all the defined rules.

getRule(string $handle)

Return a defined rule given its handle (if found).

Details

__construct()

Initializes the instance.

addRule(string $handle, RuleInterface $rule)

Add a new rule to be handled.

Parameters

string $handle

The rule handler

RuleInterface $rule

The rule to be handled

See also

GeneratorInterface::addRule

RuleInterface[] getRules()

Returns all the defined rules.

null|RuleInterface getRule(string $handle)

Return a defined rule given its handle (if found).

Parameters

string $handle

Return Value

null|RuleInterface

See also

GeneratorInterface::getRule