__construct (Constructor) [line 249]
PHP_Beautifier __construct(
)
|
|
Constructor.
Assing values to $aControlStructures,$aControlStructuresEnd, $aTokenFunctions
add [line 1161]
Add a string to the output
Parameters:
addFilter [line 441]
bool addFilter(
string
$mFilter, [array
$aSettings = array()])
|
|
Add a Filter to the Beautifier The first argument is the name of the file of the Filter.
Parameters:
addFilterDirectory [line 410]
void addFilterDirectory(
string
$sDir)
|
|
Add a filter directory
Parameters:
addFilterObject [line 427]
addIndent [line 1183]
addNewLine [line 1200]
Add a new line to the output
addNewLineIndent [line 1215]
Add a new line and a indent to output
decIndent [line 1240]
get [line 1087]
Returns the beautified code
getControlParenthesis [line 1119]
mixed getControlParenthesis(
[int
$iRet = 0])
|
|
Get the token constant for the current Parenthesis
Parameters:
getControlSeq [line 1109]
void getControlSeq(
[int
$iRet = 0])
|
|
Get the token constant for the current control construct
Parameters:
getFilterDescription [line 482]
mixed getFilterDescription(
string
$sFilter)
|
|
Return the Filter Description
Parameters:
getFilterDirectories [line 423]
array getFilterDirectories(
)
|
|
Return an array with all the Filter Dirs
getFilterList [line 525]
Get the names of the loaded filters
getFilterListTotal [line 536]
array getFilterListTotal(
)
|
|
Get the list of all available Filters in all the include Dirs
getIndent [line 567]
getIndentChar [line 559]
getIndentNumber [line 563]
getMode [line 1149]
bool getMode(
string
$sKey)
|
|
Get the state of a mode
Parameters:
getNewLine [line 571]
getNextTokenConstant [line 1381]
int getNextTokenConstant(
[int
$iPrev = 1])
|
|
Get the 'x' significant (non whitespace) next token constant
Parameters:
getNextTokenContent [line 1391]
int getNextTokenContent(
[int
$iNext = 1])
|
|
Get the 'x' significant (non whitespace) next token text
Parameters:
getNextTokenNonCommentConstant [line 1367]
void getNextTokenNonCommentConstant(
[
$iPrev = 1])
|
|
Parameters:
getPreviousTokenConstant [line 1352]
int getPreviousTokenConstant(
[int
$iPrev = 1])
|
|
Get the 'x' significant (non whitespace) previous token constant
Parameters:
getPreviousTokenContent [line 1362]
string getPreviousTokenContent(
[int
$iPrev = 1])
|
|
Get the 'x' significant (non whitespace) previous token text
Parameters:
getPreviousWhitespace [line 1404]
string getPreviousWhitespace(
)
|
|
Return the whitespace previous to current token
Ex.: You have ' if($a)' if you call this funcion on 'if', you get ' '
getSetting [line 1100]
mixed getSetting(
string
$sKey)
|
|
Returns the value of a settings
Parameters:
getToken [line 1468]
array &getToken(
int
$iIndex)
|
|
Get a token by number
Parameters:
getTokenAssoc [line 795]
mixed getTokenAssoc(
int
$iIndex)
|
|
Get the reference to $aOut, based on the number of the token
Parameters:
getTokenAssocText [line 804]
mixed getTokenAssocText(
int
$iIndex)
|
|
Get the output for the specified token
Parameters:
getTokenFunction [line 833]
mixed getTokenFunction(
mixed
$sTokenType)
|
|
Return the function for a token constant or string.
Parameters:
getTokenName [line 387]
void getTokenName(
$iToken)
|
|
Parameters:
incIndent [line 1229]
void incIndent(
[int
$iIncr = false])
|
|
Increments the indent in X chars.
If param omitted, used iIndentNumber
Parameters:
isNextTokenConstant [line 1322]
bool isNextTokenConstant(
mixed
$mValue, [
$iPrev = 1])
|
|
Return true if any of the constant defined in param 1 is the next 'x' content
Parameters:
isNextTokenContent [line 1337]
bool isNextTokenContent(
mixed
$mValue, [
$iPrev = 1])
|
|
Return true if any of the content defined is param 1 is the next 'x' content
Parameters:
isPreviousTokenConstant [line 1292]
bool isPreviousTokenConstant(
mixed
$mValue, [
$iPrev = 1])
|
|
Return true if any of the constant defined is param 1 is the previous 'x' constant
Parameters:
isPreviousTokenContent [line 1307]
bool isPreviousTokenContent(
mixed
$mValue, [
$iPrev = 1])
|
|
Return true if any of the content defined is param 1 is the previous 'x' content
Parameters:
openBraceDontProcess [line 1476]
void openBraceDontProcess(
)
|
|
pop [line 1170]
void pop(
[int
$iReps = 1])
|
|
Delete the last added output(s)
Parameters:
process [line 703]
Process the string or file to beautify
removeFilter [line 465]
bool removeFilter(
string
$sFilter)
|
|
Removes a Filter
Parameters:
removeWhitespace [line 1437]
Remove all whitespace from the previous tag
replaceTokenAssoc [line 817]
bool replaceTokenAssoc(
int
$iIndex, string
$sText)
|
|
Replace the output for specified token
Parameters:
save [line 640]
void save(
[string
$sFile = null])
|
|
Save the beautified code to output file
Parameters:
setBeautify [line 1058]
void setBeautify(
bool
$sFlag)
|
|
Set the Beautifier on or off
Parameters:
setBeforeNewLine [line 1192]
void setBeforeNewLine(
$sText)
|
|
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
Parameters:
setFileType [line 1050]
void setFileType(
string
$sType)
|
|
Set the filetype
Parameters:
setIndentChar [line 579]
void setIndentChar(
string
$sChar)
|
|
Character used for indentation
Parameters:
setIndentNumber [line 587]
void setIndentNumber(
int
$iIndentNumber)
|
|
Number of characters for indentation
Parameters:
setInputFile [line 604]
void setInputFile(
string
$sFile)
|
|
Set the file for beautify
Parameters:
setInputString [line 666]
void setInputString(
string
$sText)
|
|
Set a string for beautify
Parameters:
setMode [line 1132]
void setMode(
string
$sKey)
|
|
Set a mode to true
Parameters:
setNewLine [line 595]
void setNewLine(
string
$sNewLine)
|
|
Character used as a new line
Parameters:
setNoDeletePreviousSpaceHack [line 1078]
void setNoDeletePreviousSpaceHack(
[
$bFlag = true])
|
|
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 /) /**ndps** /
in get(), this text will be erased.
Parameters:
setOutputFile [line 630]
void setOutputFile(
string
$sFile)
|
|
Set the output file for beautify
Parameters:
show [line 1065]
startLog [line 399]
void startLog(
[string
$sFile = 'php_beautifier.log'], [int
$iLevel = PEAR_LOG_DEBUG])
|
|
Start the log for debug
Parameters:
unsetMode [line 1140]
void unsetMode(
string
$sKey)
|
|
Set a mode to false
Parameters: