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

Source for file Arabic.php

Documentation is available at Arabic.php

  1. <?php
  2. /**
  3.  * ----------------------------------------------------------------------
  4.  *  
  5.  * Copyright (c) 2006-2012 Khaled Al-Shamaa.
  6.  *  
  7.  * http://www.ar-php.org
  8.  *  
  9.  * PHP Version 5
  10.  *  
  11.  * ----------------------------------------------------------------------
  12.  *  
  13.  * LICENSE
  14.  *
  15.  * This program is open source product; you can redistribute it and/or
  16.  * modify it under the terms of the GNU Lesser General Public License (LGPL)
  17.  * as published by the Free Software Foundation; either version 3
  18.  * of the License, or (at your option) any later version.
  19.  *  
  20.  * This program is distributed in the hope that it will be useful,
  21.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  23.  * GNU Lesser General Public License for more details.
  24.  *  
  25.  * You should have received a copy of the GNU Lesser General Public License
  26.  * along with this program.  If not, see <http://www.gnu.org/licenses/lgpl.txt>.
  27.  *  
  28.  * ----------------------------------------------------------------------
  29.  *  
  30.  * Class Name: PHP and Arabic Language
  31.  *  
  32.  * Filename:   Arabic.php
  33.  *  
  34.  * Original    Author(s): Khaled Al-Sham'aa <khaled@ar-php.org>
  35.  *  
  36.  * Purpose:    Set of PHP classes developed to enhance Arabic web
  37.  *             applications by providing set of tools includes stem-based searching,
  38.  *             translitiration, soundex, Hijri calendar, charset detection and
  39.  *             converter, spell numbers, keyboard language, Muslim prayer time,
  40.  *             auto-summarization, and more...
  41.  *              
  42.  * ----------------------------------------------------------------------
  43.  *
  44.  * @desc   Set of PHP classes developed to enhance Arabic web
  45.  *          applications by providing set of tools includes stem-based searching,
  46.  *          translitiration, soundex, Hijri calendar, charset detection and
  47.  *          converter, spell numbers, keyboard language, Muslim prayer time,
  48.  *          auto-summarization, and more...
  49.  *          
  50.  * @category  I18N
  51.  * @package   I18N_Arabic
  52.  * @author    Khaled Al-Shamaa <khaled@ar-php.org>
  53.  * @copyright 2006-2012 Khaled Al-Shamaa
  54.  *    
  55.  * @license   LGPL <http://www.gnu.org/licenses/lgpl.txt>
  56.  * @version   3.0.0 released in Feb 5, 2012
  57.  * @link      http://www.ar-php.org
  58.  */
  59.  
  60. // New in PHP V5.3: Namespaces
  61. // namespace I18N\Arabic;
  62.  
  63. // error_reporting(E_STRICT);
  64.  
  65. /**
  66.  * Core PHP and Arabic language class
  67.  *  
  68.  * @category  I18N
  69.  * @package   I18N_Arabic
  70.  * @author    Khaled Al-Shamaa <khaled@ar-php.org>
  71.  * @copyright 2006-2012 Khaled Al-Shamaa
  72.  *    
  73.  * @license   LGPL <http://www.gnu.org/licenses/lgpl.txt>
  74.  * @link      http://www.ar-php.org
  75.  */  
  76. {
  77.     private $_inputCharset  'utf-8';
  78.     private $_outputCharset 'utf-8';
  79.     private $_useAutoload;
  80.     private $_useException;
  81.     private $_compatibleMode;
  82.     
  83.     private $_compatible array('EnTransliteration'=>'Transliteration'
  84.                                   'ArTransliteration'=>'Transliteration',
  85.                                   'ArAutoSummarize'=>'AutoSummarize',
  86.                                   'ArCharsetC'=>'CharsetC',
  87.                                   'ArCharsetD'=>'CharsetD',
  88.                                   'ArDate'=>'Date',
  89.                                   'ArGender'=>'Gender',
  90.                                   'ArGlyphs'=>'Glyphs',
  91.                                   'ArIdentifier'=>'Identifier',
  92.                                   'ArKeySwap'=>'KeySwap',
  93.                                   'ArNumbers'=>'Numbers',
  94.                                   'ArQuery'=>'Query',
  95.                                   'ArSoundex'=>'Soundex',
  96.                                   'ArStrToTime'=>'StrToTime',
  97.                                   'ArWordTag'=>'WordTag',
  98.                                   'ArCompressStr'=>'CompressStr',
  99.                                   'ArMktime'=>'Mktime',
  100.                                   'ArStemmer'=>'Stemmer',
  101.                                   'ArStandard'=>'Standard',
  102.                                   'ArNormalise'=>'Normalise',
  103.                                   'a4_max_chars'=>'a4MaxChars',
  104.                                   'a4_lines'=>'a4Lines',
  105.                                   'swap_ea'=>'swapEa',
  106.                                   'swap_ae'=>'swapAe');
  107.     
  108.     /**
  109.      * @ignore
  110.      */
  111.     public $myObject;
  112.     
  113.     /**
  114.      * @ignore
  115.      */
  116.     public $myClass;
  117.     
  118.     /**
  119.      * @ignore
  120.      */
  121.     public $myFile;
  122.  
  123.     /**
  124.      * Load selected library/Arabic class you would like to use its functionality
  125.      *          
  126.      * @param string  $library        [AutoSummarize|CharsetC|CharsetD|Date|Gender|
  127.      *                                 Glyphs|Identifier|KeySwap|Numbers|Query|Salat|
  128.      *                                 Soundex|StrToTime|WordTag|CompressStr|Mktime|
  129.      *                                 Transliteration|Stemmer|Standard|Normalise]
  130.      * @param boolean $useAutoload    True to use Autoload (default is false)
  131.      * @param boolean $useException   True to use Exception (default is false)
  132.      * @param boolean $compatibleMode True to support old naming style before
  133.      *                                 version 3.0 (default is true)
  134.      *
  135.      * @desc Load selected library/class you would like to use its functionality
  136.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  137.      */
  138.     public function __construct($library$useAutoload=false
  139.                                 $useException=false$compatibleMode=true)
  140.     {
  141.         $this->_useAutoload    $useAutoload;
  142.         $this->_useException   $useException;
  143.         $this->_compatibleMode $compatibleMode;
  144.  
  145.         /* Set internal character encoding to UTF-8 */
  146.         mb_internal_encoding("utf-8");
  147.  
  148.         if ($this->_useAutoload{
  149.             // It is critical to remember that as soon as spl_autoload_register() is
  150.             // called, __autoload() functions elsewhere in the application may fail 
  151.             // to be called. This is safer initial call (PHP 5 >= 5.1.2):
  152.             if (false === spl_autoload_functions()) {
  153.                 if (function_exists('__autoload')) {
  154.                     spl_autoload_register('__autoload'false);
  155.                 }
  156.             }
  157.             
  158.             spl_autoload_extensions('.php,.inc,.class');
  159.             spl_autoload_register('I18N_Arabic::autoload'false);
  160.         }
  161.         
  162.         if ($this->_useException{
  163.             set_error_handler('I18N_Arabic::myErrorHandler');
  164.         }
  165.         
  166.         if ($library{
  167.             if ($this->_compatibleMode && 
  168.                 array_key_exists($library$this->_compatible)) {
  169.                 
  170.                 $library $this->_compatible[$library];
  171.             }
  172.  
  173.             $this->load($library);
  174.         }
  175.     }
  176.  
  177.     /**
  178.      * Include file that include requested class
  179.      * 
  180.      * @param string $className Class name
  181.      * 
  182.      * @return null 
  183.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  184.      */ 
  185.     public static function autoload($className
  186.     {
  187.         include self::getClassFile($className);
  188.     }
  189.  
  190.     /**
  191.      * Error handler function
  192.      * 
  193.      * @param int    $errno   The level of the error raised
  194.      * @param string $errstr  The error message
  195.      * @param string $errfile The filename that the error was raised in
  196.      * @param int    $errline The line number the error was raised at
  197.      * 
  198.      * @return boolean FALSE
  199.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  200.      */ 
  201.     public static function myErrorHandler($errno$errstr$errfile$errline)
  202.     {
  203.         if ($errfile == __FILE__ || 
  204.             file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'Arabic'.
  205.                                           DIRECTORY_SEPARATOR.basename($errfile))) {
  206.             $msg  '<b>Arabic Class Exception:</b> ';
  207.             $msg .= $errstr;
  208.             $msg .= " in <b>$errfile</b>";
  209.             $msg .= " on line <b>$errline</b><br />";
  210.     
  211.             throw new ArabicException($msg$errno);
  212.         }
  213.         
  214.         // If the function returns false then the normal error handler continues
  215.         return false;
  216.     }
  217.  
  218.     /**
  219.      * Load selected Arabic library and create an instance of its class
  220.      * 
  221.      * @param string $library Library name
  222.      * 
  223.      * @return null 
  224.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  225.      */ 
  226.     public function load($library)
  227.     {
  228.         if ($this->_compatibleMode && 
  229.             array_key_exists($library$this->_compatible)) {
  230.             
  231.             $library $this->_compatible[$library];
  232.         }
  233.  
  234.         $this->myFile  $library;
  235.         $this->myClass 'I18N_Arabic_' $library;
  236.         $class         'I18N_Arabic_' $library;
  237.  
  238.         if (!$this->_useAutoload{
  239.             include self::getClassFile($this->myFile)
  240.         }
  241.  
  242.         $this->myObject   new $class();
  243.         $this->{$library&$this->myObject;
  244.     }
  245.     
  246.     /**
  247.      * Magic method __call() allows to capture invocation of non existing methods.
  248.      * That way __call() can be used to implement user defined method handling that
  249.      * depends on the name of the actual method being called.
  250.      *
  251.      * @param string $methodName Method name
  252.      * @param array  $arguments  Array of arguments
  253.      * 
  254.      * @method Call a method from loaded sub class and take care of needed
  255.      *          character set conversion for both input and output values.
  256.      *
  257.      * @return The value returned from the __call() method will be returned to
  258.      *          the caller of the method.
  259.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  260.      */                                  
  261.     public function __call($methodName$arguments)
  262.     {
  263.         if ($this->_compatibleMode && 
  264.             array_key_exists($methodName$this->_compatible)) {
  265.             
  266.             $methodName $this->_compatible[$methodName];
  267.         }
  268.  
  269.         // Create an instance of the ReflectionMethod class
  270.         $method new ReflectionMethod($this->myClass$methodName);
  271.         
  272.         $params     array();
  273.         $parameters $method->getParameters();
  274.  
  275.         foreach ($parameters as $parameter{
  276.             $name  $parameter->getName();
  277.             $value array_shift($arguments);
  278.             
  279.             if (is_null($value&& $parameter->isDefaultValueAvailable()) {
  280.                 $value $parameter->getDefaultValue();
  281.             }
  282.             
  283.             $params[$name$this->coreConvert($value
  284.                                                 $this->getInputCharset()
  285.                                                 'utf-8');
  286.         }
  287.  
  288.         $value call_user_func_array(array(&$this->myObject$methodName)$params);
  289.  
  290.         if ($methodName == 'tagText'{
  291.             foreach ($value as $key=>$text{
  292.                 $value[$key][0$this->coreConvert($text[0]'utf-8'
  293.                                                      $this->getOutputCharset());
  294.             }
  295.         else {
  296.             $value $this->coreConvert($value'utf-8'$this->getOutputCharset());
  297.         }
  298.  
  299.         return $value;
  300.     }
  301.  
  302.     /**
  303.      * Garbage collection, release child objects directly
  304.      *          
  305.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  306.      */
  307.     public function __destruct(
  308.     {
  309.         $this->_inputCharset  null;
  310.         $this->_outputCharset null;
  311.         $this->myObject      null;
  312.         $this->myClass       null;
  313.     }
  314.  
  315.     /**
  316.      * Set charset used in class input Arabic strings
  317.      *          
  318.      * @param string $charset Input charset [utf-8|windows-1256|iso-8859-6]
  319.      *      
  320.      * @return TRUE if success, or FALSE if fail
  321.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  322.      */
  323.     public function setInputCharset($charset)
  324.     {
  325.         $flag true;
  326.         
  327.         $charset strtolower($charset);
  328.         
  329.         if (in_array($charsetarray('utf-8''windows-1256''iso-8859-6'))) {
  330.             $this->_inputCharset $charset;
  331.         else {
  332.             $flag false;
  333.         }
  334.         
  335.         return $flag;
  336.     }
  337.     
  338.     /**
  339.      * Set charset used in class output Arabic strings
  340.      *          
  341.      * @param string $charset Output charset [utf-8|windows-1256|iso-8859-6]
  342.      *      
  343.      * @return boolean TRUE if success, or FALSE if fail
  344.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  345.      */
  346.     public function setOutputCharset($charset)
  347.     {
  348.         $flag true;
  349.         
  350.         $charset strtolower($charset);
  351.         
  352.         if (in_array($charsetarray('utf-8''windows-1256''iso-8859-6'))) {
  353.             $this->_outputCharset $charset;
  354.         else {
  355.             $flag false;
  356.         }
  357.         
  358.         return $flag;
  359.     }
  360.  
  361.     /**
  362.      * Get the charset used in the input Arabic strings
  363.      *      
  364.      * @return string return current setting for class input Arabic charset
  365.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  366.      */
  367.     public function getInputCharset()
  368.     {
  369.         return $this->_inputCharset;
  370.     }
  371.     
  372.     /**
  373.      * Get the charset used in the output Arabic strings
  374.      *         
  375.      * @return string return current setting for class output Arabic charset
  376.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  377.      */
  378.     public function getOutputCharset()
  379.     {
  380.         return $this->_outputCharset;
  381.     }
  382.     
  383.     /**
  384.      * Convert Arabic string from one charset to another
  385.      *          
  386.      * @param string $str           Original Arabic string that you would like
  387.      *                               to convert
  388.      * @param string $inputCharset  Input charset
  389.      * @param string $outputCharset Output charset
  390.      *      
  391.      * @return string Converted Arabic string in defined charset
  392.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  393.      */
  394.     public function coreConvert($str$inputCharset$outputCharset)
  395.     {
  396.         if ($inputCharset != $outputCharset{
  397.             if ($inputCharset == 'windows-1256'{
  398.                 $inputCharset 'cp1256';
  399.             }
  400.             
  401.             if ($outputCharset == 'windows-1256'{
  402.                 $outputCharset 'cp1256';
  403.             }
  404.             
  405.             $convStr iconv($inputCharset"$outputCharset"$str);
  406.  
  407.             if ($convStr == '' && $str != ''{
  408.                 include self::getClassFile('CharsetC');
  409.  
  410.                 $c I18N_Arabic_CharsetC::singleton();
  411.                 
  412.                 if ($inputCharset == 'cp1256'{
  413.                     $convStr $c->win2utf($str);
  414.                 else {
  415.                     $convStr $c->utf2win($str);
  416.                 }
  417.             }
  418.         else {
  419.             $convStr $str;
  420.         }
  421.         
  422.         return $convStr;
  423.     }
  424.  
  425.     /**
  426.      * Convert Arabic string from one format to another
  427.      *          
  428.      * @param string $str           Arabic string in the format set by setInput
  429.      *                               Charset
  430.      * @param string $inputCharset  (optional) Input charset
  431.      *                               [utf-8|windows-1256|iso-8859-6]
  432.      *                               default value is NULL (use set input charset)
  433.      * @param string $outputCharset (optional) Output charset
  434.      *                               [utf-8|windows-1256|iso-8859-6]
  435.      *                               default value is NULL (use set output charset)
  436.      *                                  
  437.      * @return string Arabic string in the format set by method setOutputCharset
  438.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  439.      */
  440.     public function convert($str$inputCharset null$outputCharset null)
  441.     {
  442.         if ($inputCharset == null{
  443.             $inputCharset $this->_inputCharset;
  444.         }
  445.         
  446.         if ($outputCharset == null{
  447.             $outputCharset $this->_outputCharset;
  448.         }
  449.         
  450.         $str $this->coreConvert($str$inputCharset$outputCharset);
  451.  
  452.         return $str;
  453.     }
  454.  
  455.     /**
  456.      * Get sub class file path to be included (mapping between class name and
  457.      * file name/path become independent now)
  458.      *          
  459.      * @param string $class Sub class name
  460.      *                                  
  461.      * @return string Sub class file path
  462.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  463.      */
  464.     protected static function getClassFile($class)
  465.     {
  466.         $dir  dirname(__FILE__DIRECTORY_SEPARATOR 'Arabic';
  467.         $file $dir DIRECTORY_SEPARATOR $class '.php';
  468.  
  469.         return $file;
  470.     }
  471.     
  472.     /**
  473.      * Send/set output charset in several output media in a proper way
  474.      *
  475.      * @param string   $mode [http|html|mysql|mysqli|pdo|text_email|html_email]
  476.      * @param resource $conn The MySQL connection handler/the link identifier
  477.      *                                  
  478.      * @return string header formula if there is any (in cases of html, text_email, and html_email)
  479.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  480.      */
  481.     public static function header($mode 'http'$conn null)
  482.     {
  483.         $mode strtolower($mode);
  484.         $head '';
  485.         
  486.         switch ($mode{
  487.         case 'http':
  488.             header('Content-Type: text/html; charset=' $this->_outputCharset);
  489.             break;
  490.         
  491.         case 'html':
  492.             $head .= '<meta http-equiv="Content-type" content="text/html; charset=';
  493.             $head .= $this->_outputCharset '" />'
  494.             break;
  495.         
  496.         case 'text_email':
  497.             $head .= 'MIME-Version: 1.0\r\nContent-type: text/plain; charset=';
  498.             $head .= $this->_outputCharset '\r\n'
  499.             break;
  500.  
  501.         case 'html_email':
  502.             $head .= 'MIME-Version: 1.0\r\nContent-type: text/html; charset=';
  503.             $head .= $this->_outputCharset '\r\n'
  504.             break;
  505.         
  506.         case 'mysql':
  507.             if ($this->_outputCharset == 'utf-8'{
  508.                 mysql_set_charset('utf8');
  509.             elseif ($this->_outputCharset == 'windows-1256'{
  510.                 mysql_set_charset('cp1256');
  511.             }
  512.             break;
  513.  
  514.         case 'mysqli':
  515.             if ($this->_outputCharset == 'utf-8'{
  516.                 $conn->set_charset('utf8');
  517.             elseif ($this->_outputCharset == 'windows-1256'{
  518.                 $conn->set_charset('cp1256');
  519.             }
  520.             break;
  521.  
  522.         case 'pdo':
  523.             if ($this->_outputCharset == 'utf-8'{
  524.                 $conn->exec('SET NAMES utf8');
  525.             elseif ($this->_outputCharset == 'windows-1256'{
  526.                 $conn->exec('SET NAMES cp1256');
  527.             }
  528.             break;
  529.         }
  530.         
  531.         return $head;
  532.     }
  533.  
  534.  
  535.     /**
  536.      * Get web browser chosen/default language using ISO 639-1 codes (2-letter)
  537.      *          
  538.      * @return string Language using ISO 639-1 codes (2-letter)
  539.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  540.      */
  541.     public static function getBrowserLang()
  542.     {
  543.         $lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE']02)// ar, en, etc...
  544.  
  545.         return $lang;
  546.     }
  547.  
  548.     /**
  549.      * Renders regular expression pattern using an enhanced version of syntax and semantics
  550.      * to support arabic version of some specifying generic character types
  551.      *
  552.      * @param string  $pattern The pattern to search for, as a string using syntax and
  553.      *                          semantics of the regular expressions enhanced by arabic
  554.      *                          version of some specifying generic character types:
  555.      *                          \[ar]w    any Arabic letter (including Harakat and Tatweel if $vowels is true)
  556.      *                          \[ar]d    any decimal Arabic-Indic digit
  557.      *                          \[ar]v    any Arabic vowel character (i.e. Harakat including Tatweel)
  558.      *                          \[ar]p    any Arabic puncation character
  559.      *                          \[ar]W    any character that is not an  Arabic letter (including Harakat and Tatweel if $vowels is true)
  560.      *                          \[ar]D    any character that is not a decimal Arabic-Indic digit
  561.      *                          \[ar]V    any character that is not an Arabic vowel character (i.e. Harakat including Tatweel)
  562.      *                          \[ar]P    any character that is not an Arabic puncation character
  563.      * @param boolean $vowels  True will include Harakat and Tatweel to the Arabic
  564.      *                          letters set (default is true)
  565.      *
  566.      * @return string Rendered regular expression pattern
  567.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  568.      */
  569.     public static function pregPattern($pattern$vowels=true)
  570.     {
  571.         /**
  572.          * PCRE Patterns - Pattern Modifiers: u (PCRE8) 
  573.          * This modifier turns on additional functionality of PCRE that is 
  574.          * incompatible with Perl. Pattern strings are treated as UTF-8.
  575.          * This modifier is available from PHP 4.1.0 or greater on Unix and 
  576.          * from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked 
  577.          * since PHP 4.3.5
  578.          */
  579.          
  580.         $arDigits    '\x{0660}-\x{0669}'// Arabic-Indic digits
  581.         $arVowels    '\x{0640}\x{064B}-\x{0652}'// Harakat including Tatweel
  582.         $arLetters   '\x{0621}-\x{063A}\x{0641}-\x{064A}'// Arabic letters
  583.         $arPuncation '\x{060C}\x{060D}\x{061B}-\x{061F}\x{2E2E}\x{066A}-\x{066D}'// Puncation
  584.     
  585.         if ($vowels === true{
  586.             $arLetters .= $arVowels;
  587.         }
  588.         
  589.         $pattern str_replace('\[ar]w'$arLetters$pattern);
  590.         $pattern str_replace('\[ar]d'$arDigits$pattern);
  591.         $pattern str_replace('\[ar]v'$arVowels$pattern);
  592.         $pattern str_replace('\[ar]p'$arPuncation$pattern);
  593.         
  594.         $pattern str_replace('\[ar]W'"[^$arLetters]"$pattern);
  595.         $pattern str_replace('\[ar]D'"[^$arDigits]"$pattern);
  596.         $pattern str_replace('\[ar]V'"[^$arVowels]"$pattern);
  597.         $pattern str_replace('\[ar]P'"[^$arPuncation]"$pattern);
  598.         
  599.         return $pattern;
  600.     }
  601.     
  602.     /**
  603.      * There is still a lack of original, localized, high-quality content and well-structured
  604.      * Arabic websites; This method help in tag HTML result pages from Arabic forum to enable
  605.      * filter it in/out.
  606.      *
  607.      * @param string  $html The HTML content of the page in question
  608.      *
  609.      * @return boolean True if the input HTML is belong to a forum page
  610.      * @author Khaled Al-Shamaa <khaled@ar-php.org>
  611.      */
  612.     public static function isForum($html)
  613.     {
  614.         $forum FALSE;
  615.         
  616.         if (strpos($html'vBulletin_init();'!== FALSE{
  617.             $forum TRUE;
  618.         }
  619.         
  620.         return $forum;
  621.     }
  622. }
  623.  
  624. /**
  625.  * Arabic Exception class defined by extending the built-in Exception class.
  626.  *  
  627.  * @category  I18N
  628.  * @package   I18N_Arabic
  629.  * @author    Khaled Al-Shamaa <khaled@ar-php.org>
  630.  * @copyright 2006-2012 Khaled Al-Shamaa
  631.  *    
  632.  * @license   LGPL <http://www.gnu.org/licenses/lgpl.txt>
  633.  * @link      http://www.ar-php.org
  634.  */  
  635. class ArabicException extends Exception
  636. {
  637.     /**
  638.      * Make sure everything is assigned properly
  639.      * 
  640.      * @param string $message Exception message
  641.      * @param int    $code    User defined exception code
  642.      */         
  643.     public function __construct($message$code=0)
  644.     {
  645.         parent::__construct($message$code);
  646.     }
  647. }

Documentation generated on Wed, 29 Aug 2012 08:32:46 +0200 by phpDocumentor 1.4.0