protected function generateRuleset(TemplateInspector $srcInspector, array $trgInspectors)
	{
		$rules = [];
		foreach ($this->collection as $rulesGenerator)
		{
			if ($rulesGenerator instanceof BooleanRulesGenerator)
			{
				foreach ($rulesGenerator->generateBooleanRules($srcInspector) as $ruleName => $bool)
				{
					$rules[$ruleName] = $bool;
				}
			}

			if ($rulesGenerator instanceof TargetedRulesGenerator)
			{
				foreach ($trgInspectors as $tagName => $trgInspector)
				{
					$targetedRules = $rulesGenerator->generateTargetedRules($srcInspector, $trgInspector);
					foreach ($targetedRules as $ruleName)
					{
						$rules[$ruleName][] = $tagName;
					}
				}
			}
		}

		return $rules;
	}
protected function generateRuleset(TemplateInspector $srcInspector, array $trgInspectors)
	{
		$rules = [];
		foreach ($this->collection as $rulesGenerator)
		{
			if ($rulesGenerator instanceof BooleanRulesGenerator)
			{
				foreach ($rulesGenerator->generateBooleanRules($srcInspector) as $ruleName => $bool)
				{
					$rules[$ruleName] = $bool;
				}
			}

			if ($rulesGenerator instanceof TargetedRulesGenerator)
			{
				foreach ($trgInspectors as $tagName => $trgInspector)
				{
					$targetedRules = $rulesGenerator->generateTargetedRules($srcInspector, $trgInspector);
					foreach ($targetedRules as $ruleName)
					{
						$rules[$ruleName][] = $tagName;
					}
				}
			}
		}

		return $rules;
	}
protected function generateRuleset ( TemplateInspector $ srcInspector , array $ trgInspectors ) { $ rules = [ ] ; foreach ( $ this -> collection as $ rulesGenerator ) { if ( $ rulesGenerator instanceof BooleanRulesGenerator ) { foreach ( $ rulesGenerator -> generateBooleanRules ( $ srcInspector ) as $ ruleName => $ bool ) { $ rules [ $ ruleName ] = $ bool ; } } if ( $ rulesGenerator instanceof TargetedRulesGenerator ) { foreach ( $ trgInspectors as $ tagName => $ trgInspector ) { $ targetedRules = $ rulesGenerator -> generateTargetedRules ( $ srcInspector , $ trgInspector ) ; foreach ( $ targetedRules as $ ruleName ) { $ rules [ $ ruleName ] [ ] = $ tagName ; } } } } return $ rules ; }
Generate a set of rules for a single TemplateInspector instance

@param  TemplateInspector $srcInspector  Source of the rules
@param  array             $trgInspectors Array of [tagName => TemplateInspector]
@return array
Generate a set of rules for a single TemplateInspector instance