1 | <?php |
||
8 | class AlgoliaFactory |
||
9 | { |
||
10 | /** |
||
11 | * Makes a new Algolia Client. |
||
12 | * |
||
13 | * @param array $config |
||
14 | * |
||
15 | * @return Client |
||
16 | */ |
||
17 | 3 | public function make(array $config) |
|
23 | |||
24 | /** |
||
25 | * Returns a new instance for given class which must implement the SearchableInterface. |
||
26 | * |
||
27 | * @param string $className |
||
28 | * |
||
29 | * @return SearchableInterface |
||
30 | */ |
||
31 | public function makeSearchableObject($className) |
||
39 | |||
40 | /** |
||
41 | * Creates an new Algolia Client. |
||
42 | * |
||
43 | * @param string $applicationId The application ID you have in your admin interface |
||
44 | * @param string $apiKey A valid API key for the service |
||
45 | 3 | * @param null|array $hostsArray The list of hosts that you have received for the service |
|
46 | * @param array $options |
||
47 | 3 | * |
|
48 | 2 | * @return Client |
|
49 | */ |
||
50 | protected function createClient($applicationId, $apiKey, $hostsArray = null, $options = []) |
||
54 | 1 | ||
55 | /** |
||
56 | 1 | * Returns the configurations for the Algolia Client in correct format. |
|
57 | * @param array $config |
||
58 | * |
||
59 | * @return array |
||
60 | 1 | */ |
|
61 | protected function getConfig(array $config) |
||
82 | } |
||
83 |