Class PHP_Beautifier_Common

Description

Wraps commons method por PHP_Beautifier

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

Located in /Beautifier/Common.php (line 37)


	
			
Method Summary
 static bool createDir (string $sFile)
 static array getFilesByGlob (string $sPath, [bool $bRecursive = false])
 static array getFilesByPattern (string $sDir, string $sFilePattern, [bool $bRecursive = false])
 static Log_composite getLog ()
 static array getSavePath (array $aFiles, [string $sPath = './'])
 static string normalizeDir (string $sDir)
 static string wsToString (string $sText)
Methods
static createDir (line 93)

Create a dir for a file path

  • throws: Exception
  • access: public
bool createDir (string $sFile)
  • string $sFile: file path
static getFilesByGlob (line 155)

Search, inside a dir, for a file pattern using glob(* and ?)

  • return: path to files
  • access: public
array getFilesByGlob (string $sPath, [bool $bRecursive = false])
  • string $sPath: path
  • bool $bRecursive: recursive
static getFilesByPattern (line 63)

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
array getFilesByPattern (string $sDir, string $sFilePattern, [bool $bRecursive = false])
  • string $sDir: path to a dir
  • string $sFilePattern: file pattern
  • bool $bRecursive: recursive?
static getLog (line 184)

Get a Log_composite object for PHP_Beautifier

Always return the same object (Singleton pattern)

  • access: public
Log_composite getLog ()
static getSavePath (line 120)

Return an array with the paths to save for an array of files

  • return: Array of files (output)
  • access: public
array getSavePath (array $aFiles, [string $sPath = './'])
  • array $aFiles: Array of files (input)
  • string $sPath: Init path
static normalizeDir (line 43)

Normalize reference to directories

  • return: normalized path to directory
  • access: public
string normalizeDir (string $sDir)
  • string $sDir: path to directory
static wsToString (line 195)

Transform whitespaces into its representation

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

  • access: public
string wsToString (string $sText)
  • string $sText

Documentation generated on Mon, 31 May 2010 16:16:05 -0400 by phpDocumentor 1.4.3