Skip to content
Snippets Groups Projects
Commit dd277d84 authored by Demian Katz's avatar Demian Katz
Browse files

Allow parent data to be loaded at each step of the path stack.

- Provides more consistent/understandable behavior
parent f3b201d0
No related merge requests found
......@@ -165,7 +165,10 @@ class ExtendedIni implements FileLoaderInterface
$data = false;
foreach ($this->pathStack as $path) {
if (file_exists($path . '/' . $filename)) {
$current = $this->reader->getTextDomain($path . '/' . $filename);
// Load current file with parent data, if necessary:
$current = $this->loadParentData(
$this->reader->getTextDomain($path . '/' . $filename)
);
if ($data === false) {
$data = $current;
} else {
......@@ -177,8 +180,7 @@ class ExtendedIni implements FileLoaderInterface
throw new InvalidArgumentException("Ini file '{$filename}' not found");
}
// Load parent data, if necessary:
return $this->loadParentData($data);
return $data;
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment