public function load($file, $type = null)
{
$path = $this->locator->locate($file);
$content = $this->loadFile($path);
// empty file
if (null === $content) {
return array();
}
// imports (Symfony)
$content = $this->parseImports($content, $path);
// @include (Zend)
$content = $this->parseIncludes($content, $path);
// not an array
if (!is_array($content)) {
throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
}
return $content;
}