ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilMailAutoCompleteRecipientProvider.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
8 {
13  protected $db;
14 
19  protected $res;
20 
25  protected $data = array();
26 
30  protected $quoted_term = '';
31 
35  protected $term = '';
36 
40  protected $user_id = 0;
41 
46  public function __construct($quoted_term, $term)
47  {
52  global $ilDB, $ilUser;
53 
54  $this->db = $ilDB;
55  $this->quoted_term = $quoted_term;
56  $this->term = $term;
57  $this->user_id = $ilUser->getId();
58  }
59 
64  public function valid()
65  {
66  $this->data = $this->db->fetchAssoc($this->res);
67 
68  return is_array($this->data);
69  }
70 
74  public function next()
75  {
76  }
77 
82  public function __destruct()
83  {
84  if($this->res)
85  {
86  $this->db->free($this->res);
87  $this->res = null;
88  }
89  }
90 }