public function withEntryRules()

in src/Mse/V20190531/MseApiResolver.php [1038:1086]


	public function withEntryRules(array $entryRules)
	{
	    $this->data['EntryRules'] = $entryRules;
		foreach ($entryRules as $depth1 => $depth1Value) {
			foreach ($depth1Value['RestItems'] as $depth2 => $depth2Value) {
				if(isset($depth2Value['Datum'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Datum'] = $depth2Value['Datum'];
				}
				if(isset($depth2Value['Divisor'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Divisor'] = $depth2Value['Divisor'];
				}
				if(isset($depth2Value['Rate'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Rate'] = $depth2Value['Rate'];
				}
				foreach ($depth2Value['NameList'] as $i => $iValue) {
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.NameList.' . ($i + 1)] = $iValue;
				}
				if(isset($depth2Value['Name'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Name'] = $depth2Value['Name'];
				}
				if(isset($depth2Value['Type'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Type'] = $depth2Value['Type'];
				}
				if(isset($depth2Value['Cond'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Cond'] = $depth2Value['Cond'];
				}
				if(isset($depth2Value['Remainder'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Remainder'] = $depth2Value['Remainder'];
				}
				if(isset($depth2Value['Value'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Value'] = $depth2Value['Value'];
				}
				if(isset($depth2Value['Operator'])){
					$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.RestItems.' . ($depth2 + 1) . '.Operator'] = $depth2Value['Operator'];
				}
			}
			if(isset($depth1Value['Condition'])){
				$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.Condition'] = $depth1Value['Condition'];
			}
			foreach ($depth1Value['Paths'] as $i => $iValue) {
				$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.Paths.' . ($i + 1)] = $iValue;
			}
			if(isset($depth1Value['Priority'])){
				$this->options['form_params']['EntryRules.' . ($depth1 + 1) . '.Priority'] = $depth1Value['Priority'];
			}
		}

		return $this;
    }