PHP Class Devise\Search\UniversalSearch

Afficher le fichier Open project: devisephp/cms

Protected Properties

Свойство Type Description
$registered array[SearchableInterface] These are all the registered search providers that we will use in our universal search

Méthodes publiques

Méthode Description
__construct ( Pagination $Pagination ) Create a new universal search
register ( Searchable $item ) : void Provides a way to register new searchable items in our collection of Searchable items
search ( $for, integer $page = 1, integer $perPage = 10 ) : array Search through all registered searchers and put them together in results

Méthodes protégées

Méthode Description
searchRegistered ( text $for, integer $limit ) : Collection Search all the registered searchables
searchRegisteredSecondPass ( string $for, integer $limit, integer $leftover, Collection $collection ) : Collection On the second pass it's all about trying to take up as much of the leftovers as you want, like an all you can eat salad bar

Method Details

__construct() public méthode

Create a new universal search
public __construct ( Pagination $Pagination )
$Pagination Pagination

register() public méthode

Provides a way to register new searchable items in our collection of Searchable items
public register ( Searchable $item ) : void
$item Searchable
Résultat void

searchRegistered() protected méthode

Search all the registered searchables
protected searchRegistered ( text $for, integer $limit ) : Collection
$for text
$limit integer
Résultat Collection

searchRegisteredSecondPass() protected méthode

On the second pass it's all about trying to take up as much of the leftovers as you want, like an all you can eat salad bar
protected searchRegisteredSecondPass ( string $for, integer $limit, integer $leftover, Collection $collection ) : Collection
$for string
$limit integer
$leftover integer
$collection Collection
Résultat Collection

Property Details

$registered protected_oe property

These are all the registered search providers that we will use in our universal search
protected array[SearchableInterface] $registered
Résultat array[SearchableInterface]