Index: trunk/extensions/DataTransclusion/FlattenRecord.php |
— | — | @@ -34,7 +34,8 @@ |
35 | 35 | * extractError() method. The path is evaluated as deswcribed for $spec['dataPath']. If an |
36 | 36 | * entry is found at the given position in the response structure, the request |
37 | 37 | * is assumed to have failed. For more complex detection of errors, override |
38 | | - * extractError(). REQUIRED. |
| 38 | + * extractError(). If not given, the request is assumed to have been successful as long as |
| 39 | + * dataPath can be resolved to a data item. |
39 | 40 | */ |
40 | 41 | class FlattenRecord extends RecordTransformer { |
41 | 42 | |
Index: trunk/extensions/DataTransclusion/WebDataTransclusionSource.php |
— | — | @@ -33,20 +33,13 @@ |
34 | 34 | * 'xml' is supported, but requires a transformer that can handle an XML DOM |
35 | 35 | * as input. To support more formats, override decodeData(). Default is 'php'. |
36 | 36 | * * $spec['dataPath']: "path" to the actual data in the structure returned from the |
37 | | - * HTTP request. The response data is assumed to consit of nested arrays. Each entry |
38 | | - * In the path navigates one step in this structure. Each entry can be either a |
39 | | - * string (for a lookup in an associative array), and int (an index in a list), or |
40 | | - * a "meta-key" of the form @@N, where N is an integer. A meta-key refers to the |
41 | | - * Nth entry in an associative array: @1 would be "bar" in array( 'x' => "foo", 'y' => "bar" ). |
42 | | - * For more complex retrieval of the record, override extractRecord(). REQUIRED. |
43 | | - * * $spec['fieldNames']: names of all fields present in each record. |
44 | | - * Fields not listed here will not be available on the wiki, |
45 | | - * even if they are returned by the data source. REQUIRED. |
| 37 | + * HTTP request. This is only used if no transformer is set. The syntax of the |
| 38 | + * path is the one defined for the dataPath parameter for the FlattenRecord |
| 39 | + * transformer. REQUIRED if no transformer is defined. |
46 | 40 | * * $spec['errorPath']: "path" to error messages in the structure returned from the |
47 | | - * HTTP request. The path is evaluated as deswcribed for $spec['dataPath']. If an |
48 | | - * entry is found at the given position in the response structure, the request |
49 | | - * is assumed to have failed. For more complex detection of errors, override |
50 | | - * extractError(). REQUIRED. |
| 41 | + * HTTP request. This is only used if no transformer is set. The syntax of the |
| 42 | + * path is the one defined for the dataPath parameter for the FlattenRecord |
| 43 | + * transformer. REQUIRED if no transformer is defined. |
51 | 44 | * * $spec['httpOptions']: array of options to pass to Http::get. For details, see Http::request. |
52 | 45 | * * $spec['timeout']: seconds before the request times out. If not given, |
53 | 46 | * $spec['httpOptions']['timeout'] is used. If both are not givern, 5 seconds are assumed. |
Index: trunk/extensions/DataTransclusion/XPathFlattenRecord.php |
— | — | @@ -20,7 +20,6 @@ |
21 | 21 | * In addition to the options supported by the FlattenRecord class, |
22 | 22 | * XPathFlattenRecord accepts some additional options, and changes the convention for others. |
23 | 23 | * |
24 | | - * * $spec['dataFormat']: must be "xml" or end with "+xml" if given. Defaults to "xml". |
25 | 24 | * * $spec['dataPath']: xpath to the actual data in the structure returned from the |
26 | 25 | * HTTP request. This uses standard W3C XPath syntax. REQUIRED. |
27 | 26 | * * $spec['fieldPathes']: an associative array giving a XPath for each fied which points |
— | — | @@ -31,10 +30,11 @@ |
32 | 31 | * HTTP request. If an |
33 | 32 | * entry is found at the given position in the response structure, the request |
34 | 33 | * is assumed to have failed. For more complex detection of errors, override |
35 | | - * extractError(). REQUIRED. |
| 34 | + * extractError(). If not given, the request is assumed to have been |
| 35 | + * successful as long as dataPath can be resolved to a data item. |
36 | 36 | * |
37 | | - * For more information on options supported by DataTransclusionSource and |
38 | | - * WebDataTransclusionSource, see the class-level documentation there. |
| 37 | + * For more information on options supported by FlattenRecord |
| 38 | + * see the class-level documentation there. |
39 | 39 | */ |
40 | 40 | class XPathFlattenRecord extends FlattenRecord { |
41 | 41 | |
Index: trunk/extensions/DataTransclusion/DBDataTransclusionSource.php |
— | — | @@ -28,9 +28,6 @@ |
29 | 29 | * not supported reliably. REQUIRED. |
30 | 30 | * * $spec['querySuffix']: additional clauses to be added after the WHERE clause. |
31 | 31 | * Useful mostly to specify GROUP BY (or ORDER BY or LIMIT). |
32 | | - * * $spec['fieldNames']: like for DataTransclusionSource; However, it's not required |
33 | | - * for DBDataTransclusionSource: if not provided, array_keys( $spec['fieldInfo'] ) |
34 | | - * will be used. |
35 | 32 | * * $spec['fieldInfo']: like for DataTransclusionSource; Some additional hints are |
36 | 33 | * supported for each field: |
37 | 34 | * * $spec['fieldInfo'][...]['dbfield']: the field's name in the database table, |