Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArCharsetC

Source Location: /sub/ArCharsetC.class.php

Class Overview


This PHP class converts a given Arabic string from one Arabic character set to another


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 82]
This PHP class converts a given Arabic string from one Arabic character set to another



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Variables

static $instance =

[line 89]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_iso =

[line 86]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_utf =

[line 84]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_win =

[line 85]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method singleton [line 132]

static void singleton( )



Tags:

access:  public


[ Top ]

constructor __construct [line 96]

ArCharsetC __construct( [array $sets = array('windows-1256', 'utf-8')])

Loads initialize values



Tags:

access:  public


Parameters:

array   $sets   Charsets you would like to support

[ Top ]

method bug2iso [line 518]

string bug2iso( string $string)

Convert buggy Arabic imported database string to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method bug2utf [line 479]

string bug2utf( string $string)

Convert buggy Arabic imported database string to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method bug2win [line 440]

string bug2win( string $string)

Convert buggy Arabic imported database string to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when export database from MySQL < 4.1 into MySQL >= 4.1 using phpMyAdmin tool where each Arabic UTF-8 character translate as two ISO-8859-1 characters in export, then translate them into UTF-8 format in import.

[ Top ]

method html2iso [line 584]

string html2iso( string $string)

Convert buggy Arabic string as HTML entities to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method html2utf [line 554]

string html2utf( string $string)

Convert buggy Arabic string as HTML entities to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method html2win [line 569]

string html2win( string $string)

Convert buggy Arabic string as HTML entities to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original corrupted Arabic string, usually when insert Arabic string as HTML entities.

[ Top ]

method iso2utf [line 342]

string iso2utf( string $string)

Convert Arabic string from ISO-8859-6 to UTF-8 format



Tags:

return:  Converted Arabic string in UTF-8 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in ISO-8859-6 format

[ Top ]

method iso2win [line 318]

string iso2win( string $string)

Convert Arabic string from ISO-8859-6 to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in ISO-8859-6 format

[ Top ]

method utf2iso [line 401]

string utf2iso( string $string)

Convert Arabic string from UTF-8 to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in UTF-8 format

[ Top ]

method utf2win [line 366]

string utf2win( string $string)

Convert Arabic string from UTF-8 to Windows-1256 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in UTF-8 format

[ Top ]

method win2html [line 293]

string win2html( string $string)

Convert Arabic string from Windows-1256 to HTML entities format



Tags:

return:  Converted Arabic string in HTML entities format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]

method win2iso [line 244]

string win2iso( string $string)

Convert Arabic string from Windows-1256 to ISO-8859-6 format



Tags:

return:  Converted Arabic string in ISO-8859-6 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]

method win2utf [line 268]

string win2utf( string $string)

Convert Arabic string from Windows-1256 to UTF-8 format



Tags:

return:  Converted Arabic string in Windows-1256 format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Original Arabic string in Windows-1256 format

[ Top ]

method _findISO [line 230]

integer _findISO( string $char)

Get extract position of a given ISO-8859-6 character



Tags:

return:  Extract position
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $char   ISO-8859-6 character

[ Top ]

method _findUTF [line 176]

integer _findUTF( string $char)

Get extract position of a given UTF character



Tags:

return:  Extract position
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $char   UTF character

[ Top ]

method _findWIN [line 203]

integer _findWIN( string $char)

Get extract position of a given Windows-1256 character



Tags:

return:  Extract position
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $char   Windows-1256 character

[ Top ]

method _getHTML [line 150]

string _getHTML( integer $index)

Get HTML entity from given position



Tags:

return:  HTML entity
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method _getISO [line 217]

string _getISO( integer $index)

Get ISO-8859-6 character from given position



Tags:

return:  ISO-8859-6 character
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method _getUTF [line 163]

string _getUTF( integer $index)

Get UTF character from given position



Tags:

return:  UTF character
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]

method _getWIN [line 190]

string _getWIN( integer $index)

Get Windows-1256 character from given position



Tags:

return:  Windows-1256 character
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

integer   $index   Extract position

[ Top ]


Documentation generated on Fri, 12 Mar 2010 01:01:42 +0300 by phpDocumentor 1.4.0