26 protected array
$map = array();
38 bool $a_reference =
true 42 $this->db = $DIC->database();
57 return array_key_exists($a_name, $this->map);
66 return (
int) $this->map[$a_name];
78 return $this->properties[$a_name];
90 $this->properties[$a_name] = $a_value;
104 ?
string $a_raw_data = null
110 switch ($data_type) {
111 case self::TYPE_STRING:
112 $value = (string) $a_data;
115 case self::TYPE_BOOL:
116 $value = (bool) $a_data;
120 $value = (
int) $a_data;
123 case self::TYPE_DATE:
127 case self::TYPE_ARRAY:
129 $value = unserialize($a_data, [
'allowed_classes' =>
false]);
134 $value = $a_raw_data;
154 switch ($data_type) {
155 case self::TYPE_DATE:
161 case self::TYPE_ARRAY:
163 $value = serialize($value);
173 return array(
"parameters" => $value,
174 "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)) {
187 while ($row =
$ilDB->fetchAssoc($set)) {
198 protected function doCreate(
bool $clone_mode =
false): void
217 $ilDB->manipulate(
"DELETE FROM il_verification" .
218 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
223 $fields = array(
"id" => array(
"integer", $this->
id),
224 "type" => array(
"text", $name),
225 "parameters" => array(
"text", $property[
"parameters"]),
226 "raw_data" => array(
"text", $property[
"raw_data"]));
228 $ilDB->insert(
"il_verification", $fields);
249 $ilDB->manipulate(
"DELETE FROM il_verification" .
250 " WHERE id = " .
$ilDB->quote($this->id,
"integer"));
254 public static function initStorage(
int $a_id,
string $a_subdir = null): string
259 $path = $storage->getAbsolutePath() .
"/";
262 $path .= $a_subdir .
"/";
264 if (!is_dir(
$path)) {
276 $path = self::initStorage($this->
getId(),
"certificate");
277 return $path . $file;
importProperty(string $a_type, $a_data=null, ?string $a_raw_data=null)
Import property from database.
getPropertyType(string $a_name)
Get property data type.
hasProperty(string $a_name)
Check if given property is valid.
static initStorage(int $a_id, string $a_subdir=null)
getProperty(string $a_name)
Get property value.
static getASCIIFilename(string $a_filename)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exportProperty(string $a_name)
Export property to database.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
saveProperties()
Save current properties to database.
__construct(int $a_id=0, bool $a_reference=true)
doCreate(bool $clone_mode=false)
setProperty(string $a_name, $a_value)
Set property value.
getPropertyMap()
Return property map (name => type)