Class TFormFileDisk

Description

Basic File Upload Handler

  • version: 05-27-2002 12:00
  • author: Greg MacLellan

Located in /form-file-disk.inc.php (line 13)

TFormElement
   |
   --TFormFileDisk
Variable Summary
mixed $extraData
mixed $extraFields
mixed $htmltype
mixed $maxsize
mixed $required
mixed $type
Method Summary
TFormFileDisk TFormFileDisk (string $name, string $displayname, string $class, bool $required, string $storelocation, int $maxsize, [string $extraFields = array()], [bool $store = true])
An getValue ([$display $display = false])
void output ()
True setValue (array $value, [mixed $user = false])
void validate ()
Variables
mixed $extraData (line 26)

Data for extra fields (size/type/etc)

mixed $extraFields (line 23)

Fieldnames of extra fields

mixed $htmltype = "file" (line 17)

The HTML element type


Redefinition of:
TFormElement::$htmltype
The HTML element type
mixed $maxsize (line 20)

The file size

mixed $required (line 21)
mixed $type = "file" (line 15)

The type of element


Redefinition of:
TFormElement::$type
The type of element

Inherited Variables

Inherited from TFormElement

TFormElement::$alwaysSet
TFormElement::$class
TFormElement::$displayname
TFormElement::$name
TFormElement::$parent
TFormElement::$store
TFormElement::$value
Methods
Constructor TFormFileDisk (line 52)

Creates a new TFormFile element (basic file-upload)

TFormFileDisk TFormFileDisk (string $name, string $displayname, string $class, bool $required, string $storelocation, int $maxsize, [string $extraFields = array()], [bool $store = true])
  • string $name: The name of the element. This should correspond to the field names if using with TDBForm, and should not include any spaces or special characters.
  • string $displayname: The name that should show up to the user for this field.
  • string $class: The HTML Class to use for the element
  • bool $required: True if the field has to be filled in
  • string $storelocation: The full path in which to store the file. Must be writable by PHP
  • int $maxsize: Maximum number of bytes. If 0, then the max is the maximum allowed by the webserver.
  • string $extraFields: An array containing extra fieldnames, if used. Keys can be "size", "type", and "name", for size (bytes), mime type, and user's filename, respectively.
  • bool $store: Whether this value is persistent. Used by TDBForm to decide to save/load this value from database.
getValue (line 117)

Returns a textual description of the current value

  • return: array containing any values for this file
An getValue ([$display $display = false])
  • $display $display: True if the value is going to be used for display

Redefinition of:
TFormElement::getValue()
Returns a textual description of the current value
output (line 138)
void output ()

Redefinition of:
TFormElement::output()
Outputs the HTML for this tag
setValue (line 74)

Sets the value of the field to be the file data.

  • return: if the value was set
True setValue (array $value, [mixed $user = false])
  • array $value: The value to set. Because this is a file type, this is an array containing "name","type","size","tmp_name", as documented in the php manual.

Redefinition of:
TFormElement::setValue()
Sets the value of the field
validate (line 59)
void validate ()

Redefinition of:
TFormElement::validate()
Validates the data in this field.

Inherited Methods

Inherited From TFormElement

TFormElement::TFormElement()
TFormElement::getValue()
TFormElement::output()
TFormElement::setParent()
TFormElement::setValue()
TFormElement::validate()

Documentation generated on Thu, 27 Nov 2003 14:58:54 -0500 by phpDocumentor 1.2.3