1
<?php
2

3
/*
4
 * This file is part of the Solarium package.
5
 *
6
 * For the full copyright and license information, please view the COPYING
7
 * file that was distributed with this source code.
8
 */
9

10
namespace Solarium\Component\QueryTraits;
11

12
use Solarium\Component\ComponentAwareQueryInterface;
13
use Solarium\Component\Suggester;
14

15
/**
16
 * Trait query types supporting components.
17
 */
18
trait SuggesterTrait
19
{
20
    /**
21
     * Get a suggest component instance.
22
     *
23
     * This is a convenience method that maps presets to getComponent
24
     *
25
     * @return \Solarium\Component\Suggester
26
     */
27 12
    public function getSuggester(): Suggester
28
    {
29 12
        return $this->getComponent(ComponentAwareQueryInterface::COMPONENT_SUGGESTER, true);
30
    }
31
}

Read our documentation on viewing source code .

Loading