Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| DatetimeIndexField | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getMapping | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace CirrusSearch\Search; |
| 4 | |
| 5 | use SearchEngine; |
| 6 | |
| 7 | /** |
| 8 | * Index field representing datetime field. |
| 9 | * @package CirrusSearch |
| 10 | */ |
| 11 | class DatetimeIndexField extends CirrusIndexField { |
| 12 | |
| 13 | /** @inheritDoc */ |
| 14 | protected $typeName = 'date'; |
| 15 | |
| 16 | /** @inheritDoc */ |
| 17 | public function getMapping( SearchEngine $engine ) { |
| 18 | $config = parent::getMapping( $engine ); |
| 19 | $config['format'] = 'dateOptionalTime'; |
| 20 | return $config; |
| 21 | } |
| 22 | } |