Skip to content

Commit 1c78f3b

Browse files
committed
Add uses filter option to documentation
1 parent 5e6d791 commit 1c78f3b

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,43 @@ $specification = [
329329
],
330330
];
331331
```
332+
333+
## uses
334+
335+
#### Summary
336+
337+
Specifies an array of input values that should be used as part of a field's filter specification.
338+
339+
#### Types
340+
341+
* string[]
342+
343+
#### Default
344+
345+
The default value for this option is an empty array.
346+
347+
#### Constant
348+
349+
```php
350+
TraderInteractive\FilterOptions::USES
351+
```
352+
353+
#### Example
354+
355+
```php
356+
$specification = [
357+
'base' => [
358+
[['float']],
359+
],
360+
'exponent' => [
361+
TraderInteractive\FilterOptions::USES => 'base',
362+
[['uint'], ['pow']],
363+
],
364+
];
365+
```
366+
367+
The exponent filter spec will call the PHP function `pow()` with the value provided and the result of the filtered `base`
368+
332369
### Included Filters
333370
Of course, any function can potentially be used as a filter, but we include some useful filters with aliases for common circumstances.
334371

0 commit comments

Comments
 (0)