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

Class: ArGlyphs

Source Location: /sub/ArGlyphs.class.php

Class Overview


This PHP class render Arabic text by performs Arabic glyph joining on it


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 84]
This PHP class render Arabic text by performs Arabic glyph joining on it



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

$_glyphs =  null

[line 86]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_hex =  null

[line 87]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_nextLink =

[line 89]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_prevLink =

[line 88]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 94]

ArGlyphs __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method a4_lines [line 279]

integer a4_lines( string $str, integer $font, [string $inputCharset = null], [object $main = null])

Calculate the lines number of given Arabic text and font size that will fit in A4 page size



Tags:

return:  Number of lines for a given Arabic string in A4 page size
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Arabic string you would like to split it into lines
integer   $font   Font size
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method a4_max_chars [line 260]

integer a4_max_chars( integer $font)

Regression analysis calculate roughly the max number of character fit in one A4 page line for a given font size.



Tags:

return:  Maximum number of characters per line
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $font   Font size

[ Top ]

method utf8Glyphs [line 337]

string utf8Glyphs( string $str, [integer $max_chars = 50], [boolean $hindo = true], [string $inputCharset = null], [object $main = null])

Convert Arabic Windows-1256 charset string into glyph joining in UTF-8 hexadecimals stream (take care of whole the document including English sections as well as numbers and arcs etc...)



Tags:

return:  Arabic glyph joining in UTF-8 hexadecimals stream (take care of whole document including English sections as well as numbers and arcs etc...)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Arabic string in Windows-1256 charset
integer   $max_chars   Max number of chars you can fit in one line
boolean   $hindo   If true use Hindo digits else use Arabic digits
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method _decodeEntities [line 440]

string _decodeEntities( string $text, [array $exclude = array()])

Decode all HTML entities (including numerical ones) to regular UTF-8 bytes.

Double-escaped entities will only be decoded once ("&amp;lt;" becomes "&lt;", not "<").




Tags:

access:  protected


Parameters:

string   $text   The text to decode entities in.
array   $exclude   An array of characters which should not be decoded. For example, array('<', '&', '"'). This affects both named and numerical entities.

[ Top ]

method _decodeEntities2 [line 494]

string _decodeEntities2( string $prefix, string $codepoint, string $original, array &$table, array &$exclude)

Helper function for _decodeEntities



Tags:

access:  protected


Parameters:

string   $prefix   Prefix
string   $codepoint   Codepoint
string   $original   Original
array   &$table   Store named entities in a table
array   &$exclude   An array of characters which should not be decoded

[ Top ]

method _getGlyphs [line 140]

string _getGlyphs( string $char, integer $type)

Get glyphs



Tags:

access:  protected


Parameters:

string   $char   Char
integer   $type   Type

[ Top ]

method _preConvert [line 163]

string _preConvert( string $str)

Convert Arabic Windows-1256 charset string into glyph joining in UTF-8 hexadecimals stream



Tags:

return:  Arabic glyph joining in UTF-8 hexadecimals stream
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  protected


Parameters:

string   $str   Arabic string in Windows-1256 charset

[ Top ]


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