AdapterInterface
last analyzed

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
search() 0 1 ?
createIndex() 0 1 ?
removeIndex() 0 1 ?
flushIndex() 0 1 ?
addDocument() 0 1 ?
addDocuments() 0 1 ?
updateDocument() 0 1 ?
removeDocument() 0 1 ?
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 * 
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 * 
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Component\Search\Adapter;
14
15
use Doctrine\Common\Collections\Collection;
16
use WellCommerce\Component\Search\Model\DocumentInterface;
17
use WellCommerce\Component\Search\Request\SearchRequestInterface;
18
19
/**
20
 * Interface AdapterInterface
21
 *
22
 * @author  Adam Piotrowski <[email protected]>
23
 */
24
interface AdapterInterface
25
{
26
    public function search(SearchRequestInterface $request): array;
27
    
28
    public function createIndex(string $locale, string $type);
29
    
30
    public function removeIndex(string $locale, string $type);
31
    
32
    public function flushIndex(string $locale, string $type);
33
    
34
    public function addDocument(DocumentInterface $document);
35
    
36
    public function addDocuments(Collection $documents, string $locale, string $type);
37
    
38
    public function updateDocument(DocumentInterface $document);
39
    
40
    public function removeDocument(DocumentInterface $document);
41
}
42