-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
'ROOTPATH' => __ROOT__,
'USERVICE' => basename(__ROOT__)
];
$refs['env'] = array_merge($seed, $_ENV);
// Load and parse the yaml configs. Replace yaml references with $_ENV and $seed ($_ENV has precedence)
// TODO replicate foreach below to other microservices.
// TODO document in readme that no recursive array_merge is done and that you intentionally have to repeat defaults or alternatively use extensions such as 'overwrite' and 'append' to differentate and merge arrays recursively (or not) accordingly
$files[] = __ROOT__ . '/vendor/vaizard/glued-lib/src/defaults.yaml';
$files = array_merge($files, glob($refs['env']['DATAPATH'] . '/glued-stor/config/*.yaml'));
foreach ($files as $file) {
$yaml = file_get_contents($file);
$array = $class_sy->parse($yaml, $class_sy::PARSE_CONSTANT);
$ret = array_merge($ret, $class_ye->expandArrayProperties($array, $refs));
}
// Read the routes
$files = glob($ret['glued']['datapath'] . '/*/cache/routes.yaml');