function _encodeOutput(&$data)
{
foreach ($data as $key => $value) {
if ($key == '__channels') {
foreach ($data['__channels'] as $channel => $blah) {
$this->_encodeOutput($data['__channels'][$channel]);
}
}
if (!isset($this->configuration_info[$key])) {
continue;
}
$type = $this->configuration_info[$key]['type'];
switch ($type) {
// we base64-encode passwords so they are at least
// not shown in plain by accident
case 'password':
$data[$key] = base64_encode($data[$key]);
break;
case 'mask':
$data[$key] = octdec($data[$key]);
break;
}
}
return true;
}