|
|
|
@ -126,16 +126,20 @@ class JsonManipulator
|
|
|
|
|
{
|
|
|
|
|
$decoded = JsonFile::parseJson($this->contents);
|
|
|
|
|
|
|
|
|
|
$subName = null;
|
|
|
|
|
if (in_array($mainNode, array('config', 'repositories')) && false !== strpos($name, '.')) {
|
|
|
|
|
list($name, $subName) = explode('.', $name, 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// no main node yet
|
|
|
|
|
if (!isset($decoded[$mainNode])) {
|
|
|
|
|
if ($subName !== null) {
|
|
|
|
|
$this->addMainKey($mainNode, array($name => array($subName => $value)));
|
|
|
|
|
} else {
|
|
|
|
|
$this->addMainKey($mainNode, array($name => $value));
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$subName = null;
|
|
|
|
|
if (in_array($mainNode, array('config', 'repositories')) && false !== strpos($name, '.')) {
|
|
|
|
|
list($name, $subName) = explode('.', $name, 2);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// main node content not match-able
|
|
|
|
|