1 | <?php |
||
16 | class Suggest implements BuilderInterface |
||
17 | { |
||
18 | const DEFAULT_SIZE = 3; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $name; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $text; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private $params; |
||
34 | |||
35 | public function __construct($name, $text, $params = []) |
||
41 | |||
42 | /** |
||
43 | * Returns element type. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getType() |
||
51 | |||
52 | /** |
||
53 | * Returns suggest name |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getName() |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function toArray() |
||
82 | } |