ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailAutoCompleteSearch.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
24 protected array $providers = [];
25
26 public function __construct(protected ilMailAutoCompleteRecipientResult $result)
27 {
28 }
29
30 public function addProvider(Iterator $provider): void
31 {
32 $this->providers[] = $provider;
33 }
34
35 public function search(): void
36 {
37 foreach ($this->providers as $provider) {
38 foreach ($provider as $row) {
39 if (!$this->result->isResultAddable()) {
40 $this->result->result['hasMoreResults'] = true;
41 break 2;
42 }
43 $this->result->addResult($row['login'], $row['firstname'], $row['lastname']);
44 }
45 }
46 }
47}
__construct(protected ilMailAutoCompleteRecipientResult $result)
$provider
Definition: ltitoken.php:80