Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 9c51e0d

Browse files
author
Reza Shadman
committed
Fix Indexrequest contract bugs.
1 parent ea44b64 commit 9c51e0d

File tree

1 file changed

+57
-3
lines changed

1 file changed

+57
-3
lines changed

src/Contracts/Api/Document/Index/IndexRequestInterface.php

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,63 @@ public function setDocument(DocumentInterface $document, $id = null);
1717
/**
1818
* Set id
1919
*
20-
* @param null $id
20+
* @param $id
2121
* @return $this
2222
*/
23-
public function setId($id = null);
24-
23+
public function setId($id);
24+
25+
/**
26+
* Index to store document on
27+
*
28+
* @param $index
29+
* @return $this
30+
*/
31+
public function setIndex($index);
32+
33+
/**
34+
* Type to set document on
35+
*
36+
* @param $type
37+
* @return $this
38+
*/
39+
public function setType($type);
40+
41+
/**
42+
* Index with all args
43+
*
44+
* @param DocumentInterface $document
45+
* @param $index
46+
* @param null $type
47+
* @param null $id
48+
* @return mixed
49+
*/
50+
public function index(DocumentInterface $document, $index, $type = null, $id = null);
51+
52+
/**
53+
* Get document of the request
54+
*
55+
* @return DocumentInterface
56+
*/
57+
public function getDocument();
58+
59+
/**
60+
* Get id of the document
61+
*
62+
* @return string|integer
63+
*/
64+
public function getDocumentId();
65+
66+
/**
67+
* Get index that should be used to store documents on.
68+
*
69+
* @return string
70+
*/
71+
public function getIndex();
72+
73+
/**
74+
* Get type that should be used to store documents on.
75+
*
76+
* @return string
77+
*/
78+
public function getType();
2579
}

0 commit comments

Comments
 (0)