Phpxforms documentation

CacheUpload
in package

File upload cache

Tags
author

DaVee

version
0.87dev
license

Lesser General Public License 2.1 or later; see http://www.gnu.org/licenses/lgpl-2.1.html

Table of Contents

Properties

$dir  : string
$timer  : int
$fileApi  : FileApiPhp
$moved  : array<string|int, string>
$path  : string

Methods

__construct()  : mixed
clearMoved()  : void
Clear moved files
move()  : void
Readdress uploaded file to $_FILES
upload()  : string|null
Cache uploaded file to temporary directory
clear()  : void
Remove old files

Properties

$dir

public static string $dir = 'upload/'

Directory for temporary uploads

$timer

public static int $timer = 43200

How long keep file alive (12h)

$moved

protected array<string|int, string> $moved = []

Methods

clearMoved()

Clear moved files

public clearMoved() : void

move()

Readdress uploaded file to $_FILES

public move(string $fileTemp, string $mark, int $id) : void
Parameters
$fileTemp : string
$mark : string
$id : int
Tags
throws
Exception

upload()

Cache uploaded file to temporary directory

public upload(string $file, string $mark) : string|null
Parameters
$file : string
$mark : string
Tags
throws
Exception
Return values
string|null

        
On this page

Search results