Zend_Text_Figlet is a PHP implementation of FIGlet
category | Zend |
---|---|
package | Zend_Text_Figlet |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__construct(array|\Zend_Config $options = null
)
array
\Zend_Config
Options for the output
render(string $text, string $encoding = 'UTF-8'
) : string
string
Text to convert to a figlet text
string
Encoding of the input string
\InvalidArgumentException |
When $text is not a string |
---|---|
\Zend_Text_Figlet_Exception |
When $text it not properly encoded |
string
setConfig(\Zend_Config $config) : \Zend_Text_Figlet
\Zend_Config
Configuration for Zend_Text_Figlet
\Zend_Text_Figlet
setFont(string $font) : \Zend_Text_Figlet
string
Path to the font
\Zend_Text_Figlet
setHandleParagraphs(boolean $handleParagraphs) : \Zend_Text_Figlet
boolean
Wether to handle paragraphs or not
\Zend_Text_Figlet
setJustification(integer $justification) : \Zend_Text_Figlet
integer
Justification of the output text
\Zend_Text_Figlet
setOptions(array $options) : \Zend_Text_Figlet
array
Configuration for Zend_Text_Figlet
\Zend_Text_Figlet
setOutputWidth(integer $outputWidth) : \Zend_Text_Figlet
integer
Output with which should be used for word wrapping and justification
\Zend_Text_Figlet
setRightToLeft(integer $rightToLeft) : \Zend_Text_Figlet
integer
Right-to-left mode
\Zend_Text_Figlet
setSmushMode(integer $smushMode) : \Zend_Text_Figlet
Use one of the constants of Zend_TextFiglet::SM*, you may combine them.
integer
Smush mode to use for generating text
\Zend_Text_Figlet
_addChar(string $char) : boolean
Returns true if this can be done, false otherwise.
string
Character which to add to the output
boolean
_appendLine() : void
_clearLine() : void
_getLetter(string $char) : void
string
The character from which to get the letter of
_loadChar(resource $fp) : array
resource
File pointer to the font file
array
_loadFont(string $fontFile) : void
string
Font file to load
\Zend_Text_Figlet_Exception |
When font file was not found |
---|---|
\Zend_Text_Figlet_Exception |
When GZIP library is required but not found |
\Zend_Text_Figlet_Exception |
When font file is not readable |
_putString(string $string) : void
string
The string to add to the output
_readMagic(resource $fp) : string
resource
File pointer to the font file
string
_setUsedSmush() : void
_skipToEol(resource $fp) : void
resource
File pointer to the font file
_smushAmount() : integer
integer
_smushem(string $leftChar, string $rightChar) : string
Smushmode values are sum of following (all values smush blanks):
1: Smush equal chars (not hardblanks) 2: Smush '_' with any char in hierarchy below 4: hierarchy: "|", "/\", "[]", "{}", "()", "<>" Each class in hier. can be replaced by later class. 8: [ + ] -> |, { + } -> |, ( + ) -> | 16: / + \ -> X, > + < -> X (only in that order) 32: hardblank + hardblank -> hardblank
string
Left character to smush
string
Right character to smush
string
_splitLine() : void
Makes a new line out of the first part and appends it using appendLine(). Makes a new line out of the second part and returns.
_uniOrd(string $c) : integer
string
The char to get the value from
integer
$_charHeight : integer
$_charList : array
array()
$_currentChar : array
null
$_currentCharWidth : integer
0
$_fontLoaded : boolean
false
$_fontOptions : array
array()
$_fontSmush : integer
0
$_germanChars : array
array(196, 214, 220, 228, 246, 252, 223)
LATIN CAPITAL LETTER A WITH DIAERESIS = A-umlaut LATIN CAPITAL LETTER O WITH DIAERESIS = O-umlaut LATIN CAPITAL LETTER U WITH DIAERESIS = U-umlaut LATIN SMALL LETTER A WITH DIAERESIS = a-umlaut LATIN SMALL LETTER O WITH DIAERESIS = o-umlaut LATIN SMALL LETTER U WITH DIAERESIS = u-umlaut LATIN SMALL LETTER SHARP S = ess-zed
$_handleParagraphs : boolean
false
$_hardBlank : string
$_inCharLine : string
$_inCharLineLength : integer
0
$_inCharLineLengthLimit : integer
0
$_justification : integer
null
For using font default, this parameter should be null, else one of the values of Zend_TextFiglet::JUSTIFICATION*
$_maxLength : integer
$_outlineLength : integer
0
$_outlineLengthLimit : integer
0
$_output : string
$_outputLine : array
$_outputWidth : integer
80
$_previousCharWidth : integer
0
$_rightToLeft : integer
null
For using font default, this parameter should be null, else one of the values of Zend_TextFiglet::DIRECTION*
$_skipOptions : array
array('options', 'config')
$_smushMode : integer
0
$_smushOverride : integer
0
$_userSmush : integer
0
DIRECTION_LEFT_TO_RIGHT = 0
DIRECTION_RIGHT_TO_LEFT = 1
FONTFILE_MAGIC_NUMBER = 'flf2'
JUSTIFICATION_CENTER = 1
JUSTIFICATION_LEFT = 0
JUSTIFICATION_RIGHT = 2
SMO_FORCE = 2
SMO_NO = 0
SMO_YES = 1
SM_BIGX = 16
SM_EQUAL = 1
SM_HARDBLANK = 32
SM_HIERARCHY = 4
SM_KERN = 64
SM_LOWLINE = 2
SM_PAIR = 8
SM_SMUSH = 128