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

Class: PHP_Beautifier_Common

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

Class Overview


PHP_Beautifier_Common


Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
PHP_Beautifier_Common

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



[ Top ]


Method Detail

createDir   [line 91]

bool createDir( string $sFile)

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

Parameters:

string   $sFile   —  file path

[ Top ]

getFilesByGlob   [line 156]

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

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

Log_composite getLog( )

Get a Log_composite object for PHP_Beautifier

Always return the same object (Singleton pattern)

  • Access: public

[ Top ]

getSavePath   [line 118]

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

string normalizeDir( string $sDir)

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

Parameters:

string   $sDir   —  path to directory

[ Top ]

wsToString   [line 194]

string wsToString( string $sText)

Transform whitespaces into its representation

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


Parameters:

string   $sText   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:13:33 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.