Skip to content

Commit f9d656a

Browse files
committed
Adding "pretty" parameter to QueryOptions
1 parent cc98a77 commit f9d656a

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

src/QueryOptions.php

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ protected function getDefinition()
3737
'WaitTime' => null,
3838
'Token' => null,
3939
'Near' => null,
40+
'Pretty' => null,
4041
);
4142
}
4243

@@ -50,7 +51,7 @@ public function getDatacenter()
5051

5152
/**
5253
* @param string $datacenter
53-
* @return $this
54+
* @return QueryOptions
5455
*/
5556
public function setDatacenter($datacenter)
5657
{
@@ -68,7 +69,7 @@ public function getAllowStale()
6869

6970
/**
7071
* @param bool $allowStale
71-
* @return $this
72+
* @return QueryOptions
7273
*/
7374
public function setAllowStale($allowStale)
7475
{
@@ -86,7 +87,7 @@ public function getWaitIndex()
8687

8788
/**
8889
* @param int $waitIndex
89-
* @return $this
90+
* @return QueryOptions
9091
*/
9192
public function setWaitIndex($waitIndex)
9293
{
@@ -104,7 +105,7 @@ public function getWaitTime()
104105

105106
/**
106107
* @param int $waitTime
107-
* @return $this
108+
* @return QueryOptions
108109
*/
109110
public function setWaitTime($waitTime)
110111
{
@@ -122,7 +123,7 @@ public function getToken()
122123

123124
/**
124125
* @param string $token
125-
* @return $this
126+
* @return QueryOptions
126127
*/
127128
public function setToken($token)
128129
{
@@ -140,7 +141,7 @@ public function getNear()
140141

141142
/**
142143
* @param string $near
143-
* @return $this
144+
* @return QueryOptions
144145
*/
145146
public function setNear($near)
146147
{
@@ -158,11 +159,28 @@ public function getRequireConsistent()
158159

159160
/**
160161
* @param string $requireConsistent
161-
* @return $this
162+
* @return QueryOptions
162163
*/
163164
public function setRequireConsistent($requireConsistent)
164165
{
165166
$this->_storage['RequireConsistent'] = $requireConsistent;
166167
return $this;
167168
}
169+
170+
public function isPretty() {
171+
return isset($this->_storage['Pretty']);
172+
}
173+
174+
/**
175+
* @param bool $pretty
176+
* @return QueryOptions
177+
*/
178+
public function setPretty($pretty) {
179+
if ($pretty)
180+
$this->_storage['Pretty'] = true;
181+
else
182+
unset($this->_storage['Pretty']);
183+
184+
return $this;
185+
}
168186
}

0 commit comments

Comments
 (0)