Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

UploadField Class Reference
[Basic Fields]

Inheritance diagram for UploadField:

AbstractField Field List of all members.

Detailed Description

File upload field.

Author:
Scott Peshak
Date:
Date
2006-04-10 02:19:56 -0500 (Mon, 10 Apr 2006)

Definition at line 8 of file upload-field.inc.php.

Public Member Functions

 __set ($name, $value)
 Magic setter.
 drawInput ()
 Draw the input.
 validate ()
 Validate the field.
 setFromRequest ()
 Set the value of this field from the $_REQUEST (and $_FILES) array.

Protected Member Functions

 returnBytes ($val)
 Convert php.ini filesize shorthand into number of bytes.

Protected Attributes

 $dir = ''
 Path to upload into.


Member Function Documentation

UploadField::__set name,
value
 

Magic setter.

Parameters:
$name Name of the member to set
$value Value to set

Reimplemented from AbstractField.

Definition at line 17 of file upload-field.inc.php.

UploadField::drawInput  ) 
 

Draw the input.

Implements Field.

Definition at line 28 of file upload-field.inc.php.

References returnBytes().

UploadField::returnBytes val  )  [protected]
 

Convert php.ini filesize shorthand into number of bytes.

Lifted from the PHP manual (lookup ini_get)

Parameters:
$val Value in shorthand
Returns:
int value of the number of bytes

Definition at line 95 of file upload-field.inc.php.

Referenced by drawInput().

UploadField::setFromRequest  ) 
 

Set the value of this field from the $_REQUEST (and $_FILES) array.

Definition at line 83 of file upload-field.inc.php.

Referenced by validate().

UploadField::validate  ) 
 

Validate the field.

This handles moving the file to the upload directory.

Todo:
display who the server is running as to give a fix hint

Reimplemented from AbstractField.

Definition at line 42 of file upload-field.inc.php.

References setFromRequest().


Member Data Documentation

UploadField::$dir = '' [protected]
 

Path to upload into.

Definition at line 10 of file upload-field.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:42 2006 for BaseJumper by doxygen 1.3.9.1