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

Class: PHP_Beautifier_Common

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

Class Overview


Wraps commons method por PHP_Beautifier


Author(s):

Version:

  • Release: 0.1.15

Copyright:

  • 2004-2010 Claudio Bustos

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
Wraps commons method por PHP_Beautifier

Common methods for PHP_Beautifier, almost file management. All the methods are static



[ Top ]


Method Detail

createDir   [line 93]

bool createDir( string $sFile)

Create a dir for a file path
  • Throws: Exception
  • Access: public

Parameters:

string   $sFile   —  file path

[ Top ]

getFilesByGlob   [line 155]

array getFilesByGlob( string $sPath, [bool $bRecursive = false])

Search, inside a dir, for a file pattern using glob(* and ?)
  • Return: path to files
  • Access: public

Parameters:

string   $sPath   —  path
bool   $bRecursive   —  recursive

[ Top ]

getFilesByPattern   [line 63]

array getFilesByPattern( string $sDir, string $sFilePattern, [bool $bRecursive = false])

Search, inside a dir, for a file pattern, using regular expresion Example:

Search recursively for all the files with php extensions in the current dir

  • Return: path to files
  • Access: public

Parameters:

string   $sDir   —  path to a dir
string   $sFilePattern   —  file pattern
bool   $bRecursive   —  recursive?

[ Top ]

getLog   [line 184]

Log_composite getLog( )

Get a Log_composite object for PHP_Beautifier

Always return the same object (Singleton pattern)

  • Access: public

[ Top ]

getSavePath   [line 120]

array getSavePath( array $aFiles, [string $sPath = './'])

Return an array with the paths to save for an array of files
  • Return: Array of files (output)
  • Access: public

Parameters:

array   $aFiles   —  Array of files (input)
string   $sPath   —  Init path

[ Top ]

normalizeDir   [line 43]

string normalizeDir( string $sDir)

Normalize reference to directories
  • Return: normalized path to directory
  • Access: public

Parameters:

string   $sDir   —  path to directory

[ Top ]

wsToString   [line 195]

string wsToString( string $sText)

Transform whitespaces into its representation

So, tabs becomes \t, newline \n and feed \r Useful for log

  • Access: public

Parameters:

string   $sText   — 

[ Top ]


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