PPI\Framework\Config\Loader\YamlFileLoader::load PHP Метод

load() публичный Метод

Loads a Yaml file.
public load ( mixed $file, string $type = null ) : array
$file mixed The resource
$type string The resource type
Результат array Array with configuration
    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;
    }