◆ __construct()
◆ addToQueue()
- Parameters
-
Definition at line 32 of file class.ilCertificateQueueRepository.php.
References $id, $row, ilCertificateQueueEntry\getAdapterClass(), ilCertificateQueueEntry\getObjId(), ilCertificateQueueEntry\getStartedTimestamp(), ilCertificateQueueEntry\getState(), ilCertificateQueueEntry\getTemplateId(), and ilCertificateQueueEntry\getUserId().
34 $this->logger->info(
'START - Add new entry to certificate cron job queue');
36 $id = $this->database->nextId(
'il_cert_cron_queue');
39 'id' => array(
'integer',
$id),
40 'obj_id' => array(
'integer', $certificateQueueEntry->
getObjId()),
41 'usr_id' => array(
'integer', $certificateQueueEntry->
getUserId()),
42 'adapter_class' => array(
'text', $certificateQueueEntry->
getAdapterClass()),
43 'state' => array(
'text', $certificateQueueEntry->
getState()),
45 'template_id' => array(
'integer', $certificateQueueEntry->
getTemplateId()),
49 $this->logger->debug(sprintf(
'Save queue entry with following values: %s', json_encode(
$row, JSON_PRETTY_PRINT)));
50 $this->logger->info(sprintf(
'END - Added entry to queue'));
52 $this->database->insert(
'il_cert_cron_queue',
$row);
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ getAllEntriesFromQueue()
ilCertificateQueueRepository::getAllEntriesFromQueue |
( |
| ) |
|
- Returns
- array
Definition at line 73 of file class.ilCertificateQueueRepository.php.
References $query, $result, and $row.
75 $this->logger->info(
'START - Fetch all entries from queue');
77 $sql =
'SELECT * FROM il_cert_cron_queue';
78 $query = $this->database->query($sql);
81 while (
$row = $this->database->fetchAssoc(
$query)) {
82 $this->logger->debug(sprintf(
'Queue entry found: ', json_encode(
$row, JSON_PRETTY_PRINT)));
87 $row[
'adapter_class'],
90 $row[
'started_timestamp'],
95 $this->logger->info(sprintf(
'END - All queue entries fetched(Total: "%s")', count(
$result)));
◆ removeFromQueue()
ilCertificateQueueRepository::removeFromQueue |
( |
|
$id | ) |
|
- Parameters
-
- Exceptions
-
Definition at line 59 of file class.ilCertificateQueueRepository.php.
References $id.
61 $this->logger->info(sprintf(
'START - Remove entry(id: "%s") from queue',
$id));
63 $sql =
'DELETE FROM il_cert_cron_queue WHERE id = ' . $this->database->quote(
$id,
'integer');
65 $this->database->manipulate($sql);
67 $this->logger->info(sprintf(
'END - Entry(id: "%s") deleted from queue',
$id));
if(!array_key_exists('StateId', $_REQUEST)) $id
◆ removeFromQueueByUserId()
ilCertificateQueueRepository::removeFromQueueByUserId |
( |
int |
$user_id | ) |
|
- Parameters
-
Definition at line 103 of file class.ilCertificateQueueRepository.php.
105 $this->logger->info(sprintf(
'START - Remove entries for user(user_id: "%s") from queue', $user_id));
107 $sql =
'DELETE FROM il_cert_cron_queue WHERE usr_id = ' . $this->database->quote($user_id,
'integer');
109 $this->database->manipulate($sql);
111 $this->logger->info(sprintf(
'END - Entries for user(user_id: "%s") deleted from queue', $user_id));
◆ $database
ilCertificateQueueRepository::$database |
|
private |
◆ $logger
ilCertificateQueueRepository::$logger |
|
private |
The documentation for this class was generated from the following file: