ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilFMSettings.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9
class
ilFMSettings
10
{
11
private
static
$instance
= null;
12
13
private
$storage
= null;
14
private
$enabled
=
false
;
15
private
$localFS
=
true
;
16
private
$maxFileSize
= 64;
17
21
private
function
__construct
()
22
{
23
$this->storage =
new
ilSetting
(
'fm'
);
24
$this->
read
();
25
}
26
31
public
static
function
getInstance
()
32
{
33
if
(self::$instance)
34
{
35
return
self::$instance;
36
}
37
return
self::$instance =
new
ilFMSettings
();
38
}
39
44
protected
function
getStorage
()
45
{
46
return
$this->storage
;
47
}
48
53
public
function
enable
($a_status)
54
{
55
$this->enabled = $a_status;
56
}
57
62
public
function
isEnabled
()
63
{
64
return
$this->enabled
;
65
}
66
71
public
function
enableLocalFS
($a_stat)
72
{
73
$this->localFS = $a_stat;
74
}
75
80
public
function
isLocalFSEnabled
()
81
{
82
return
$this->localFS
;
83
}
84
85
public
function
setMaxFileSize
($a_size)
86
{
87
$this->maxFileSize = $a_size;
88
}
89
90
public
function
getMaxFileSize
()
91
{
92
return
$this->maxFileSize
;
93
}
94
95
99
public
function
update
()
100
{
101
$this->
getStorage
()->set(
'enabled'
,(
int
) $this->
isEnabled
());
102
$this->
getStorage
()->set(
'local'
,(
int
) $this->
isLocalFSEnabled
());
103
$this->
getStorage
()->set(
'maxFileSize'
, (
int
) $this->
getMaxFileSize
());
104
}
105
109
protected
function
read
()
110
{
111
$this->
enable
($this->
getStorage
()->
get
(
'enabled'
, $this->enabled));
112
$this->
enableLocalFS
($this->
getStorage
()->
get
(
'local'
), $this->localFS);
113
$this->
setMaxFileSize
($this->
getStorage
()->
get
(
'maxFileSize'
,$this->maxFileSize));
114
115
}
116
}
117
?>
ilFMSettings\isLocalFSEnabled
isLocalFSEnabled()
Check if local file system frame is enabled by default.
Definition:
class.ilFMSettings.php:80
ilSetting
ILIAS Setting Class.
Definition:
class.ilSetting.php:32
ilFMSettings\isEnabled
isEnabled()
check if enabled
Definition:
class.ilFMSettings.php:62
ilFMSettings\__construct
__construct()
Singleton constructor.
Definition:
class.ilFMSettings.php:21
ilFMSettings\read
read()
Read settings.
Definition:
class.ilFMSettings.php:109
ilFMSettings\enable
enable($a_status)
Enable file manager.
Definition:
class.ilFMSettings.php:53
ilFMSettings\$enabled
$enabled
Definition:
class.ilFMSettings.php:14
ilFMSettings\getStorage
getStorage()
Get storage.
Definition:
class.ilFMSettings.php:44
ilFMSettings\update
update()
Update settings.
Definition:
class.ilFMSettings.php:99
ilFMSettings\$storage
$storage
Definition:
class.ilFMSettings.php:13
ilFMSettings\$maxFileSize
$maxFileSize
Definition:
class.ilFMSettings.php:16
ilFMSettings\$localFS
$localFS
Definition:
class.ilFMSettings.php:15
ilFMSettings\setMaxFileSize
setMaxFileSize($a_size)
Definition:
class.ilFMSettings.php:85
ilFMSettings\getInstance
static getInstance()
Get singleton instance.
Definition:
class.ilFMSettings.php:31
ilFMSettings\$instance
static $instance
Definition:
class.ilFMSettings.php:11
ilFMSettings
File Manager settings.
Definition:
class.ilFMSettings.php:9
php
ilFMSettings\enableLocalFS
enableLocalFS($a_stat)
Enable local file system frame.
Definition:
class.ilFMSettings.php:71
ilFMSettings\getMaxFileSize
getMaxFileSize()
Definition:
class.ilFMSettings.php:90
Services
WebServices
FileManager
classes
class.ilFMSettings.php
Generated on Fri Jan 17 2025 19:01:20 for ILIAS by
1.8.13 (using
Doxyfile
)