public function load($source, $contentType, $options = [])
{
if ($source instanceof \PDOStatement) {
$document = new Document('1.0', 'UTF-8');
$document->registerNamespace('json', self::XMLNS);
$root = $document->appendElement('json:json');
$source->setFetchMode(\PDO::FETCH_OBJ);
foreach ($source as $row) {
$child = $root->appendElement('_');
$this->transferTo($child, $row, 1);
}
return new Result($document, 'text/xml');
}
return NULL;
}