class form extends base

Properties

protected language $language
protected IniGetWrapper $php_ini
protected upload $upload
protected factory $factory
protected plupload $plupload
protected request_interface $request

Methods

check_upload_size(filespec $file)

Check if upload exceeds maximum file size

from base
set_upload(upload $upload)

Set upload instance Needs to be executed before every upload.

from base
__construct(factory $factory, language $language, IniGetWrapper $php_ini, plupload $plupload, request_interface $request)

Construct a form upload type

filespec|bool
upload()

Handle upload for upload types. Arguments passed to this method will be handled by the upload type classes themselves.

form_upload(string $form_name)

Form upload method Upload file from users harddisk

Details

in base at line 34
filespec check_upload_size(filespec $file)

Check if upload exceeds maximum file size

Parameters

filespec $file Filespec object

Return Value

filespec Returns same filespec instance

in base at line 59
type_interface set_upload(upload $upload)

Set upload instance Needs to be executed before every upload.

Parameters

upload $upload Upload instance

Return Value

type_interface Returns itself

at line 52
__construct(factory $factory, language $language, IniGetWrapper $php_ini, plupload $plupload, request_interface $request)

Construct a form upload type

Parameters

factory $factory Files factory
language $language Language class
IniGetWrapper $php_ini ini_get() wrapper
plupload $plupload Plupload
request_interface $request Request object

at line 64
filespec|bool upload()

Handle upload for upload types. Arguments passed to this method will be handled by the upload type classes themselves.

Return Value

filespec|bool Filespec instance if upload is successful or false if not

at line 79
protected filespec form_upload(string $form_name)

Form upload method Upload file from users harddisk

Parameters

string $form_name Form name assigned to the file input field (if it is an array, the key has to be specified)

Return Value

filespec $file Object "filespec" is returned, all further operations can be done with this object