Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZMBStringMapper Class Reference
Internationalization

The class eZMBStringMapper does. More...

## Public Member Functions
| __construct ( $input_charset_code, $output_charset_code)
| inputCharsetCode ()
| outputCharsetCode ()
| requestedInputCharsetCode ()
| requestedOutputCharsetCode ()
| isCharsetSupported ( $charset_code)
| substituteCharacter ()
| setSubstituteCharacter ( $char)
| convertString ( $str)
| strlen ( $str)
| strpos ( $haystack, $needle, $offset=0)
| strrpos ( $haystack, $needle)
| substr ( $str, $start, $length)

## Static Public Member Functions
static & | charsetList ()
static | hasMBStringExtension ()
static | instance ( $input_charset_code, $output_charset_code)

## Public Attributes
| $RequestedInputCharsetCode
| $InputCharsetCode
| $RequestedOutputCharsetCode
| $OutputCharsetCode
| $Valid

## Detailed Description

The class eZMBStringMapper does.

The mbstring extension supports the following charset: UCS-4, UCS-4BE, UCS-4LE, UCS-2, UCS-2BE, UCS-2LE, UTF-32, UTF-32BE, UTF-32LE, UCS-2LE, UTF-16, UTF-16BE, UTF-16LE, UTF-8, UTF-7, ASCII, EUC-JP, SJIS, eucJP-win, SJIS-win, ISO-2022-JP, JIS, ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10, ISO-8859-13, ISO-8859-14, ISO-8859-15, byte2be, byte2le, byte4be, byte4le, BASE64, 7bit, 8bit and UTF7-IMAP.

Definition at line 24 of file ezmbstringmapper.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZMBStringMapper::__construct | ( |  | $input_charset_code,
|  |  | $output_charset_code
| ) |  |

Constructor

Parameters

  string | $input_charset_code |
  string | $output_charset_code |

Definition at line 37 of file ezmbstringmapper.php.

References hasMBStringExtension(), isCharsetSupported(), eZCharsetInfo\realCharsetCode(), and eZDebug\writeError().

## Member Function Documentation

## ◆ charsetList()

static& eZMBStringMapper::charsetList | ( |  | ) |
| static

Note
  This function is duplicated in eZTextCodec::eZTextCodec(), remember to update both places.

Definition at line 62 of file ezmbstringmapper.php.

Referenced by isCharsetSupported().

## ◆ convertString()

eZMBStringMapper::convertString | ( |  | $str | ) |

Definition at line 146 of file ezmbstringmapper.php.

## ◆ hasMBStringExtension()

static eZMBStringMapper::hasMBStringExtension | ( |  | ) |
| static

Returns
  `true` if the mbstring can be used.

Note
  The following function must be present for the function to return `true`. mb_convert_encoding mb_substitute_character mb_strcut mb_strlen mb_strpos mb_strrpos mb_strwidth mb_substr
  This function is duplicated in eZTextCodec::eZTextCodec(), remember to update both places.

Definition at line 95 of file ezmbstringmapper.php.

Referenced by __construct().

## ◆ inputCharsetCode()

eZMBStringMapper::inputCharsetCode | ( |  | ) |

Definition at line 107 of file ezmbstringmapper.php.

References $InputCharsetCode.

## ◆ instance()

static eZMBStringMapper::instance | ( |  | $input_charset_code,
|  |  | $output_charset_code
| ) |  |
| static

Returns a shared instance of the eZMBStringMapper pr the $input_charset_code and $output_charset_code params.

Parameters

  string | $input_charset_code |
  string | $output_charset_code |

Returns
  eZMBStringMapper

Definition at line 181 of file ezmbstringmapper.php.

## ◆ isCharsetSupported()

eZMBStringMapper::isCharsetSupported | ( |  | $charset_code | ) |

Definition at line 127 of file ezmbstringmapper.php.

References charsetList(), and eZCharsetInfo\realCharsetCode().

Referenced by __construct().

## ◆ outputCharsetCode()

eZMBStringMapper::outputCharsetCode | ( |  | ) |

Definition at line 112 of file ezmbstringmapper.php.

References $OutputCharsetCode.

## ◆ requestedInputCharsetCode()

eZMBStringMapper::requestedInputCharsetCode | ( |  | ) |

Definition at line 117 of file ezmbstringmapper.php.

References $RequestedInputCharsetCode.

## ◆ requestedOutputCharsetCode()

eZMBStringMapper::requestedOutputCharsetCode | ( |  | ) |

Definition at line 122 of file ezmbstringmapper.php.

References $RequestedOutputCharsetCode.

## ◆ setSubstituteCharacter()

eZMBStringMapper::setSubstituteCharacter | ( |  | $char | ) |

Definition at line 140 of file ezmbstringmapper.php.

## ◆ strlen()

eZMBStringMapper::strlen | ( |  | $str | ) |

Definition at line 153 of file ezmbstringmapper.php.

## ◆ strpos()

eZMBStringMapper::strpos | ( |  | $haystack,
|  |  | $needle,
|  |  | $offset = `0`
| ) |  |

Definition at line 158 of file ezmbstringmapper.php.

## ◆ strrpos()

eZMBStringMapper::strrpos | ( |  | $haystack,
|  |  | $needle
| ) |  |

Definition at line 163 of file ezmbstringmapper.php.

## ◆ substituteCharacter()

eZMBStringMapper::substituteCharacter | ( |  | ) |

Definition at line 133 of file ezmbstringmapper.php.

## ◆ substr()

eZMBStringMapper::substr | ( |  | $str,
|  |  | $start,
|  |  | $length
| ) |  |

Definition at line 168 of file ezmbstringmapper.php.

## Member Data Documentation

## ◆ $InputCharsetCode

eZMBStringMapper::$InputCharsetCode

Definition at line 27 of file ezmbstringmapper.php.

Referenced by inputCharsetCode().

## ◆ $OutputCharsetCode

eZMBStringMapper::$OutputCharsetCode

Definition at line 29 of file ezmbstringmapper.php.

Referenced by outputCharsetCode().

## ◆ $RequestedInputCharsetCode

eZMBStringMapper::$RequestedInputCharsetCode

Definition at line 26 of file ezmbstringmapper.php.

Referenced by requestedInputCharsetCode().

## ◆ $RequestedOutputCharsetCode

eZMBStringMapper::$RequestedOutputCharsetCode

Definition at line 28 of file ezmbstringmapper.php.

Referenced by requestedOutputCharsetCode().

## ◆ $Valid

eZMBStringMapper::$Valid

Definition at line 30 of file ezmbstringmapper.php.

The documentation for this class was generated from the following file:

- ezmbstringmapper.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.