PEAR_Config::_encodeOutput PHP Method

_encodeOutput() public method

Currently, 'password' values will be base64-encoded as to avoid that people spot cleartext passwords by accident.
public _encodeOutput ( &$data ) : boolean
return boolean TRUE on success
    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;
    }