nyroFwk
0.2
var
www
users
nyrofwk
src
nyro
upload.class.php
Go to the documentation of this file.
1
<?php
11
final
class
upload
{
12
18
private
static
$cfg
;
19
23
private
function
__construct
() {}
24
28
private
static
function
init
() {
29
if
(!self::$cfg)
30
self::$cfg =
new
config
(
factory::loadCfg
(__CLASS__));
31
}
32
38
public
static
function
get
($prm) {
39
self::init();
40
$prm = self::$cfg->dir.
41
str_replace(
42
array(self::$cfg->webDir.
'/'
,
'/'
),
43
array(
''
,
DS
)
44
, $prm);
45
if
(self::$cfg->getInArray(
'forceDownload'
,
file::getExt
($prm)))
46
response::getInstance
()->sendFile($prm);
47
else
48
response::getInstance
()->showFile($prm);
49
}
50
51
}
DS
if(!defined('NYROROOT')) define('NYROROOT' ROOT DS
Definition:
start.inc.php:56
upload\init
static init()
Definition:
upload.class.php:28
upload\__construct
__construct()
Definition:
upload.class.php:23
file\getExt
static getExt($file)
Definition:
file.class.php:400
upload
Definition:
upload.class.php:11
response\getInstance
static getInstance()
Definition:
response.class.php:31
upload\$cfg
static $cfg
Definition:
upload.class.php:18
factory\loadCfg
static loadCfg($className, $searchParent=true)
Definition:
factory.class.php:113
config
Definition:
config.class.php:10
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by
1.8.13