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

Class: PHP_Beautifier_Batch

Source Location: /PHP_Beautifier-0.1.1/Beautifier/Batch.php

Class Overview

PHP_Beautifier_Decorator
   |
   --PHP_Beautifier_Batch

Adds functionality to handle multiple files.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 61]
Adds functionality to handle multiple files.

  • STDIN : As normal
  • STDOUT : Send all the scripts, prepended with the name of the original route
  • One in, one out: as normal
  • Without '/' at the end, same as STDOUT.
  • With '/' at the end, copy the base structure and copy all the scripts
If the file out end in .tgz, the output will be a tar archive. The same action will be obtained with setCompress() to true Use:

1 require "PHP/Beautifier.php";
2 require "PHP/Beautifier/Batch.php";
3 $oBeaut= new PHP_Beautifier();
4 $oBatch= new PHP_Beautifier_Batch($oBeaut); // Decorator
5 $oBatch->setInputFile(__FILE__);
6 $oBatch->process();
7 $oBatch->show();



[ Top ]


Method Detail

callBeautifier   [line 287]

mixed callBeautifier( PHP_Beautifier_Batch_Engine PHP_Beautifier_Batch_Output$oEngine, string $sMethod, [array $aArgs = array()])

Allows subclass of PHP_Beautifier_Batch_Engine call methods of $oBeaut

Parameters:

PHP_Beautifier_Batch_Engine   PHP_Beautifier_Batch_Output$oEngine     
string   $sMethod     method to call
array   $aArgs     array of args

[ Top ]

get   [line 271]

string get( )

Return a string with the content of the file(s)

[ Top ]

getBatchEngine   [line 239]

void getBatchEngine( )


[ Top ]

getInputFiles   [line 294]

void getInputFiles( )


[ Top ]

getOutputPath   [line 298]

void getOutputPath( )


[ Top ]

process   [line 224]

bool process( )

Create the real references to files
  • Throws: Exception

[ Top ]

save   [line 262]

bool save( [mixed $sFile = null])

Save the beautified sources to file(s)
  • Throws: Exception

[ Top ]

setCompress   [line 111]

void setCompress( [mixed $mCompress = true])

Set compression on/off

Parameters:

mixed   $mCompress     bool(false, true for gzip) or string ('gz' or 'gz2')

[ Top ]

setInputFile   [line 128]

bool setInputFile( mixed $mFiles)

Set the input(s) files

Could be STDIN or a name, with special chars (?,*)


Parameters:

mixed   $mFiles     STDIN or string(path)

[ Top ]

setInputFilePost   [line 158]

void setInputFilePost( )


[ Top ]

setOutputFile   [line 150]

true setOutputFile( mixed $sFile)

Set the output file

Could be STDOUT or a path to a file or dir (with '/' at the end)


Parameters:

mixed   $sFile     STDOUT or string (path)

[ Top ]

setOutputFilePost   [line 197]

void setOutputFilePost( )


[ Top ]

setRecursive   [line 103]

void setRecursive( [bool $bRecursive = true])

Set recursive search for files in dirs on

Parameters:

bool   $bRecursive     

[ Top ]

show   [line 276]

void show( )


[ Top ]


Documentation generated on Mon, 11 Apr 2005 15:11:10 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.