Transformers
1 year ago
BaseLocationCountryRuleProcessor.php
2 years ago
BaseLocationStateRuleProcessor.php
2 years ago
ComparisonOperation.php
2 years ago
ContextPluginsRuleProcessor.php
1 year ago
EvaluateAndGetStatus.php
2 years ago
EvaluateOverrides.php
1 year ago
EvaluationLogger.php
1 year ago
FailRuleProcessor.php
2 years ago
GetRuleProcessor.php
2 years ago
GetRuleProcessorForContext.php
1 year ago
IsEcommerceRuleProcessor.php
2 years ago
IsWooExpressRuleProcessor.php
2 years ago
NotRuleProcessor.php
2 years ago
NoteStatusRuleProcessor.php
2 years ago
OnboardingProfileRuleProcessor.php
2 years ago
OptionRuleProcessor.php
2 years ago
OrRuleProcessor.php
2 years ago
OrderCountRuleProcessor.php
2 years ago
OrdersProvider.php
2 years ago
PassRuleProcessor.php
2 years ago
PluginVersionRuleProcessor.php
2 years ago
PluginsActivatedRuleProcessor.php
2 years ago
ProductCountRuleProcessor.php
1 year ago
PublishAfterTimeRuleProcessor.php
2 years ago
PublishBeforeTimeRuleProcessor.php
2 years ago
RuleEvaluator.php
1 year ago
RuleProcessorInterface.php
2 years ago
StoredStateRuleProcessor.php
2 years ago
StoredStateSetupForProducts.php
2 years ago
TotalPaymentsVolumeProcessor.php
1 year ago
WCAdminActiveForProvider.php
2 years ago
WCAdminActiveForRuleProcessor.php
2 years ago
WooCommerceAdminUpdatedRuleProcessor.php
2 years ago
RuleProcessorInterface.php
33 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Interface for a rule processor. |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors; |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | /** |
| 11 | * Rule processor interface |
| 12 | */ |
| 13 | interface RuleProcessorInterface { |
| 14 | /** |
| 15 | * Processes a rule, returning the boolean result of the processing. |
| 16 | * |
| 17 | * @param object $rule The rule to process. |
| 18 | * @param object $stored_state Stored state. |
| 19 | * |
| 20 | * @return bool The result of the processing. |
| 21 | */ |
| 22 | public function process( $rule, $stored_state ); |
| 23 | |
| 24 | /** |
| 25 | * Validates the rule. |
| 26 | * |
| 27 | * @param object $rule The rule to validate. |
| 28 | * |
| 29 | * @return bool Pass/fail. |
| 30 | */ |
| 31 | public function validate( $rule ); |
| 32 | } |
| 33 |