Package pyarabic :: Module number :: Class ArNumbers
[hide private]
[frames] | no frames]

Class ArNumbers

source code

Arabic number class

Instance Methods [hide private]
 
__init__(self) source code
 
set_feminine(self, value)
* Set feminine flag of the counted object * * @param integer value Counted object feminine (1 for masculine & 2 for feminine) * * @return boolean True if success, or False if fail * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
set_format(self, value)
* Set the grammar position flag of the counted object * * @param integer value Grammar position of counted object * (1 if Marfoua & 2 if Mansoub or Majrour) * * @return boolean True if success, or False if fail * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
get_feminine(self)
* Get the feminine flag of counted object * * @return integer return current setting of counted object feminine flag * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
get_format(self)
* Get the grammer position flag of counted object * * @return integer return current setting of counted object grammer * position flag * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
int2str(self, number, output_charset=None, main=None)
* Spell integer number in Arabic idiom * * @param integer number The number you want to spell in Arabic idiom * @param string outputCharset (optional) Output charset [utf-8|windows-1256|iso-8859-6] * default value is None (use set output charset) * @param object main Main Ar-PHP object to access charset converter options * * @return string The Arabic idiom that spells inserted number * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
_int2str(self, number)
* Spell integer number in Arabic idiom * * @param integer number The number you want to spell in Arabic idiom * * @return string The Arabic idiom that spells inserted number * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
 
_written_block(self, number)
Spell sub block number of three digits max in Arabic idiom * * @param integer number Sub block number of three digits max you want to * spell in Arabic idiom * * @return string The Arabic idiom that spells inserted sub block * @author Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
source code
Class Variables [hide private]
  _individual = {}
  _feminine = 1
  _format = 1