interface GeneratorInterface (View source)

Methods

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

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

RuleInterface[] getRules()

Returns all the defined rules.

Return Value

RuleInterface[]

null|RuleInterface getRule(string $handle)

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

Parameters

string $handle

Return Value

null|RuleInterface