MediaWiki  REL1_19
Fallback Class Reference

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...

List of all members.

Static Public Member Functions

static iconv ($from, $to, $string)
static mb_strlen ($str, $enc= '')
 Fallback implementation of mb_strlen, hardcoded to UTF-8.
static mb_strpos ($haystack, $needle, $offset=0, $encoding= '')
 Fallback implementation of mb_strpos, hardcoded to UTF-8.
static mb_strrpos ($haystack, $needle, $offset=0, $encoding= '')
 Fallback implementation of mb_strrpos, hardcoded to UTF-8.
static mb_substr ($str, $start, $count= 'end')
 Fallback implementation for mb_substr, hardcoded to UTF-8.
static mb_substr_split_unicode ($str, $splitPos)
static stream_resolve_include_path ($filename)
 Fallback implementation of stream_resolve_include_path() Native stream_resolve_include_path is available for PHP 5 >= 5.3.2.

Detailed Description

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html Fallback functions for PHP installed without mbstring support

Definition at line 24 of file Fallback.php.


Member Function Documentation

static Fallback::iconv ( from,
to,
string 
) [static]
Parameters:
$from
$to
$string
Returns:
string

Definition at line 32 of file Fallback.php.

static Fallback::mb_strlen ( str,
enc = '' 
) [static]

Fallback implementation of mb_strlen, hardcoded to UTF-8.

Parameters:
string$str
string$encoptional encoding; ignored
Returns:
int

Definition at line 134 of file Fallback.php.

References $total.

Referenced by mb_substr_split_unicode(), and GlobalTest\testFallbackMbstringFunctions().

Here is the caller graph for this function:

static Fallback::mb_strpos ( haystack,
needle,
offset = 0,
encoding = '' 
) [static]

Fallback implementation of mb_strpos, hardcoded to UTF-8.

Parameters:
$haystackString
$needleString
$offsetString: optional start position
$encodingString: optional encoding; ignored
Returns:
int

Definition at line 159 of file Fallback.php.

static Fallback::mb_strrpos ( haystack,
needle,
offset = 0,
encoding = '' 
) [static]

Fallback implementation of mb_strrpos, hardcoded to UTF-8.

Parameters:
$haystackString
$needleString
$offsetString: optional start position
$encodingString: optional encoding; ignored
Returns:
int

Definition at line 180 of file Fallback.php.

static Fallback::mb_substr ( str,
start,
count = 'end' 
) [static]

Fallback implementation for mb_substr, hardcoded to UTF-8.

Attempts to be at least _moderately_ efficient; best optimized for relatively small offset and count values -- about 5x slower than native mb_string in my testing.

Larger offsets are still fairly efficient for Latin text, but can be up to 100x slower than native if the text is heavily multibyte and we have to slog through a few hundred kb.

Parameters:
$str
$start
$countstring
Returns:
string

Definition at line 64 of file Fallback.php.

References $count, and mb_substr_split_unicode().

Here is the call graph for this function:

static Fallback::mb_substr_split_unicode ( str,
splitPos 
) [static]
Parameters:
$str
$splitPos
Returns:
int

Definition at line 83 of file Fallback.php.

References mb_strlen().

Referenced by mb_substr().

Here is the call graph for this function:

Here is the caller graph for this function:

static Fallback::stream_resolve_include_path ( filename) [static]

Fallback implementation of stream_resolve_include_path() Native stream_resolve_include_path is available for PHP 5 >= 5.3.2.

Parameters:
$filenameString
Returns:
String

Definition at line 200 of file Fallback.php.

References $path.

Referenced by UserMailer\send().

Here is the caller graph for this function:


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