ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilMailAutoCompleteRecipientProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  protected ilDBInterface $db;
24  protected ?ilDBStatement $res = null;
26  protected ?array $data = null;
27  protected int $user_id = 0;
28 
29  public function __construct(protected string $quoted_term, protected string $term)
30  {
31  global $DIC;
32 
33  $this->db = $DIC->database();
34  $this->user_id = $DIC->user()->getId();
35  }
36 
37  public function valid(): bool
38  {
39  $this->data = $this->db->fetchAssoc($this->res);
40 
41  return is_array($this->data) && !empty($this->data);
42  }
43 
44  public function next(): void
45  {
46  }
47 
48  public function __destruct()
49  {
50  if ($this->res !== null) {
51  $this->db->free($this->res);
52  $this->res = null;
53  }
54  }
55 }
__construct(protected string $quoted_term, protected string $term)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26