forked from elastic/app-search-php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Client.php
47 lines (44 loc) · 1.19 KB
/
Client.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* This file is part of the Elastic App Search PHP Client package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Elastic\AppSearch\Client;
/**
* Client implementation.
*
* @package Elastic\AppSearch\Client
*/
class Client extends AbstractClient
{
/**
* Creates a new engine.
*
* Documentation: https://swiftype.com/documentation/app-search/api/engines#create
*
* @param string $name Engine name.
* @param string $language Engine language (null for universal).
*
* @return array
*/
public function createEngine($name, $language = null)
{
return $this->doCreateEngine($name, $language);
}
/**
* Creates a new meta engine.
*
* Documentation: https://swiftype.com/documentation/app-search/api/engines#create
*
* @param string $name Engine name.
* @param string[] $sourceEngines Source engines list.
*
* @return array
*/
public function createMetaEngine($name, array $sourceEngines)
{
return $this->doCreateEngine($name, null, 'meta', $sourceEngines);
}
}