midgard_replicator method export_purged
Exports purged objects.
string export_purged(mixed value, [string startdate], [string enddate]);
Minimum version: 1.8.1
This method takes three parameters:
- value , classname ( or particular class' object instance ) for which purged objects should be exported
- startdate optional ISO formatted date
- enddate optional ISO formatted date
All objects of classname are exported if startdate and enddate are ommited or strictly set to NULL. Also use NULL as startdate or enddate if one if them shouldn't be defined.
Returns valid xml content on success, NULL otherwise.
You should use:
- serialize method if you need serialized object's instance data.
- export_blob method if you need to export midgard_attachment's binary data
- export method if you need to export all object which has not been previously purged.
- import_from_xml method if you need to import all purged object.
Examples
/* Export all articles which has been previously purged */
$xml = $rep->export_purged("midgard_article");
/* Export all articles purged after January, 1st, 2007 */
$article = new midgard_article($guid);
$xml = midgard_replicator::export_purged($article, "2007-01-01 00:00:00", NULL);
/* Export all articles purged before January, 10th, 2007 */
$article = new midgard_article($guid);
$xml = midgard_replicator::export_purged($article, NULL, "2007-01-10 00:00:00");
