ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSearchCommandQueue Class Reference
+ Collaboration diagram for ilSearchCommandQueue:

Public Member Functions

 store (ilSearchCommandQueueElement $element)
 update / save new entry More...
 

Static Public Member Functions

static factory ()
 get singleton instance More...
 

Protected Member Functions

 __construct ()
 Constructor. More...
 

Protected Attributes

ilDBInterface $db
 

Static Private Attributes

static self $instance = null
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 28 of file class.ilSearchCommandQueue.php.

Constructor & Destructor Documentation

◆ __construct()

ilSearchCommandQueue::__construct ( )
protected

Constructor.

Definition at line 37 of file class.ilSearchCommandQueue.php.

38 {
39 global $DIC;
40
41 $this->db = $DIC->database();
42 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Member Function Documentation

◆ factory()

static ilSearchCommandQueue::factory ( )
static

get singleton instance

Definition at line 47 of file class.ilSearchCommandQueue.php.

48 {
49 if (self::$instance instanceof ilSearchCommandQueue) {
50 return self::$instance;
51 }
52 return self::$instance = new ilSearchCommandQueue();
53 }

References $instance.

Referenced by ilSearchAppEventListener\storeElement().

+ Here is the caller graph for this function:

◆ store()

ilSearchCommandQueue::store ( ilSearchCommandQueueElement  $element)

update / save new entry

Definition at line 58 of file class.ilSearchCommandQueue.php.

58 : void
59 {
60 $this->db->replace(
61 'search_command_queue',
62 [
63 'obj_id' => [ilDBConstants::T_INTEGER, $element->getObjId()],
64 'obj_type' => [ilDBConstants::T_TEXT, $element->getObjType()],
65 'sub_id' => [ilDBConstants::T_INTEGER, 0]
66 ],
67 [
68 'sub_type' => [ilDBConstants::T_TEXT, ''],
69 'command' => [ilDBConstants::T_TEXT, $element->getCommand()],
70 'last_update' => [ilDBConstants::T_DATE, $this->db->now()],
71 'finished' => [ilDBConstants::T_INTEGER, 0]
72 ]
73 );
74 }

References ilSearchCommandQueueElement\getCommand(), ilSearchCommandQueueElement\getObjId(), ilSearchCommandQueueElement\getObjType(), ilDBConstants\T_DATE, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

+ Here is the call graph for this function:

Field Documentation

◆ $db

ilDBInterface ilSearchCommandQueue::$db
protected

Definition at line 32 of file class.ilSearchCommandQueue.php.

◆ $instance

self ilSearchCommandQueue::$instance = null
staticprivate

Definition at line 30 of file class.ilSearchCommandQueue.php.

Referenced by factory().


The documentation for this class was generated from the following file: