context = $context; } /** * Get the processor for the specified rule type. * * @param string $rule_type The rule type. * * @return RuleProcessorInterface The matching processor for the specified rule type, or a FailRuleProcessor if no matching processor is found. */ public function get_processor( $rule_type ) { switch ( $rule_type ) { case 'context_plugins': return new ContextPluginsRuleProcessor( $this->context['plugins'] ?? array() ); } return GetRuleProcessor::get_processor( $rule_type ); } }