OrderCountRuleProcessor
in package
implements
RuleProcessorInterface
Rule processor for publishing based on the number of orders.
Interfaces, Classes and Traits
- RuleProcessorInterface
- Rule processor interface
Table of Contents
- $orders_provider : OrdersProvider
- The orders provider.
- __construct() : mixed
- Constructor.
- process() : bool
- Process the rule.
- validate() : bool
- Validates the rule.
Properties
$orders_provider
The orders provider.
protected
OrdersProvider
$orders_provider
Methods
__construct()
Constructor.
public
__construct([object $orders_provider = null ]) : mixed
Parameters
- $orders_provider : object = null
-
The orders provider.
Return values
mixed —process()
Process the rule.
public
process(object $rule, object $stored_state) : bool
Parameters
- $rule : object
-
The rule to process.
- $stored_state : object
-
Stored state.
Return values
bool — Whether the rule passes or not.validate()
Validates the rule.
public
validate(object $rule) : bool
Parameters
- $rule : object
-
The rule to validate.