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

Class: ArSoundex

Source Location: /sub/ArSoundex.class.php

Class Overview


This PHP class implement Arabic soundex algorithm


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 109]
This PHP class implement Arabic soundex algorithm



Tags:

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


[ Top ]


Class Methods


constructor __construct [line 123]

ArSoundex __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method getCode [line 230]

string getCode( )

Get the soundex key calculation method used now



Tags:

return:  return current setting for soundex key calculation method
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getLang [line 219]

string getLang( )

Get the soundex key language used now



Tags:

return:  return current setting for soundex key language
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method getLen [line 208]

integer getLen( )

Get the soundex key length used now



Tags:

return:  return current setting for soundex key length
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


[ Top ]

method setCode [line 182]

boolean setCode( string $str)

Set the mapping code of the soundex key (default value is "soundex")



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Soundex key mapping code [soundex|phonix]

[ Top ]

method setLang [line 159]

boolean setLang( string $str)

Set the language of the soundex key (default value is "en")



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Soundex key language [ar|en]

[ Top ]

method setLen [line 142]

boolean setLen( integer $integer)

Set the length of soundex key (default value is 4)



Tags:

return:  TRUE if success, or FALSE if fail
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $integer   Soundex key length

[ Top ]

method soundex [line 296]

string soundex( string $word, [string $inputCharset = null], [string $outputCharset = null], [object $main = null])

Arabic soundex algorithm takes Arabic word as an input and produces a character string which identifies a set words that are (roughly) phonetically alike.



Tags:

return:  Soundex value for a given Arabic word
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $word   Arabic word you want to calculate its soundex
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]


Documentation generated on Tue, 18 Aug 2009 00:12:50 +0300 by phpDocumentor 1.4.0