Class Utility

Description

Utility functions

Located in /util/Utility.php (line 28)


	
			
Variable Summary
mixed $logger
Method Summary
String capitalizeDriveLetter ($path $path)
void getLogger ([mixed $package = false])
String getOS ()
Readable getTimeStamp ()
void getTmpDir ()
True makeDirRecursive ($dir $dir, [$mode=0755 $mode = 0755])
String replaceBackslashes ($path $path)
Shortened shortenFilename ($filename $filename, [$maxlength=150 $maxlength = 80])
String unixifyPath ($path $path)
void writeError ($str $str)
Variables
mixed $logger (line 30)
  • static:
  • access: public
Methods
capitalizeDriveLetter (line 138)

Convert the drive letter to upper case

  • return: Path with driver letter capitalized.
  • access: public
String capitalizeDriveLetter ($path $path)
  • $path $path: Windows path with "c:<blah>"
getLogger (line 211)
  • access: public
void getLogger ([mixed $package = false])
getOS (line 191)

Returns the current OS code WIN - Windows, LIN -Linux, etc.

  • return: 3 letter code for current OS
  • access: public
  • since: 0.6.6
String getOS ()
getTimeStamp (line 41)

Return the current timestamp in human readable format.

Thursday March 17, 2005 19:10:47

  • return: timestamp
  • access: public
Readable getTimeStamp ()
getTmpDir (line 197)
  • access: public
void getTmpDir ()
makeDirRecursive (line 156)

Make directory recursively.

(Taken from: http://aidan.dotgeek.org/lib/?file=function.mkdirr.php)

  • return: on success, False on failure
  • access: public
True makeDirRecursive ($dir $dir, [$mode=0755 $mode = 0755])
  • $dir $dir: Directory path to create
  • $mode=0755 $mode
replaceBackslashes (line 124)

Convert the back slash path separators with forward slashes.

  • return: Path with back slashes replaced with forward slashes.
  • access: public
String replaceBackslashes ($path $path)
  • $path $path: Windows path with backslash path separators
shortenFilename (line 59)

Shorten the filename to some maximum characters

  • return: file path
  • access: public
Shortened shortenFilename ($filename $filename, [$maxlength=150 $maxlength = 80])
  • $filename $filename: Complete file path
  • $maxlength=150 $maxlength: Maximum allowable length of the shortened filepath
unixifyPath (line 105)

Convert Windows paths to Unix paths

  • return: Unixified file path
  • access: public
String unixifyPath ($path $path)
  • $path $path: File path
writeError (line 90)

Write error log if debug is on

  • access: public
void writeError ($str $str)
  • $str $str: Error string

Documentation generated on Fri, 06 Jul 2007 12:51:40 -0700 by phpDocumentor 1.3.0RC3