Re: PhpBeautify draft

From: Date: Thu, 13 May 2004 21:31:38 +0000
Subject: Re: PhpBeautify draft
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29227@lists.php.net to get a copy of this message
Claudio Bustos wrote:
PEAR devs: I create the draft for a new Package, PhpBeautify. Some time ago, Jens Bierkandt and I proposed this app, the group suggest some improvement, but we didn't have time to solve the topic. The principal features of the Package are: - Automatic indentation of PHP source code according to given number of spaces - Automatic newlines, if required - You can use the web frontend, command line or the class. - Plug-in architecture, by the use of Filters. The control of beautify proccess is delegated on the Filters. Pear specs are one these. - The code to beautify can make callbacks to the base class and the filters. So, you can set the options for the beautify inside the same file - Batch processing The main diff with others applications is the use of Filters, I think. You can freely use and create new Filter to make your code looks like you want it. Now, I rewrite the code for Php 5. Before change the status to 'Proposal', I need help: - Name of the Package: I think the best group is 'Tool and Utilities', but maybe 'PHP' it's okay. In the first case, the main class will be put in /PEAR/ and others on /PEAR/PhpBeautify. In the second case, the core class will be renamed to /PHP_Beautify and the others files will be moved to /PEAR/PHP/Beautify - Docs: English doesn't my native language (you notice that, rigth?). So, I need people who read the docs and made the necessary corrections on gramar and ortography.
I believe this should be called PHP_Tidy - to follow in the same vein as HTML Tidy. It seems you understanding of the PEAR naming Vs Directory structure is not quite correct. If you go with the PHP_Tidy name the CVS Structure is: /PHP_Tidy/ /* Main Folder */
    /Tidy.php 			/* PHP_Tidy (Main) */
    /Tidy/    			/* for PHP_Tidy sub classes */
        /Batch.php 		/* PHP_Tidy_Batch */
        /Decorator.php		/* PHP_Tidy_Decorator */
        /Filter.php 		/* PHP_Tidy_Filter */
        /Filter/		/* PHP_Tidy_Filter sub classes */
            /ArraySimple.php	/* PHP_Tidy_Filter_ArraySimple */
            /Default.php	/* PHP_Tidy_Filter_Default */
            /ListClassFunction.php	/* PHP_Tidy_ListClassFunction */
            /Pear.php		/* PHP_Tidy_Filter_Pear.php */
This will install as the same, except the top level dir will be simply "PHP" instead of the CVS dir "PHP_Tidy" Of course, if you want to call it PHP_Beautifier (which gives hugely long names :) then just replace Tidy with Beautifier every where in the above :) hope this clears up some things for you and that you like the name :) - Davey

« previous php.pear.dev (#29227) next »