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

Class: I18N_Arabic_Glyphs

Source Location: /Arabic/Glyphs.php

Class Overview


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


Author(s):

Copyright:

  • 2006-2016 Khaled Al-Sham'aa

Methods



Class Details

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



Tags:

author:  Khaled Al-Sham'aa <khaled@ar-php.org>
copyright:  2006-2016 Khaled Al-Sham'aa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


method a4Lines [line 335]

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-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

string   $str   Arabic string you would like to split it into lines
integer   $font   Font size

[ Top ]

method a4MaxChars [line 318]

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-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

integer   $font   Font size

[ Top ]

method decodeEntities [line 557]

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

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

string getGlyphs( string $char, integer $type)

Get glyphs



Tags:

access:  protected


Parameters:

string   $char   Char
integer   $type   Type

[ Top ]

method preConvert [line 195]

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-Sham'aa <khaled@ar-php.org>
access:  protected


Parameters:

string   $str   Arabic string in Windows-1256 charset

[ Top ]

method utf8Glyphs [line 385]

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-Sham'aa <khaled@ar-php.org>
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 Fri, 01 Jan 2016 10:26:02 +0200 by phpDocumentor 1.4.0