PHP_Beautifier
[ class tree: PHP_Beautifier ] [ index: PHP_Beautifier ] [ all elements ]

Class: PHP_Beautifier_Filter

Source Location: /PHP_Beautifier-0.1.2/Beautifier/Filter.php

Class Overview


PHP_Beautifier_Filter


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2004-2005 Claudio Bustos

Methods


Child classes:

PHP_Beautifier_Filter_ArrayNested
Filter Array Nested: Indent the array structures Ex.
PHP_Beautifier_Filter_Default
Default Filter: Handle all the tokens. Uses K & R style
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.
PHP_Beautifier_Filter_Pear
Filter the code to make it compatible with PEAR Coding Standars
PHP_Beautifier_Filter_IndentStyles
Filter Indent Styles: Indent the code in k&r, allman, gnu or whitesmiths
PHP_Beautifier_Filter_NewLines
New Lines: Add new lines after o before specific contents The settings are 'before' and 'after'. As value, use a comma separated list of contents

Inherited Variables

Inherited Methods


Class Details

[line 38]
PHP_Beautifier_Filter

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



[ Top ]


Method Detail

addSettingDefinition   [line 98]

void addSettingDefinition( string $sSetting, mixed $sType, mixed $sDescription)

Add a setting definition

Parameters:

string   $sSetting     

[ Top ]

getDescription   [line 224]

void getDescription( )


[ Top ]

getName   [line 108]

void getName( )

return @string

[ Top ]

getSetting   [line 145]

mixed getSetting( string $sSetting)

Get a setting of the Filter
  • Return: value of setting or false

Parameters:

string   $sSetting     name of setting

[ Top ]

handleToken   [line 172]

bool handleToken( array $token)

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.


Parameters:

array   $token     token

[ Top ]

off   [line 136]

void off( )

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


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


Overridden in child classes as:

PHP_Beautifier_Filter_Default::off()

[ Top ]

on   [line 122]

void on( )

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


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


[ Top ]

postProcess   [line 215]

void postProcess( )

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

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


Overridden in child classes as:

PHP_Beautifier_Filter_ListClassFunction::postProcess()

[ Top ]

setSetting   [line 154]

void setSetting( string $sSetting, mixed $sValue)

Set a value of a Setting

Parameters:

string   $sSetting     name of setting
mixed   $sValue     value of setting

[ Top ]


Documentation generated on Fri, 4 Feb 2005 01:30:17 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.