Elgg  Version master
Static Public Member Functions | List of all members
Elgg\Translit Class Reference

Elgg Transliterate. More...

Static Public Member Functions

static urlize ($string, $separator= '-')
 Create a version of a string for embedding in a URL. More...
 
static transliterateAscii ($utf8)
 Transliterate Western multibyte chars to ASCII. More...
 
static getAsciiTranslitMap ()
 Get array of UTF-8 (NFC) character replacements. More...
 
static hasNormalizerSupport ()
 Tests that "normalizer_normalize" exists and works. More...
 

Detailed Description

Elgg Transliterate.

For creating "friendly titles" for URLs

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information, see http://www.doctrine-project.org.

Author
Konsta Vesterinen kvest.nosp@m.eri@.nosp@m.cc.hu.nosp@m.t.fi
Jonathan H. Wage jonwa.nosp@m.ge@g.nosp@m.mail..nosp@m.com
Steve Clay steve.nosp@m.@mrc.nosp@m.lay.o.nosp@m.rg

Definition at line 32 of file Translit.php.

Member Function Documentation

static Elgg\Translit::getAsciiTranslitMap ( )
static

Get array of UTF-8 (NFC) character replacements.

Returns
array

Definition at line 130 of file Translit.php.

static Elgg\Translit::hasNormalizerSupport ( )
static

Tests that "normalizer_normalize" exists and works.

Returns
bool

Definition at line 263 of file Translit.php.

static Elgg\Translit::transliterateAscii (   $utf8)
static

Transliterate Western multibyte chars to ASCII.

Parameters
string$utf8a UTF-8 string
Returns
string

Definition at line 112 of file Translit.php.

static Elgg\Translit::urlize (   $string,
  $separator = '-' 
)
static

Create a version of a string for embedding in a URL.

Parameters
string$stringA UTF-8 string
string$separatorThe character to separate words with
Returns
string

Definition at line 41 of file Translit.php.


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