| 3 |
// $Id$ |
// $Id$ |
| 4 |
// ------------------------------------------------------------------------- |
// ------------------------------------------------------------------------- |
| 5 |
// $Log$ |
// $Log$ |
| 6 |
|
// Revision 1.2 2003/02/03 03:40:02 jonen |
| 7 |
|
// + added function 'toHTML()', for deep asci_2_html encoding (using htmlentities() ) |
| 8 |
|
// |
| 9 |
// Revision 1.1 2002/11/12 05:42:30 joko |
// Revision 1.1 2002/11/12 05:42:30 joko |
| 10 |
// + initial checkin |
// + initial checkin |
| 11 |
// |
// |
| 31 |
function toISO() { |
function toISO() { |
| 32 |
$this->_utf8_2_iso($this->payload); |
$this->_utf8_2_iso($this->payload); |
| 33 |
} |
} |
| 34 |
|
|
| 35 |
|
function toHTML() { |
| 36 |
|
$this->_asci_2_html($this->payload); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
|
| 40 |
function _utf8_2_iso(&$payload) { |
function _utf8_2_iso(&$payload) { |
| 41 |
if (is_array($payload)) { |
if (is_array($payload)) { |
| 69 |
$scalar = utf8_encode($scalar); |
$scalar = utf8_encode($scalar); |
| 70 |
} |
} |
| 71 |
|
|
| 72 |
|
function _asci_2_html_scalar(&$scalar) { |
| 73 |
|
$scalar = htmlentities( trim($scalar) ); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
function _asci_2_html(&$payload) { |
| 77 |
|
if (is_array($payload)) { |
| 78 |
|
foreach ($payload as $key => $val) { |
| 79 |
|
if (is_array($payload[$key])) { |
| 80 |
|
$this->_asci_2_html($payload[$key]); |
| 81 |
|
} else { |
| 82 |
|
$this->_asci_2_html_scalar($payload[$key]); |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
} |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
|
| 89 |
} |
} |
| 90 |
|
|
| 91 |
?> |
?> |