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

Class: PHP_Beautifier_Filter_Pear

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

Class Overview

PHP_Beautifier_Filter
   |
   --PHP_Beautifier_Filter_Pear

Filter the code to make it compatible with PEAR Coding Standars


Author(s):

Version:

  • CVS: $Id:$

Copyright:

  • 2004-2005 Claudio Bustos

Methods


Inherited Variables

Inherited Methods

Class: PHP_Beautifier_Filter

PHP_Beautifier_Filter::addSettingDefinition()
Add a setting definition
PHP_Beautifier_Filter::getDescription()
PHP_Beautifier_Filter::getName()
return @string
PHP_Beautifier_Filter::getSetting()
Get a setting of the Filter
PHP_Beautifier_Filter::handleToken()
Function called from PHP_Beautifier::process() to process the tokens.
PHP_Beautifier_Filter::off()
Turn off the Filter Use inside the code to beautify Ex.
PHP_Beautifier_Filter::on()
Turn on the Filter Use inside the code to beautify Ex.
PHP_Beautifier_Filter::postProcess()
Called from PHP_Beautifier::process() at the end of processing
PHP_Beautifier_Filter::setSetting()
Set a value of a Setting

Class Details

[line 53]
Filter the code to make it compatible with PEAR Coding Standars

The default filter, PHP_Beautifier_Filter_Default have most of the specs but adhere more to GNU C. So, this filter make the following modifications:

  • Add 2 newlines after Break in switch statements
  • Brace in function definition put on a new line, same indent of 'function' construct
  • Comments started with '#' are replaced with '//'
  • Open tags are replaced with '<?php'
  • With setting 'add_header', the filter add one of the standard PEAR comment header (php, bsd, apache, lgpl, pear) or any file as licence header. Use:

    1 $oBeaut->addFilter('Pear',array('add_header'=>'php'));



[ Top ]


Method Detail

addHeaderComment   [line 105]

void addHeaderComment( )


[ Top ]

t_comment   [line 76]

void t_comment( mixed $sTag)


[ Top ]

t_open_brace   [line 66]

void t_open_brace( mixed $sTag)


[ Top ]

t_open_tag   [line 85]

void t_open_tag( mixed $sTag)


[ Top ]

t_semi_colon   [line 56]

void t_semi_colon( mixed $sTag)


[ Top ]


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