61 $this->log->debug(
"Handler ID: ".$handler_id);
64 include_once
"Services/BackgroundTask/classes/class.".$handler_id.
".php";
65 return $handler_id::getInstanceFromTask($this);
75 $set = $ilDB->query(
"SELECT id FROM ".self::DB_NAME.
76 " WHERE user_id = ".$ilDB->quote($a_user_id,
"integer").
77 " AND status = ".$ilDB->quote(self::STATUS_PROCESSING,
"text"));
78 while(
$row = $ilDB->fetchAssoc($set))
89 return ($this->
getStatus() == self::STATUS_CANCELLING);
114 $this->handler = $a_val;
134 $this->
id = (int)$a_val;
154 $this->user_id = (int)$a_val;
174 $this->start_date = $a_val;
190 self::STATUS_INITIALIZED,
191 self::STATUS_PROCESSING,
192 self::STATUS_CANCELLING,
193 self::STATUS_CANCELLED,
194 self::STATUS_PROCESSED,
195 self::STATUS_FINISHED,
209 $this->status = $a_val;
230 $this->steps = abs($a_val);
250 $this->current_step = min(abs($a_val), $this->
getSteps());
270 $this->params = $a_params;
302 public function delete()
320 $set = $ilDB->queryF(
321 "SELECT * FROM " . self::DB_NAME .
" WHERE id=%s",
325 while ($rec = $ilDB->fetchAssoc($set))
337 ? unserialize($rec[
"params"])
361 $this->
setId($ilDB->nextId(self::DB_NAME));
365 $fields[
"id"] =
array(
"integer", $this->
getId());
367 $ilDB->insert(self::DB_NAME, $fields);
390 return $ilDB->manipulateF(
391 "DELETE FROM " . self::DB_NAME .
" WHERE id=%s",
setStatus($a_val)
Sets the status.
setStartDate(ilDateTime $a_val)
Sets the date when the download was started.
getSteps()
Gets the steps.
setCurrentStep($a_val)
Sets the current step.
getParams()
Gets the params.
__construct($a_id=0)
Constructor.
static getActiveByUserId($a_user_id)
getStartDate()
Gets the date when the download was started.
setHandlerId($a_val)
Sets the handler id.
setId($a_val)
Sets the id.
getCurrentStep()
Gets the current step.
getHandlerId()
Gets the handler.
Create styles array
The data for the language used.
setParams(array $a_params=null)
Sets the params.
exists()
Gets whether the download object exists.
setSteps($a_val)
Sets the steps.
static getLogger($a_component_id)
Get component logger.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getStatus()
Gets the status.
doDelete()
Deletes the object from the database.
getUserId()
Gets the user id.
setUserId($a_val)
Sets the user id.