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

        $subCollection = $this->import($config['resource'], $type, false, $file);
        /* @var $subCollection RuleCollection */

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

        $collection->addCollection($subCollection);
    }
protected function parseImport(RuleCollection $collection, array $config, $path, $file)
    {
        $type = isset($config['type']) ? $config['type'] : null;
        $tags = isset($config['tags']) ? $this->parseTags($config['tags']) : array();
        $this->setCurrentDir(dirname($path));

        $subCollection = $this->import($config['resource'], $type, false, $file);
        /* @var $subCollection RuleCollection */

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

        $collection->addCollection($subCollection);
    }
Parses an import and adds the rules in the resource to the RuleCollection.

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