PHP_BeautifierImplements interfaces:
PHP_Beautifier
Class to beautify php code How to use:
Located in //usr/share/php/PHP/Beautifier.php (line 82)
string
$aAssocs
= array() (line 186)
Association $aTokens=>$aOut
array
$aModes
= array() (line 113)
Contains the assigment of modes
array
$aModesAvailable
= array(List of availables modes
array
$aOut
= array() (line 105)
Stores the output
array
$aSettings
= array() (line 126)
Settings for the class
array
$aTokenFunctions
= array() (line 95)
Tokens codes assigned to method on Filter
array
$aTokenNames
= array() (line 100)
Token Names
array
$aTokens
= array() (line 90)
Tokens created by the tokenizer
string
$currentWhitespace
= '' (line 181)
Save the last whitespace used. Use only for Filter! (i miss friends of C++ :( )
int
$iArray
= 0 (line 141)
Level of array nesting
int
$iCount
= 0 (line 131)
Index of current token
int
$iIndentNumber
= 4 (line 136)
Chars for indentation
int
$iParenthesis
= 0 (line 151)
Level of parenthesis nesting
int
$iTernary
= 0 (line 146)
Level of ternary operator nesting
int
$iVerbose
= false (line 156)
Level of verbosity (debug)
string
$sIndentChar
= ' ' (line 176)
Type of whitespace to use for indent
string
$sInputFile
= '' (line 161)
Name of input file
string
$sNewLine
= PHP_EOL (line 171)
Type of newline
string
$sOutputFile
= '' (line 166)
Name of output file
Constructor __construct (line 241)
Constructor.
Assing values to $aControlStructures,$aControlStructuresEnd, $aTokenFunctions
add (line 1112)
Add a string to the output
addFilter (line 429)
Add a Filter to the Beautifier The first argument is the name of the file of the Filter.
addFilterDirectory (line 398)
Add a filter directory
addIndent (line 1134)
Add Indent to the output
addNewLine (line 1151)
Add a new line to the output
addNewLineIndent (line 1166)
Add a new line and a indent to output
decIndent (line 1191)
Decrements the indent.
get (line 1038)
Returns the beautified code
getControlParenthesis (line 1070)
Get the token constant for the current Parenthesis
getControlSeq (line 1060)
Get the token constant for the current control construct
getFilterDescription (line 470)
Return the Filter Description
getFilterDirectories (line 411)
Return an array with all the Filter Dirs
getFilterList (line 513)
Get the names of the loaded filters
getFilterListTotal (line 524)
Get the list of all available Filters in all the include Dirs
getIndentChar (line 546)
getIndentNumber (line 550)
getMode (line 1100)
Get the state of a mode
getNewLine (line 554)
getNextTokenConstant (line 1332)
Get the 'x' significant (non whitespace) next token constant
getNextTokenContent (line 1342)
Get the 'x' significant (non whitespace) next token text
getNextTokenNonCommentConstant (line 1318)
getPreviousTokenConstant (line 1303)
Get the 'x' significant (non whitespace) previous token constant
getPreviousTokenContent (line 1313)
Get the 'x' significant (non whitespace) previous token text
getPreviousWhitespace (line 1355)
Return the whitespace previous to current token
Ex.: You have ' if($a)' if you call this funcion on 'if', you get ' '
getSetting (line 1051)
Returns the value of a settings
getToken (line 1417)
Get a token by number
getTokenAssoc (line 777)
Get the reference to $aOut, based on the number of the token
getTokenAssocText (line 786)
Get the output for the specified token
getTokenFunction (line 815)
Return the function for a token constant or string.
getTokenName (line 375)
incIndent (line 1180)
Increments the indent in X chars.
If param omitted, used iIndentNumber
isNextTokenConstant (line 1273)
Return true if any of the constant defined in param 1 is the next 'x' content
isNextTokenContent (line 1288)
Return true if any of the content defined is param 1 is the next 'x' content
isPreviousTokenConstant (line 1243)
Return true if any of the constant defined is param 1 is the previous 'x' constant
isPreviousTokenContent (line 1258)
Return true if any of the content defined is param 1 is the previous 'x' content
openBraceDontProcess (line 1425)
pop (line 1121)
Delete the last added output(s)
process (line 686)
Process the string or file to beautify
removeFilter (line 453)
Removes a Filter
removeWhitespace (line 1386)
Remove all whitespace from the previous tag
replaceTokenAssoc (line 799)
Replace the output for specified token
save (line 623)
Save the beautified code to output file
setBeautify (line 1009)
Set the Beautifier on or off
setBeforeNewLine (line 1143)
Set a string to put before a new line
You could use this to put a standard comment after some sentences or to add extra newlines
setFileType (line 1001)
Set the filetype
setIndentChar (line 562)
Character used for indentation
setIndentNumber (line 570)
Number of characters for indentation
setInputFile (line 587)
Set the file for beautify
setInputString (line 649)
Set a string for beautify
setMode (line 1083)
Set a mode to true
setNewLine (line 578)
Character used as a new line
setNoDeletePreviousSpaceHack (line 1029)
Activate or deactivate this ominous hack
If you need to maintain some special whitespace you can activate this hack and use (delete the space between * and /)
setOutputFile (line 613)
Set the output file for beautify
show (line 1016)
Show the beautified code
startLog (line 387)
Start the log for debug
unsetMode (line 1091)
Set a mode to false
Documentation generated on Sun, 22 Jun 2008 18:59:38 -0400 by phpDocumentor 1.3.1