ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
return
self::$instance;
35
}
36
return
self::$instance =
new
ilFMSettings
();
37
}
38
43
protected
function
getStorage
()
44
{
45
return
$this->storage
;
46
}
47
52
public
function
enable
($a_status)
53
{
54
$this->enabled = $a_status;
55
}
56
61
public
function
isEnabled
()
62
{
63
return
$this->enabled
;
64
}
65
70
public
function
enableLocalFS
($a_stat)
71
{
72
$this->localFS = $a_stat;
73
}
74
79
public
function
isLocalFSEnabled
()
80
{
81
return
$this->localFS
;
82
}
83
84
public
function
setMaxFileSize
($a_size)
85
{
86
$this->maxFileSize = $a_size;
87
}
88
89
public
function
getMaxFileSize
()
90
{
91
return
$this->maxFileSize
;
92
}
93
94
98
public
function
update
()
99
{
100
$this->
getStorage
()->set(
'enabled'
, (
int
) $this->
isEnabled
());
101
$this->
getStorage
()->set(
'local'
, (
int
) $this->
isLocalFSEnabled
());
102
$this->
getStorage
()->set(
'maxFileSize'
, (
int
) $this->
getMaxFileSize
());
103
}
104
108
protected
function
read
()
109
{
110
$this->
enable
($this->
getStorage
()->
get
(
'enabled'
, $this->enabled));
111
$this->
enableLocalFS
($this->
getStorage
()->
get
(
'local'
), $this->localFS);
112
$this->
setMaxFileSize
($this->
getStorage
()->
get
(
'maxFileSize'
, $this->maxFileSize));
113
}
114
}
ilFMSettings\isLocalFSEnabled
isLocalFSEnabled()
Check if local file system frame is enabled by default.
Definition:
class.ilFMSettings.php:79
ilFMSettings\isEnabled
isEnabled()
check if enabled
Definition:
class.ilFMSettings.php:61
ilFMSettings\__construct
__construct()
Singleton constructor.
Definition:
class.ilFMSettings.php:21
ilFMSettings\read
read()
Read settings.
Definition:
class.ilFMSettings.php:108
ilFMSettings\enable
enable($a_status)
Enable file manager.
Definition:
class.ilFMSettings.php:52
ilFMSettings\$enabled
$enabled
Definition:
class.ilFMSettings.php:14
ilFMSettings\getStorage
getStorage()
Get storage.
Definition:
class.ilFMSettings.php:43
ilFMSettings\update
update()
Update settings.
Definition:
class.ilFMSettings.php:98
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:84
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:70
ilSetting
ilFMSettings\getMaxFileSize
getMaxFileSize()
Definition:
class.ilFMSettings.php:89
Services
WebServices
FileManager
classes
class.ilFMSettings.php
Generated on Thu Jan 16 2025 19:02:35 for ILIAS by
1.8.13 (using
Doxyfile
)