ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 foreach ($provider as $row) {
42 if (!$this->result->isResultAddable()) {
43 $this->result->result['hasMoreResults'] = true;
44 break 2;
45 }
46 $this->result->addResult($row['login'], $row['firstname'], $row['lastname']);
47 }
48 }
49 }
50}
An exception for terminatinating execution or to throw for unit testing.
Class ilMailAutoCompleteSearch.
__construct(ilMailAutoCompleteRecipientResult $result)