Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
AsyncResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
fallbackContent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace Wikimedia\Parsoid\Ext; |
5 | |
6 | use Wikimedia\Parsoid\Fragments\PFragment; |
7 | |
8 | /** |
9 | * An AsyncResult indicates that the given PFragmentHandler was not yet |
10 | * ready to provide content. |
11 | * |
12 | * It can optionally provide a PFragment as temporary fallback content. |
13 | * |
14 | * In the future, additional methods or types of AsyncResult might be |
15 | * added to (eg) provide a timestamp when the content is expected to be |
16 | * ready, or to provide some sort of callback mechanism when the content |
17 | * is ready, or to provide a fragment UUID that could be used to query |
18 | * the fragment provider for the content later. |
19 | */ |
20 | class AsyncResult { |
21 | |
22 | /** |
23 | * Return fallback content to use for this "not ready yet" fragment, |
24 | * or null to use default fallback content. |
25 | */ |
26 | public function fallbackContent( ParsoidExtensionAPI $extAPI ): ?PFragment { |
27 | return null; |
28 | } |
29 | } |