ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilMailAutoCompleteSearch.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 {
12  protected $result;
13 
17  protected $providers = array();
18 
23  {
24  $this->result = $result;
25  }
26 
30  public function addProvider(Iterator $provider)
31  {
32  $this->providers[] = $provider;
33  }
34 
38  public function search()
39  {
40  foreach($this->providers as $provider)
41  {
42  foreach($provider as $row)
43  {
44  if(!$this->result->isResultAddable())
45  {
46  $this->result->result['hasMoreResults'] = true;
47  break 2;
48  }
49  $this->result->addResult($row['login'], $row['firstname'], $row['lastname']);
50  }
51  }
52  }
53 }