-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
It would be handy to be able to spit out a sub-section of a Cake app's Configure array in a format that could be consumed by another PHP script easily. This would improve the fidelity of data transfer for things like our Shell Scripts' db-credentials script, which currently uses the ConfigReadShell to dump DB connection values to bash variables, then has to parse that format back into a PHP data structure before spitting it back out in the appropriate format itself.
It'd be great to be able to do something like this from a calling script instead:
<?php
$cmd = escapeshellcmd('bin/cake ConfigRead --serialize Key.SubValueWithSubArrays');
$serialized = [];
$code = 0;
exec($cmd, $serialized, $code);
$data = unserialize($serialized);
echo $data['sub-sub-key']['property'];