|
12 | 12 |
|
13 | 13 | htmlHeader();
|
14 | 14 |
|
15 |
| -if (!isset($weight) || !isset($requestFormat)) { |
| 15 | +if (!isset($weight) || !isset($addRequestFormat) || !isset($delRequestFormat)) { |
16 | 16 | echo <<<'EOT'
|
17 | 17 | <h1>Usage</h1>
|
18 | 18 |
|
19 |
| - <p>This file is intended to be included by a script that sets two variables:</p> |
| 19 | + <p>This file is intended to be included by a script that sets three variables:</p> |
20 | 20 |
|
21 | 21 | <dl>
|
22 | 22 | <dt><code>$weight</code></dt>
|
23 | 23 | <dd>Either <code>''</code> for the regular plugins or <code>'lite'</code> for the lite versions.</dd>
|
24 |
| - <dt><code>$requestFormat</code></dt> |
| 24 | + <dt><code>$addRequestFormat</code></dt> |
25 | 25 | <dd>Any of the <code>Solarium\QueryType\Update\Query\Query::REQUEST_FORMAT_*</code> constants.</dd>
|
| 26 | + <dt><code>$delRequestFormat</code></dt> |
| 27 | + <dd><code>Solarium\QueryType\Update\Query\Query::REQUEST_FORMAT_JSON</code> or <code>REQUEST_FORMAT_XML</code>.</dd> |
26 | 28 | </dl>
|
27 | 29 |
|
28 | 30 | <h2>Example</h2>
|
|
35 | 37 | use Solarium\QueryType\Update\Query\Query;
|
36 | 38 |
|
37 | 39 | $weight = '';
|
38 |
| - $requestFormat = Query::REQUEST_FORMAT_JSON; |
| 40 | + $addRequestFormat = Query::REQUEST_FORMAT_JSON; |
| 41 | + $delRequestFormat = Query::REQUEST_FORMAT_JSON; |
39 | 42 |
|
40 | 43 | require(__DIR__.'/7.5.3-plugin-bufferedupdate-benchmarks.php');
|
41 | 44 | </pre>
|
|
76 | 79 | $addBuffer = $client->getPlugin($addPlugin = 'bufferedadd'.$weight);
|
77 | 80 | $delBuffer = $client->getPlugin($delPlugin = 'buffereddelete'.$weight);
|
78 | 81 |
|
79 |
| -$addBuffer->setRequestFormat($requestFormat); |
80 |
| -$delBuffer->setRequestFormat($requestFormat); |
| 82 | +$addBuffer->setRequestFormat($addRequestFormat); |
| 83 | +$delBuffer->setRequestFormat($delRequestFormat); |
81 | 84 |
|
82 |
| -echo '<h3>'.$addPlugin.' / '.$delPlugin.' ('.strtoupper($requestFormat).')</h3>'; |
| 85 | +echo '<h3>'.$addPlugin.' ('.strtoupper($addRequestFormat).') / '.$delPlugin.' ('.strtoupper($delRequestFormat).')</h3>'; |
83 | 86 | echo '<table><thead>';
|
84 | 87 | echo '<tr><th>add buffer size</th><th>add time</th>';
|
85 | 88 | echo '<th>delete buffer size</th><th>delete time</th>';
|
|
0 commit comments