class remote extends base

Properties

protected language $language
protected IniGetWrapper $php_ini
protected upload $upload
protected config $config
protected factory $factory
protected request_interface $request
protected string $phpbb_root_path

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(config $config, factory $factory, language $language, IniGetWrapper $php_ini, request_interface $request, string $phpbb_root_path)

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.

remote_upload(string $upload_url)

Remote upload method Uploads file from given url

int
get_max_file_size()

Get maximum file size for remote uploads

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 56
__construct(config $config, factory $factory, language $language, IniGetWrapper $php_ini, request_interface $request, string $phpbb_root_path)

Construct a form upload type

Parameters

config $config

phpBB config

factory $factory

Files factory

language $language

Language class

IniGetWrapper $php_ini

ini_get() wrapper

request_interface $request

Request object

string $phpbb_root_path

phpBB root path

at line 69
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 83
protected filespec remote_upload(string $upload_url)

Remote upload method Uploads file from given url

Parameters

string $upload_url

URL pointing to file to upload, for example http://www.foobar.com/example.gif

Return Value

filespec

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

at line 178
protected int get_max_file_size()

Get maximum file size for remote uploads

Return Value

int

Maximum file size