src/WMS/Library/BusinessRulesEngine/Loader/YamlFileLoader.php
protected function parseRule(RuleCollection $collection, $name, array $config, $path)
    {
        $expression = isset($config['expression']) ? $config['expression'] : null;
        $tags = isset($config['tags']) ? $this->parseTags($config['tags']) : array();

        $rule = new Rule($expression);

        foreach ($tags as $tagName => $tagAttr) {
            $rule->addTag($tagName, $tagAttr);
        }

        $collection->add($name, $rule);
    }
protected function parseRule(RuleCollection $collection, $name, array $config, $path)
    {
        $expression = isset($config['expression']) ? $config['expression'] : null;
        $tags = isset($config['tags']) ? $this->parseTags($config['tags']) : array();

        $rule = new Rule($expression);

        foreach ($tags as $tagName => $tagAttr) {
            $rule->addTag($tagName, $tagAttr);
        }

        $collection->add($name, $rule);
    }
Parses a rule and adds it to the RuleCollection.

@param RuleCollection $collection A RouteCollection instance
@param string         $name       Rule name
@param array          $config     Rule definition
@param string         $path       Full path of the YAML file being processed