PHP Класс Devise\Search\UniversalSearch

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$registered array[SearchableInterface] These are all the registered search providers that we will use in our universal search

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

register() публичный Метод

Provides a way to register new searchable items in our collection of Searchable items
public register ( Searchable $item ) : void
$item Searchable
Результат void

searchRegistered() защищенный Метод

Search all the registered searchables
protected searchRegistered ( text $for, integer $limit ) : Collection
$for text
$limit integer
Результат Collection

searchRegisteredSecondPass() защищенный Метод

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
Результат Collection

Описание свойств

$registered защищенное свойство

These are all the registered search providers that we will use in our universal search
protected array[SearchableInterface] $registered
Результат array[SearchableInterface]