private function _loadYaml($filename)
    {
        $yamls = array();
        if (is_array($filename)) {
            foreach ($filename as $file) {
                foreach ($this->_loadYaml($file) as $name => $yaml) {
                    $yamls[$name] = $yaml;
                }
            }
            return $yamls;
        }
            $contents = false;
        foreach ($this->_directories as $directory) {
            $fullname = $directory . DIRECTORY_SEPARATOR . $filename;
            if (!file_exists($fullname)) {
                continue;
            }
            $contents = @file_get_contents($fullname);
        }
        if ($contents === false) {
            throw new BeanFactoryException($filename . ' not found in ' . print_r($this->_directories, true));
        }
        $ret = @yaml_parse($contents);
        if ($ret === false) {
            return $ret;
        }
        $yamls[$filename] = $ret;
        if (isset($ret['import'])) {
            foreach ($ret['import'] as $imported) {
                foreach ($this->_loadYaml($imported) as $name => $yaml) {
                    $yamls[$name] = $yaml;
                }
            }
        }
        return $yamls;
    }
private function _loadYaml($filename)
    {
        $yamls = array();
        if (is_array($filename)) {
            foreach ($filename as $file) {
                foreach ($this->_loadYaml($file) as $name => $yaml) {
                    $yamls[$name] = $yaml;
                }
            }
            return $yamls;
        }
            $contents = false;
        foreach ($this->_directories as $directory) {
            $fullname = $directory . DIRECTORY_SEPARATOR . $filename;
            if (!file_exists($fullname)) {
                continue;
            }
            $contents = @file_get_contents($fullname);
        }
        if ($contents === false) {
            throw new BeanFactoryException($filename . ' not found in ' . print_r($this->_directories, true));
        }
        $ret = @yaml_parse($contents);
        if ($ret === false) {
            return $ret;
        }
        $yamls[$filename] = $ret;
        if (isset($ret['import'])) {
            foreach ($ret['import'] as $imported) {
                foreach ($this->_loadYaml($imported) as $name => $yaml) {
                    $yamls[$name] = $yaml;
                }
            }
        }
        return $yamls;
    }
private function _loadYaml ( $ filename ) { $ yamls = array ( ) ; if ( is_array ( $ filename ) ) { foreach ( $ filename as $ file ) { foreach ( $ this -> _loadYaml ( $ file ) as $ name => $ yaml ) { $ yamls [ $ name ] = $ yaml ; } } return $ yamls ; } $ contents = false ; foreach ( $ this -> _directories as $ directory ) { $ fullname = $ directory . DIRECTORY_SEPARATOR . $ filename ; if ( ! file_exists ( $ fullname ) ) { continue ; } $ contents = @ file_get_contents ( $ fullname ) ; } if ( $ contents === false ) { throw new BeanFactoryException ( $ filename . ' not found in ' . print_r ( $ this -> _directories , true ) ) ; } $ ret = @ yaml_parse ( $ contents ) ; if ( $ ret === false ) { return $ ret ; } $ yamls [ $ filename ] = $ ret ; if ( isset ( $ ret [ 'import' ] ) ) { foreach ( $ ret [ 'import' ] as $ imported ) { foreach ( $ this -> _loadYaml ( $ imported ) as $ name => $ yaml ) { $ yamls [ $ name ] = $ yaml ; } } } return $ yamls ; }
Initializes yaml contents.

@param string $filename

@throws BeanFactoryException
@return mixed[]
Initializes yaml contents .