ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilObjRemoteFile.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once(
'Services/WebServices/ECS/classes/class.ilRemoteObjectBase.php'
);
5
15
class
ilObjRemoteFile
extends
ilRemoteObjectBase
16
{
17
const
DB_TABLE_NAME
=
"rfil_settings"
;
18
19
protected
$version
;
20
protected
$version_tstamp
;
21
22
public
function
initType
()
23
{
24
$this->type =
"rfil"
;
25
}
26
27
protected
function
getTableName
()
28
{
29
return
self::DB_TABLE_NAME;
30
}
31
32
protected
function
getECSObjectType
()
33
{
34
return
"/campusconnect/files"
;
35
}
36
42
public
function
setVersion
($a_version)
43
{
44
$this->version = (int) $a_version;
45
}
46
52
public
function
getVersion
()
53
{
54
return
$this->version
;
55
}
56
62
public
function
setVersionDateTime
($a_tstamp)
63
{
64
$this->version_tstamp = (int) $a_tstamp;
65
}
66
72
public
function
getVersionDateTime
()
73
{
74
return
$this->version_tstamp
;
75
}
76
77
protected
function
doCreateCustomFields
(array &$a_fields)
78
{
79
$a_fields[
"version"
] = array(
"integer"
, 1);
80
$a_fields[
"version_tstamp"
] = array(
"integer"
, time());
81
}
82
83
protected
function
doUpdateCustomFields
(array &$a_fields)
84
{
85
$a_fields[
"version"
] = array(
"integer"
, $this->
getVersion
());
86
$a_fields[
"version_tstamp"
] = array(
"integer"
, $this->
getVersionDateTime
());
87
}
88
89
protected
function
doReadCustomFields
($a_row)
90
{
91
$this->
setVersion
($a_row->version);
92
$this->
setVersionDateTime
($a_row->version_tstamp);
93
}
94
95
protected
function
updateCustomFromECSContent
(
ilECSSetting
$a_server, $a_ecs_content)
96
{
97
$this->
setVersion
($a_ecs_content->version);
98
$this->
setVersionDateTime
($a_ecs_content->version_date);
99
}
100
109
public
static
function
_lookupVersionInfo
($a_obj_id)
110
{
111
global
$ilDB
;
112
113
$set = $ilDB->query(
"SELECT version, version_tstamp"
.
114
" FROM "
. self::DB_TABLE_NAME .
115
" WHERE obj_id = "
. $ilDB->quote($a_obj_id,
"integer"
));
116
$row
= $ilDB->fetchAssoc($set);
117
$res
= (int)
$row
[
"version"
];
118
119
if
(
$row
[
"version_tstamp"
]) {
120
$res
.=
" ("
.
ilDatePresentation::formatDate
(
new
ilDateTime
(
$row
[
"version_tstamp"
],
IL_CAL_UNIX
)) .
")"
;
121
}
122
123
return
$res
;
124
}
125
}
ilObjRemoteFile\setVersion
setVersion($a_version)
Set version.
Definition:
class.ilObjRemoteFile.php:42
ilECSSetting
Definition:
class.ilECSSetting.php:33
ilObjRemoteFile
Remote file app class.
Definition:
class.ilObjRemoteFile.php:15
ilObjRemoteFile\doCreateCustomFields
doCreateCustomFields(array &$a_fields)
Definition:
class.ilObjRemoteFile.php:77
ilObjRemoteFile\doUpdateCustomFields
doUpdateCustomFields(array &$a_fields)
Definition:
class.ilObjRemoteFile.php:83
IL_CAL_UNIX
const IL_CAL_UNIX
Definition:
class.ilDateTime.php:11
ilObjRemoteFile\$version
$version
Definition:
class.ilObjRemoteFile.php:19
ilDatePresentation\formatDate
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
Definition:
class.ilDatePresentation.php:127
ilObjRemoteFile\_lookupVersionInfo
static _lookupVersionInfo($a_obj_id)
Get version info.
Definition:
class.ilObjRemoteFile.php:109
ilObjRemoteFile\getVersionDateTime
getVersionDateTime()
get version timestamp
Definition:
class.ilObjRemoteFile.php:72
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilObjRemoteFile\getTableName
getTableName()
Definition:
class.ilObjRemoteFile.php:27
ilObjRemoteFile\updateCustomFromECSContent
updateCustomFromECSContent(ilECSSetting $a_server, $a_ecs_content)
Definition:
class.ilObjRemoteFile.php:95
ilDateTime
Date and time handling
Definition:
class.ilDateTime.php:33
ilRemoteObjectBase
Remote object app base class.
Definition:
class.ilRemoteObjectBase.php:15
$row
$row
Definition:
migrateto20.php:360
ilObjRemoteFile\doReadCustomFields
doReadCustomFields($a_row)
Definition:
class.ilObjRemoteFile.php:89
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilObjRemoteFile\getVersion
getVersion()
get version
Definition:
class.ilObjRemoteFile.php:52
ilObjRemoteFile\DB_TABLE_NAME
const DB_TABLE_NAME
Definition:
class.ilObjRemoteFile.php:17
ilObjRemoteFile\getECSObjectType
getECSObjectType()
Definition:
class.ilObjRemoteFile.php:32
php
ilObjRemoteFile\$version_tstamp
$version_tstamp
Definition:
class.ilObjRemoteFile.php:20
ilObjRemoteFile\setVersionDateTime
setVersionDateTime($a_tstamp)
Set version timestamp.
Definition:
class.ilObjRemoteFile.php:62
ilObjRemoteFile\initType
initType()
Definition:
class.ilObjRemoteFile.php:22
Modules
RemoteFile
classes
class.ilObjRemoteFile.php
Generated on Thu Jan 16 2025 19:02:07 for ILIAS by
1.8.13 (using
Doxyfile
)