4 include_once(
'./Services/Object/classes/class.ilObject2.php');
31 $this->db = $DIC->database();
33 parent::__construct($a_id, $a_reference);
51 return array_key_exists($a_name, $this->map);
63 return $this->map[$a_name];
76 return $this->properties[$a_name];
89 $this->properties[$a_name] = $a_value;
106 switch ($data_type) {
107 case self::TYPE_STRING:
108 $value = (string) $a_data;
111 case self::TYPE_BOOL:
112 $value = (bool) $a_data;
116 $value = (int) $a_data;
119 case self::TYPE_DATE:
123 case self::TYPE_ARRAY:
125 $value = unserialize($a_data);
130 $value = $a_raw_data;
150 switch ($data_type) {
151 case self::TYPE_DATE:
157 case self::TYPE_ARRAY:
159 $value = serialize($value);
169 return array(
"parameters" => $value,
170 "raw_data" => $raw_data);
184 $set =
$ilDB->query(
"SELECT * FROM il_verification" .
185 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
186 if (
$ilDB->numRows($set)) {
221 $ilDB->manipulate(
"DELETE FROM il_verification" .
222 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
227 $fields = array(
"id" => array(
"integer", $this->
id),
228 "type" => array(
"text", $name),
229 "parameters" => array(
"text", $property[
"parameters"]),
230 "raw_data" => array(
"text", $property[
"raw_data"]));
232 $ilDB->insert(
"il_verification", $fields);
254 include_once
"Services/Verification/classes/class.ilVerificationStorageFile.php";
260 $ilDB->manipulate(
"DELETE FROM il_verification" .
261 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
269 include_once
"Services/Verification/classes/class.ilVerificationStorageFile.php";
273 $path = $storage->getAbsolutePath() .
"/";
276 $path .= $a_subdir .
"/";
278 if (!is_dir(
$path)) {
291 return $path . $file;
302 include_once
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
307 array($this->
getId()),
importProperty($a_type, $a_data=null, $a_raw_data=null)
Import property from database.
exportProperty($a_name)
Export property to database.
getProperty($a_name)
Get property value.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
setProperty($a_name, $a_value)
Set property value.
hasProperty($a_name)
Check if given property is valid.
doDelete()
Delete entry from database.
Verification object base class.
static initStorage($a_id, $a_subdir=null)
getPropertyType($a_name)
Get property data type.
__construct($a_id=0, $a_reference=true)
static dirsize($directory)
get size of a directory or a file.
static handleUpdatedSourceObject($a_src_obj_type, $a_src_obj_id, $a_src_filesize, $a_owner_obj_ids=null, $a_is_prtf=false)
Find and update/create all related entries for source object.
saveProperties()
Save current properties to database.
doRead()
Read database entry.
getPropertyMap()
Return property map (name => type)