I18N_Arabic

# Class: I18N_Arabic

Source Location: /Arabic.php

### Class Overview

Core PHP and Arabic language class

#### Author(s):

- Khaled Al-Shamaa <khaled@ar-php.org>

#### Copyright:

- 2006-2016 Khaled Al-Shamaa

### Methods

- __construct
- __destruct
- autoload
- getBrowserLang
- getClassFile
- getInputCharset
- getOutputCharset
- header
- isForum
- load
- myErrorHandler
- setInputCharset
- setOutputCharset
- __call

### Class Details

[line 71]
Core PHP and Arabic language class

#### Tags:

author: | Khaled Al-Shamaa <khaled@ar-php.org>
copyright: | 2006-2016 Khaled Al-Shamaa
link: | http://www.ar-php.org
license: | LGPL

[ Top ]

### Class Methods

### static method autoload [line 168]

`static null autoload( string $className)`

Include file that include requested class

#### Tags:

author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $className | Class name

[ Top ]

### static method getBrowserLang [line 489]

`static string getBrowserLang( )`

Get web browser chosen/default language using ISO 639-1 codes (2-letter)

#### Tags:

return: | Language using ISO 639-1 codes (2-letter)
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

[ Top ]

### static method getClassFile [line 412]

`static string getClassFile( string $class)`

Get sub class file path to be included (mapping between class name and file name/path become independent now)

#### Tags:

return: | Sub class file path
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | protected

#### Parameters:

string | $class | Sub class name

[ Top ]

### static method isForum [line 506]

`static boolean isForum( string $html)`

There is still a lack of original, localized, high-quality content and well-structured Arabic websites; This method help in tag HTML result pages from Arabic forum to enable filter it in/out.

#### Tags:

return: | True if the input HTML is belong to a forum page
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $html | The HTML content of the page in question

[ Top ]

### static method myErrorHandler [line 184]

`static boolean myErrorHandler( int $errno, string $errstr, string $errfile, int $errline)`

Error handler function

#### Tags:

return: | FALSE
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

int | $errno | The level of the error raised
string | $errstr | The error message
string | $errfile | The filename that the error was raised in
int | $errline | The line number the error was raised at

[ Top ]

### constructor __construct [line 111]

`I18N_Arabic __construct( string $library, [boolean $useAutoload = false], [boolean $useException = false], [boolean $compatibleMode = true])`

Load selected library/class you would like to use its functionality

#### Tags:

author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $library | [AutoSummarize|CharsetC|CharsetD|Date|Gender| Glyphs|Identifier|KeySwap|Numbers|Query|Salat| Soundex|StrToTime|WordTag|CompressStr|Mktime| Transliteration|Stemmer|Standard|Normalise]
boolean | $useAutoload | True to use Autoload (default is false)
boolean | $useException | True to use Exception (default is false)
boolean | $compatibleMode | True to support old naming style before version 3.0 (default is true)

[ Top ]

### destructor __destruct [line 307]

`void __destruct( )`

Garbage collection, release child objects directly

#### Tags:

author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

[ Top ]

### method getInputCharset [line 375]

`string getInputCharset( )`

Get the charset used in the input Arabic strings

#### Tags:

return: | return current setting for class input Arabic charset
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

[ Top ]

### method getOutputCharset [line 392]

`string getOutputCharset( )`

Get the charset used in the output Arabic strings

#### Tags:

return: | return current setting for class output Arabic charset
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

[ Top ]

### method header [line 430]

`string header( [string $mode = 'http'], [resource $conn = null])`

Send/set output charset in several output media in a proper way

#### Tags:

return: | header formula if there is any (in cases of html, text_email, and html_email)
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $mode | [http|html|mysql|mysqli|pdo|text_email|html_email]
resource | $conn | The MySQL connection handler/the link identifier

[ Top ]

### method load [line 212]

`null load( string $library)`

Load selected Arabic library and create an instance of its class

#### Tags:

author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $library | Library name

[ Top ]

### method setInputCharset [line 323]

`TRUE setInputCharset( string $charset)`

Set charset used in class input Arabic strings

#### Tags:

return: | if success, or FALSE if fail
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $charset | Input charset [utf-8|windows-1256|iso-8859-6]

[ Top ]

### method setOutputCharset [line 350]

`boolean setOutputCharset( string $charset)`

Set charset used in class output Arabic strings

#### Tags:

return: | TRUE if success, or FALSE if fail
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $charset | Output charset [utf-8|windows-1256|iso-8859-6]

[ Top ]

### method __call [line 247]

`The __call( string $methodName, array $arguments)`

Magic method __call() allows to capture invocation of non existing methods.

That way __call() can be used to implement user defined method handling that depends on the name of the actual method being called.

#### Tags:

return: | value returned from the __call() method will be returned to the caller of the method.
author: | Khaled Al-Shamaa <khaled@ar-php.org>
access: | public

#### Parameters:

string | $methodName | Method name
array | $arguments | Array of arguments

[ Top ]

Documentation generated on Fri, 01 Jan 2016 10:25:49 +0200 by phpDocumentor 1.4.0