(Experimental) Export a DBSearch as an array/JSON structure.

This commit is contained in:
Denis Flaven
2019-11-13 18:03:37 +01:00
parent 30430bb7dc
commit 36584092e5
4 changed files with 279 additions and 2 deletions

View File

@@ -463,6 +463,20 @@ class DBUnionSearch extends DBSearch
return $sRet;
}
/**
* {@inheritDoc}
* @see DBSearch::ToJSON()
*/
public function ToJSON()
{
$sRet = array('unions' => array());
foreach ($this->aSearches as $oSearch)
{
$sRet['unions'][] = $oSearch->ToJSON();
}
return $sRet;
}
/**
* Returns a new DBUnionSearch object where duplicates queries have been removed based on their OQLs
*