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

Class: PHP_Beautifier_Batch

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

Class Overview

PHP_Beautifier_Decorator
   |
   --PHP_Beautifier_Batch

Adds functionality to handle multiple files.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2004-2005 Claudio Bustos

Methods


Inherited Variables

Inherited Methods


Class Details

[line 66]
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 292]

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 276]

string get( )

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

[ Top ]

getBatchEngine   [line 244]

void getBatchEngine( )


[ Top ]

getInputFiles   [line 299]

void getInputFiles( )


[ Top ]

getOutputPath   [line 303]

void getOutputPath( )


[ Top ]

process   [line 229]

bool process( )

Create the real references to files
  • Throws: Exception

[ Top ]

save   [line 267]

bool save( [mixed $sFile = null])

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

[ Top ]

setCompress   [line 116]

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 133]

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 163]

void setInputFilePost( )


[ Top ]

setOutputFile   [line 155]

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 202]

void setOutputFilePost( )


[ Top ]

setRecursive   [line 108]

void setRecursive( [bool $bRecursive = true])

Set recursive search for files in dirs on

Parameters:

bool   $bRecursive     

[ Top ]

show   [line 281]

void show( )


[ Top ]


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