/** * When returning a node tree, replace all mount point with actual values * returned by the proper mounter */ protected static function substituteMounterPointsForValues($value, $onMountHit, $path) { if (!is_array($value)) { return $value; } if (array_key_exists("@mount", $value)) { return $onMountHit($value["@mount"], Path::createRoot(), null, $path); } foreach ($value as $key => &$property) { $property = static::substituteMounterPointsForValues($property, $onMountHit, $path->concat($key)); } return $value; }