Class OCSP_FILE

Description

openCSP class OCSP_FILE

Located in /common/OCSP_FILE.phpclass (line 33)


	
			
Direct descendents
Class Description
 class OCSP_IMAGE
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
 boolean $fileExists
 array $imagesize
 string $myFileName
 string $myFilePath
Method Summary
 static string checkFileName (string $fileName, [string $replChar = "_"])
 static string checkFilePath (string $aFile)
 static OCSP_FILE; factoryFromUpload (array $upload, string $destDir, [boolean $overwrite = True], [boolean $debug = False])
 static boolean isAbsoultePath (string $aFile)
 static boolean isFile ( $aFile)
 OCSP_FILE __construct ([string $aFile = ""])
 void delete ()
 string getFile ()
 string getFilePath ()
 array getImagesize ()
 string getMimeType ()
 int getSize ()
 boolean isImage ()
 void passthru ()
 boolean setFile (string $aFile)
 boolean setFromUplaod (array $upload, string $destDir, [ $overwrite = False], [ $debug = False])
Variables
boolean $fileExists = Null (line 212)

does the file exists?

  • access: protected
array $imagesize = Null (line 219)

image informations from getimagesize

  • access: protected
string $myFileName = "" (line 205)

the file name (relative path / value set)

  • access: protected
string $myFilePath = "" (line 198)

the file (absolut path in the system)

  • access: protected
Methods
static checkFileName (line 89)

returns a filename where some special char are converted unknown chars are replaced with _

  • since: pk-08-11-05 $replChar added
  • access: public
string checkFileName (string $fileName, [string $replChar = "_"])
  • string $fileName
  • string $replChar
static checkFilePath (line 121)

checks slashes in $aFile

  • access: public
string checkFilePath (string $aFile)
  • string $aFile
static factoryFromUpload (line 149)

factories a file object from an file upload

  • access: public
OCSP_FILE; factoryFromUpload (array $upload, string $destDir, [boolean $overwrite = True], [boolean $debug = False])
  • array $upload: ($_FILES['UPLOAD INPUT NAME'])
  • string $destDir: (destination directory)
  • boolean $overwrite: (replace existing file?)
  • boolean $debug
static isAbsoultePath (line 109)

returns if a filename is an absolute path

  • access: public
boolean isAbsoultePath (string $aFile)
  • string $aFile
static isFile (line 61)

checks if $aFile is a file

follows symlinks when checking

  • access: public
boolean isFile ( $aFile)
  • $aFile
Constructor __construct (line 230)

constructor

  • access: public
OCSP_FILE __construct ([string $aFile = ""])
  • string $aFile
delete (line 461)

deletes the file

  • access: public
void delete ()

Redefined in descendants as:
getFile (line 294)

returns the file

  • access: public
string getFile ()
getFilePath (line 304)

returns absoulute file path

  • access: public
string getFilePath ()
getImagesize (line 427)

returns the imagesize array

  • access: public
array getImagesize ()
getMimeType (line 369)

returns the mimetype of

  • todo: get mime type from T_MED_MIMETYPES
  • access: public
string getMimeType ()

Redefined in descendants as:
getSize (line 314)

returns the file size in bytes

  • access: public
int getSize ()
isImage (line 412)

returns if the file is an image

  • access: public
boolean isImage ()
passthru (line 440)

passes the file as is to the browser

  • access: public
void passthru ()
setFile (line 249)

sets myFilePath

  • return: (if the file exists)
  • access: public
boolean setFile (string $aFile)
  • string $aFile

Redefined in descendants as:
setFromUplaod (line 327)

sets the file form an upload

  • access: public
boolean setFromUplaod (array $upload, string $destDir, [ $overwrite = False], [ $debug = False])
  • array $upload
  • string $destDir
  • $overwrite
  • $debug
Class Constants
CLASS_SRC_FILE = __FILE__ (line 42)

Documentation generated on Thu, 08 Jan 2009 17:45:38 +0100 by phpDocumentor 1.4.0a2