Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct ($options=null) | |
setOptions (array $options) | |
setConfig (Zend_Config $config) | |
setFont ($font) | |
setHandleParagraphs ($handleParagraphs) | |
setJustification ($justification) | |
setOutputWidth ($outputWidth) | |
setRightToLeft ($rightToLeft) | |
setSmushMode ($smushMode) | |
render ($text, $encoding='UTF-8') | |
Data Fields | |
const | SM_EQUAL = 0x01 |
const | SM_LOWLINE = 0x02 |
const | SM_HIERARCHY = 0x04 |
const | SM_PAIR = 0x08 |
const | SM_BIGX = 0x10 |
const | SM_HARDBLANK = 0x20 |
const | SM_KERN = 0x40 |
const | SM_SMUSH = 0x80 |
const | SMO_NO = 0 |
const | SMO_YES = 1 |
const | SMO_FORCE = 2 |
const | JUSTIFICATION_LEFT = 0 |
const | JUSTIFICATION_CENTER = 1 |
const | JUSTIFICATION_RIGHT = 2 |
const | DIRECTION_LEFT_TO_RIGHT = 0 |
const | DIRECTION_RIGHT_TO_LEFT = 1 |
const | FONTFILE_MAGIC_NUMBER = 'flf2' |
Protected Member Functions | |
_putString ($string) | |
_appendLine () | |
_splitLine () | |
_clearLine () | |
_addChar ($char) | |
_getLetter ($char) | |
_smushAmount () | |
_smushem ($leftChar, $rightChar) | |
_loadFont ($fontFile) | |
_setUsedSmush () | |
_readMagic ($fp) | |
_skipToEol ($fp) | |
_loadChar ($fp) | |
_uniOrd ($c) | |
Protected Attributes | |
$_charList = array() | |
$_fontLoaded = false | |
$_germanChars = array(196, 214, 220, 228, 246, 252, 223) | |
$_outputWidth = 80 | |
$_hardBlank | |
$_charHeight | |
$_maxLength | |
$_smushMode = 0 | |
$_fontSmush = 0 | |
$_userSmush = 0 | |
$_handleParagraphs = false | |
$_justification = null | |
$_rightToLeft = null | |
$_smushOverride = 0 | |
$_fontOptions = array() | |
$_previousCharWidth = 0 | |
$_currentCharWidth = 0 | |
$_outlineLength = 0 | |
$_outlineLengthLimit = 0 | |
$_inCharLine | |
$_inCharLineLength = 0 | |
$_inCharLineLengthLimit = 0 | |
$_currentChar = null | |
$_outputLine | |
$_output | |
$_skipOptions | |
Definition at line 30 of file Figlet.php.
__construct | ( | $options = null | ) |
Instantiate the FIGlet with a specific font. If no font is given, the standard font is used. You can also supply multiple options via the $options variable, which can either be an array or an instance of Zend_Config.
array | Zend_Config | $options | Options for the output |
Definition at line 276 of file Figlet.php.
|
protected |
Attempts to add the given character onto the end of the current line. Returns true if this can be done, false otherwise.
string | $char | Character which to add to the output |
Definition at line 658 of file Figlet.php.
|
protected |
|
protected |
|
protected |
Gets the requested character and sets current and previous char width.
string | $char | The character from which to get the letter of |
Definition at line 716 of file Figlet.php.
|
protected |
Load a single character from the font file
resource | $fp | File pointer to the font file |
Definition at line 1184 of file Figlet.php.
|
protected |
Load the specified font
string | $fontFile | 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 |
Definition at line 967 of file Figlet.php.
|
protected |
Puts the given string, substituting blanks for hardblanks. If outputWidth is 1, puts the entire string; otherwise puts at most outputWidth - 1 characters. Puts a newline at the end of the string. The string is left- justified, centered or right-justified (taking outputWidth as the screen width) if justification is 0, 1 or 2 respectively.
string | $string | The string to add to the output |
Definition at line 554 of file Figlet.php.
|
protected |
Reads a four-character magic string from a stream
resource | $fp | File pointer to the font file |
Definition at line 1139 of file Figlet.php.
|
protected |
Set the used smush mode, according to smush override, user smsush and font smush.
Definition at line 1122 of file Figlet.php.
|
protected |
Skip a stream to the end of line
resource | $fp | File pointer to the font file |
Definition at line 1156 of file Figlet.php.
|
protected |
Returns the maximum amount that the current character can be smushed into the current line.
Definition at line 733 of file Figlet.php.
|
protected |
Given two characters, attempts to smush them into one, according to the current smushmode. Returns smushed character or false if no smushing can be done.
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 | $leftChar | Left character to smush |
string | $rightChar | Right character to smush |
Definition at line 842 of file Figlet.php.
|
protected |
Splits inCharLine at the last word break (bunch of consecutive blanks). 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.
Definition at line 596 of file Figlet.php.
|
protected |
Unicode compatible ord() method
string | $c | The char to get the value from |
Definition at line 1211 of file Figlet.php.
render | ( | $text, | |
$encoding = 'UTF-8' |
|||
) |
Render a FIGlet text
string | $text | Text to convert to a figlet text |
string | $encoding | Encoding of the input string |
InvalidArgumentException | When $text is not a string |
Zend_Text_Figlet_Exception | When $text it not properly encoded |
Definition at line 427 of file Figlet.php.
setConfig | ( | Zend_Config | $config | ) |
Set options from config object
Zend_Config | $config | Configuration for Zend_Text_Figlet |
Definition at line 318 of file Figlet.php.
setFont | ( | $font | ) |
Set a font to use
string | $font | Path to the font |
Definition at line 329 of file Figlet.php.
setHandleParagraphs | ( | $handleParagraphs | ) |
Set handling of paragraphs
boolean | $handleParagraphs | Wether to handle paragraphs or not |
Definition at line 341 of file Figlet.php.
setJustification | ( | $justification | ) |
Set the justification. 0 stands for left aligned, 1 for centered and 2 for right aligned.
integer | $justification | Justification of the output text |
Definition at line 354 of file Figlet.php.
setOptions | ( | array | $options | ) |
Set options from array
array | $options | Configuration for Zend_Text_Figlet |
Definition at line 297 of file Figlet.php.
setOutputWidth | ( | $outputWidth | ) |
Set the output width
integer | $outputWidth | Output with which should be used for word wrapping and justification |
Definition at line 367 of file Figlet.php.
setRightToLeft | ( | $rightToLeft | ) |
Set right to left mode. For writing from left to right, use Zend_Text_Figlet::DIRECTION_LEFT_TO_RIGHT. For writing from right to left, use Zend_Text_Figlet::DIRECTION_RIGHT_TO_LEFT.
integer | $rightToLeft | Right-to-left mode |
Definition at line 381 of file Figlet.php.
setSmushMode | ( | $smushMode | ) |
Set the smush mode.
Use one of the constants of Zend_Text_Figlet::SM_*, you may combine them.
integer | $smushMode | Smush mode to use for generating text |
Definition at line 395 of file Figlet.php.
|
protected |
Definition at line 117 of file Figlet.php.
|
protected |
Definition at line 74 of file Figlet.php.
|
protected |
Definition at line 242 of file Figlet.php.
|
protected |
Definition at line 200 of file Figlet.php.
|
protected |
Definition at line 81 of file Figlet.php.
|
protected |
Definition at line 186 of file Figlet.php.
|
protected |
Definition at line 138 of file Figlet.php.
|
protected |
Definition at line 96 of file Figlet.php.
|
protected |
Definition at line 152 of file Figlet.php.
|
protected |
Definition at line 110 of file Figlet.php.
|
protected |
Definition at line 221 of file Figlet.php.
|
protected |
Definition at line 228 of file Figlet.php.
|
protected |
Definition at line 235 of file Figlet.php.
|
protected |
Definition at line 162 of file Figlet.php.
|
protected |
Definition at line 124 of file Figlet.php.
|
protected |
Definition at line 207 of file Figlet.php.
|
protected |
Definition at line 214 of file Figlet.php.
|
protected |
Definition at line 256 of file Figlet.php.
|
protected |
Definition at line 249 of file Figlet.php.
|
protected |
Definition at line 103 of file Figlet.php.
|
protected |
Definition at line 193 of file Figlet.php.
|
protected |
Definition at line 172 of file Figlet.php.
|
protected |
Definition at line 263 of file Figlet.php.
|
protected |
Definition at line 131 of file Figlet.php.
|
protected |
Definition at line 179 of file Figlet.php.
|
protected |
Definition at line 145 of file Figlet.php.
const DIRECTION_LEFT_TO_RIGHT = 0 |
Write directions
Definition at line 61 of file Figlet.php.
const DIRECTION_RIGHT_TO_LEFT = 1 |
Definition at line 62 of file Figlet.php.
const FONTFILE_MAGIC_NUMBER = 'flf2' |
Magic fontfile number
Definition at line 67 of file Figlet.php.
const JUSTIFICATION_CENTER = 1 |
Definition at line 55 of file Figlet.php.
const JUSTIFICATION_LEFT = 0 |
Justifications
Definition at line 54 of file Figlet.php.
const JUSTIFICATION_RIGHT = 2 |
Definition at line 56 of file Figlet.php.
const SM_BIGX = 0x10 |
Definition at line 39 of file Figlet.php.
const SM_EQUAL = 0x01 |
Smush2 layout modes
Definition at line 35 of file Figlet.php.
const SM_HARDBLANK = 0x20 |
Definition at line 40 of file Figlet.php.
const SM_HIERARCHY = 0x04 |
Definition at line 37 of file Figlet.php.
const SM_KERN = 0x40 |
Definition at line 41 of file Figlet.php.
const SM_LOWLINE = 0x02 |
Definition at line 36 of file Figlet.php.
const SM_PAIR = 0x08 |
Definition at line 38 of file Figlet.php.
const SM_SMUSH = 0x80 |
Definition at line 42 of file Figlet.php.
const SMO_FORCE = 2 |
Definition at line 49 of file Figlet.php.
const SMO_NO = 0 |
Smush mode override modes
Definition at line 47 of file Figlet.php.
const SMO_YES = 1 |
Definition at line 48 of file Figlet.php.