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:

  • 2006-2010 Khaled Al-Shamaa

Variables

Methods



Class Details

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



Tags:

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


[ Top ]


Class Variables

static $glyphs =  null

[line 88]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $hex =  null

[line 89]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $nextLink =  null

[line 91]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $prevLink =  null

[line 90]



Tags:

access:  protected

Type:   mixed


[ Top ]

$a4LinesInput =  'windows-1256'

[line 97]

"a4Lines" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$a4LinesVars = array('str')

[line 103]

Name of the textual "a4Lines" method parameters



Tags:

access:  public

Type:   Array


[ Top ]

$utf8GlyphsInput =  'windows-1256'

[line 109]

"utf8Glyphs" method input charset



Tags:

access:  public

Type:   String


[ Top ]

$utf8GlyphsVars = array('str')

[line 115]

Name of the textual "utf8Glyphs" method parameters



Tags:

access:  public

Type:   Array


[ Top ]



Class Methods


constructor __construct [line 120]

ArGlyphs __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method a4Lines [line 336]

integer a4Lines( string $str, integer $font)

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

[ Top ]

method a4MaxChars [line 319]

integer a4MaxChars( 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 decodeEntities [line 489]

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 546]

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 192]

string getGlyphs( string $char, integer $type)

Get glyphs



Tags:

access:  protected


Parameters:

string   $char   Char
integer   $type   Type

[ Top ]

method preConvert [line 215]

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 ]

method utf8Glyphs [line 386]

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

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

[ Top ]


Documentation generated on Sat, 14 Aug 2010 13:23:55 -0700 by phpDocumentor 1.4.0