// Suppress warnings and errors while loading file
set_error_handler(array
($this, '_loadFileErrorHandler'
));
$yaml =
file_get_contents($yaml);
restore_error_handler();
// Check if there was a error while loading file
if ($this->_loadFileErrorStr !== null
) { throw new Zend_Config_Exception($this->_loadFileErrorStr
);
} // Override static value for ignore_constants if provided in $options
self::
setIgnoreConstants($ignoreConstants);
// Parse YAML
$config =
call_user_func($this->
getYamlDecoder(),
$yaml);
// Reset original static state of ignore_constants
self::
setIgnoreConstants($staticIgnoreConstants);
if (null ===
$config) { // decode failed
throw new Zend_Config_Exception("Error parsing YAML data"
);
}