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

Class: PHP_Beautifier_Batch

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

Class Overview

PHP_Beautifier_Decorator
   |
   --PHP_Beautifier_Batch

Adds functionality to handle multiple files.


Author(s):

Version:

  • Release: 0.1.15

Copyright:

  • 2004-2006 Claudio Bustos

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 70]
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
You must define an input file. By default, the output is "./", so the saving of files will be done on the directory of your command prompt.

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->setOutputFile(dirname(__FILE__)."/beautified/");
  7.  $oBatch->process();
  8.  $oBatch->save();



[ Top ]


Class Variables

$bRecursive =  false

[line 105]

Recursive search on dirs
  • Access: public

Type:   bool


[ Top ]

$mInputFiles =

[line 93]

  • Access: public

Type:   mixed


[ Top ]



Method Detail

callBeautifier   [line 296]

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

Allows subclass of PHP_Beautifier_Batch_Engine call methods of $oBeaut
  • Access: public

Parameters:

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

[ Top ]

get   [line 280]

string get( )

Return a string with the content of the file(s)
  • Access: public

[ Top ]

getInputFiles   [line 303]

void getInputFiles( )

  • Access: public

[ Top ]

getOutputPath   [line 307]

void getOutputPath( )

  • Access: public

[ Top ]

process   [line 235]

bool process( )

Create the real references to files
  • Throws: Exception
  • Access: public

[ Top ]

save   [line 271]

bool save( [ $sFile = null])

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

Parameters:

   $sFile   — 

[ Top ]

setCompress   [line 120]

void setCompress( [mixed $mCompress = true])

Set compression on/off
  • Access: public

Parameters:

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

[ Top ]

setInputFile   [line 137]

bool setInputFile( mixed $mFiles)

Set the input(s) files

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

  • Access: public

Parameters:

mixed   $mFiles   —  STDIN or string(path)

[ Top ]

setOutputFile   [line 160]

true setOutputFile( mixed $sFile)

Set the output file

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

  • Access: public

Parameters:

mixed   $sFile   —  STDOUT or string (path)

[ Top ]

setRecursive   [line 112]

void setRecursive( [bool $bRecursive = true])

Set recursive search for files in dirs on
  • Access: public

Parameters:

bool   $bRecursive   — 

[ Top ]

show   [line 285]

void show( )

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:37:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.