http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73203
Revision: 73203
Author: daniel
Date: 2010-09-17 10:11:37 +0000 (Fri, 17 Sep 2010)
Log Message:
-----------
update docu
Modified Paths:
--------------
trunk/extensions/DataTransclusion/DBDataTransclusionSource.php
trunk/extensions/DataTransclusion/FlattenRecord.php
trunk/extensions/DataTransclusion/WebDataTransclusionSource.php
trunk/extensions/DataTransclusion/XPathFlattenRecord.php
Modified: trunk/extensions/DataTransclusion/DBDataTransclusionSource.php
===================================================================
--- trunk/extensions/DataTransclusion/DBDataTransclusionSource.php
2010-09-17 09:05:54 UTC (rev 73202)
+++ trunk/extensions/DataTransclusion/DBDataTransclusionSource.php
2010-09-17 10:11:37 UTC (rev 73203)
@@ -28,9 +28,6 @@
* not supported reliably. REQUIRED.
* * $spec['querySuffix']: additional clauses to be added after the WHERE
clause.
* Useful mostly to specify GROUP BY (or ORDER BY or LIMIT).
- * * $spec['fieldNames']: like for DataTransclusionSource; However, it's
not required
- * for DBDataTransclusionSource: if not provided, array_keys(
$spec['fieldInfo'] )
- * will be used.
* * $spec['fieldInfo']: like for DataTransclusionSource; Some additional
hints are
* supported for each field:
* * $spec['fieldInfo'][...]['dbfield']: the field's name in the
database table,
Modified: trunk/extensions/DataTransclusion/FlattenRecord.php
===================================================================
--- trunk/extensions/DataTransclusion/FlattenRecord.php 2010-09-17 09:05:54 UTC
(rev 73202)
+++ trunk/extensions/DataTransclusion/FlattenRecord.php 2010-09-17 10:11:37 UTC
(rev 73203)
@@ -34,7 +34,8 @@
* extractError() method. The path is evaluated as deswcribed for
$spec['dataPath']. If an
* entry is found at the given position in the response structure,
the request
* is assumed to have failed. For more complex detection of
errors, override
- * extractError(). REQUIRED.
+ * extractError(). If not given, the request is assumed to have
been successful as long as
+ * dataPath can be resolved to a data item.
*/
class FlattenRecord extends RecordTransformer {
Modified: trunk/extensions/DataTransclusion/WebDataTransclusionSource.php
===================================================================
--- trunk/extensions/DataTransclusion/WebDataTransclusionSource.php
2010-09-17 09:05:54 UTC (rev 73202)
+++ trunk/extensions/DataTransclusion/WebDataTransclusionSource.php
2010-09-17 10:11:37 UTC (rev 73203)
@@ -33,20 +33,13 @@
* 'xml' is supported, but requires a transformer that can handle
an XML DOM
* as input. To support more formats, override decodeData().
Default is 'php'.
* * $spec['dataPath']: "path" to the actual data in the structure
returned from the
- * HTTP request. The response data is assumed to consit of nested
arrays. Each entry
- * In the path navigates one step in this structure. Each entry
can be either a
- * string (for a lookup in an associative array), and int (an
index in a list), or
- * a "meta-key" of the form @@N, where N is an integer. A meta-key
refers to the
- * Nth entry in an associative array: @1 would be "bar" in array(
'x' => "foo", 'y' => "bar" ).
- * For more complex retrieval of the record, override
extractRecord(). REQUIRED.
- * * $spec['fieldNames']: names of all fields present in each record.
- * Fields not listed here will not be available on the wiki,
- * even if they are returned by the data source. REQUIRED.
+ * HTTP request. This is only used if no transformer is set. The
syntax of the
+ * path is the one defined for the dataPath parameter for the
FlattenRecord
+ * transformer. REQUIRED if no transformer is defined.
* * $spec['errorPath']: "path" to error messages in the structure
returned from the
- * HTTP request. The path is evaluated as deswcribed for
$spec['dataPath']. If an
- * entry is found at the given position in the response structure,
the request
- * is assumed to have failed. For more complex detection of
errors, override
- * extractError(). REQUIRED.
+ * HTTP request. This is only used if no transformer is set. The
syntax of the
+ * path is the one defined for the dataPath parameter for the
FlattenRecord
+ * transformer. REQUIRED if no transformer is defined.
* * $spec['httpOptions']: array of options to pass to Http::get. For
details, see Http::request.
* * $spec['timeout']: seconds before the request times out. If not given,
* $spec['httpOptions']['timeout'] is used. If both are not
givern, 5 seconds are assumed.
Modified: trunk/extensions/DataTransclusion/XPathFlattenRecord.php
===================================================================
--- trunk/extensions/DataTransclusion/XPathFlattenRecord.php 2010-09-17
09:05:54 UTC (rev 73202)
+++ trunk/extensions/DataTransclusion/XPathFlattenRecord.php 2010-09-17
10:11:37 UTC (rev 73203)
@@ -20,7 +20,6 @@
* In addition to the options supported by the FlattenRecord class,
* XPathFlattenRecord accepts some additional options, and changes the
convention for others.
*
- * * $spec['dataFormat']: must be "xml" or end with "+xml" if given.
Defaults to "xml".
* * $spec['dataPath']: xpath to the actual data in the structure
returned from the
* HTTP request. This uses standard W3C XPath syntax. REQUIRED.
* * $spec['fieldPathes']: an associative array giving a XPath for each
fied which points
@@ -31,10 +30,11 @@
* HTTP request. If an
* entry is found at the given position in the response structure,
the request
* is assumed to have failed. For more complex detection of
errors, override
- * extractError(). REQUIRED.
+ * extractError(). If not given, the request is assumed to have
been
+ * successful as long as dataPath can be resolved to a data item.
*
- * For more information on options supported by DataTransclusionSource and
- * WebDataTransclusionSource, see the class-level documentation there.
+ * For more information on options supported by FlattenRecord
+ * see the class-level documentation there.
*/
class XPathFlattenRecord extends FlattenRecord {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs