ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Mail\RecipientSearch\Search Class Reference

@phpstan-import-type AutoCompleteUserRecord from RecipientSearchProvider More...

+ Collaboration diagram for ILIAS\Mail\RecipientSearch\Search:

Public Member Functions

 __construct (private readonly SearchResult $result)
 
 addProvider (\Iterator $provider)
 
 search ()
 

Private Attributes

array $providers = []
 

Detailed Description

@phpstan-import-type AutoCompleteUserRecord from RecipientSearchProvider

Definition at line 26 of file Search.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Mail\RecipientSearch\Search::__construct ( private readonly SearchResult  $result)

Definition at line 31 of file Search.php.

32 {
33 }

Member Function Documentation

◆ addProvider()

ILIAS\Mail\RecipientSearch\Search::addProvider ( \Iterator  $provider)
Parameters

Iterator<AutoCompleteUserRecord> $provider

Definition at line 38 of file Search.php.

38 : void
39 {
40 $this->providers[] = $provider;
41 }
$provider
Definition: ltitoken.php:80

References $provider.

◆ search()

ILIAS\Mail\RecipientSearch\Search::search ( )

Definition at line 43 of file Search.php.

43 : void
44 {
45 foreach ($this->providers as $provider) {
46 $status = SearchResultStatus::INITIAL;
47 foreach ($provider as $row) {
48 if ($status === SearchResultStatus::LIMIT_REACHED) {
49 $this->result->markMoreResultsAvailable();
50 break 2;
51 }
52
53 $status = $this->result->addResult($row['login'], $row['firstname'], $row['lastname']);
54 }
55 }
56 }

References $provider, and ILIAS\Mail\RecipientSearch\LIMIT_REACHED.

Field Documentation

◆ $providers

array ILIAS\Mail\RecipientSearch\Search::$providers = []
private

Definition at line 29 of file Search.php.


The documentation for this class was generated from the following file: