Abstract Class PHP_Beautifier_Filter

Description

PHP_Beautifier_Filter

Definition for creation of Filters For concrete details, please see PHP_Beautifier_Filter_Default

Located in /Beautifier/Filter.php (line 38)


	
			
Direct descendents
Class Description
 class PHP_Beautifier_Filter_Lowercase Lowercase: lowercase all control structures.
 class PHP_Beautifier_Filter_Pear Filter the code to make it compatible with PEAR Coding Standards
 class PHP_Beautifier_Filter_Default Default Filter: Handle all the tokens. Uses K & R style
 class PHP_Beautifier_Filter_Fluent Filter Fluent: Create fluent style for multi-level object access.
 class PHP_Beautifier_Filter_phpBB Filter the code to make it compatible with phpBB Coding Standards
 class PHP_Beautifier_Filter_ListClassFunction Create a list of functions and classes in the script By default, this Filter puts the list at the beggining of the script.
 class PHP_Beautifier_Filter_EqualsAlign Filter EqualsAlign: Align the equals symbols in contiguous lines.
 class PHP_Beautifier_Filter_NewLines New Lines: Add new lines after o before specific contents The settings are 'before' and 'after'. As value, use a colon separated list of contents or tokens
 class PHP_Beautifier_Filter_IndentStyles Filter Indent Styles: Indent the code in k&r, allman, gnu or whitesmiths
 class PHP_Beautifier_Filter_DocBlock Filter Doc Blocks: Use DocBlockGenerator for beautify the phpdoc comments.
 class PHP_Beautifier_Filter_ArrayNested Filter Array Nested: Indent the array structures Ex.
Class Constant Summary
 BYPASS = 'BYPASS'
Variable Summary
Method Summary
 PHP_Beautifier_Filter __construct (PHP_Beautifier $oBeaut, [array $aSettings = array()])
 void addSettingDefinition (string $sSetting,  $sType,  $sDescription)
 void getDescription ()
 void getName ()
 mixed getSetting (string $sSetting)
 bool handleToken (array $token)
 void off ()
 void on ()
 void postProcess ()
 void preProcess ()
 void setSetting (string $sSetting, mixed $sValue)
 mixed __call (string $sMethod, array $aArgs)
 void __sleep ()
 void __toString ()
Variables
array $aFilterTokenFunctions = array() (line 49)

Associative array of functions to use when some token are found

  • access: protected

Redefined in descendants as:
array $aSettingsDefinition = array() (line 61)

Definition of the settings

Should be an associative array. The keys are the names of settings and the values are an array with the keys 'type' and '

  • access: protected
mixed $aToken = false (line 80)

Current token

  • access: protected
bool $bOn = true (line 76)

Switch to 'turn' on and off the filter

  • access: protected
PHP_Beautifier $oBeaut (line 44)

Stores a reference to main PHP_Beautifier

  • access: protected
Methods
Constructor __construct (line 92)

Constructor If you need to overload this (for example, to create a definition for setting with addSettingDefinition() remember call the parent constructor.

  1.  parent::__construct($oBeaut$aSettings)

  • access: public
PHP_Beautifier_Filter __construct (PHP_Beautifier $oBeaut, [array $aSettings = array()])

Redefined in descendants as:
addSettingDefinition (line 103)

Add a setting definition

  • access: protected
void addSettingDefinition (string $sSetting,  $sType,  $sDescription)
  • string $sSetting
  • $sType
  • $sDescription
getDescription (line 236)
  • access: public
void getDescription ()
getName (line 113)

return @string

  • access: public
void getName ()
getSetting (line 150)

Get a setting of the Filter

  • return: value of setting or false
  • access: public
mixed getSetting (string $sSetting)
  • string $sSetting: name of setting
handleToken (line 177)

Function called from PHP_Beautifier::process() to process the tokens.

If the received token is one of the keys of $aFilterTokenFunctions a function with the same name of the value of that key is called. If the method doesn't exists, __call() is called, and return PHP_Beautifier_Filter::BYPASS. PHP_Beautifier, now, call the next Filter is its list. If the method exists, it can return true or PHP_Beautifier_Filter::BYPASS.

bool handleToken (array $token)
  • array $token: token
off (line 141)

Turn off the Filter Use inside the code to beautify Ex.

  1.  ...some code...
  2.  // ArrayNested->off()
  3.  ...other code ...

  • access: public
void off ()

Redefined in descendants as:
on (line 127)

Turn on the Filter Use inside the code to beautify Ex.

  1.  ...some code...
  2.  // ArrayNested->on()
  3.  ...other code ...

  • access: public
void on ()
postProcess (line 227)

Called from PHP_Beautifier::process() at the end of processing

The post-process must be made in PHP_Beautifier::$aOut

  • access: public
void postProcess ()

Redefined in descendants as:
preProcess (line 219)

Called from PHP_Beautifier::process() at the beginning

of the processing

  • access: public
void preProcess ()

Redefined in descendants as:
setSetting (line 159)

Set a value of a Setting

  • access: public
void setSetting (string $sSetting, mixed $sValue)
  • string $sSetting: name of setting
  • mixed $sValue: value of setting
__call (line 210)
mixed __call (string $sMethod, array $aArgs)
  • string $sMethod: metodo
  • array $aArgs: arguments

Redefined in descendants as:
__sleep (line 230)
  • access: public
void __sleep ()
__toString (line 240)
  • access: public
void __toString ()
Class Constants
BYPASS = 'BYPASS' (line 71)

If a method for parse Tokens of a Filter returns this, the control of the process

is handle by the next Filter

Documentation generated on Mon, 31 May 2010 16:16:07 -0400 by phpDocumentor 1.4.3