PHP Interface izzum\rules\IRule

Author: Rolf Vreijdenberger
Show file Open project: rolfvreijdenberger/izzum-statemachine

Public Methods

Method Description
applies ( ) : boolean The applies method which is executed somewhere at runtime when the rule is invoked.
toString ( ) gives a string representation of the instance

Method Details

applies() public method

Context for a rule can be injected via dependency injection, so a Rule can use that dependent on object (or mock) in the method. Any context should be provided at rule creation time via dependency injection. The context provided might know how to get additional information at execution time from objects it knows about. Context provided can also be a mock (for unittesting)
public applies ( ) : boolean
return boolean

toString() public method

gives a string representation of the instance
public toString ( )