1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00

feat: parse collection list

This commit is contained in:
Christy Jacob 2020-12-29 22:28:54 +05:30
parent 9c01fb1ff6
commit fa748b6230

View file

@ -25,6 +25,10 @@ class V06 extends Filter {
$parsedResponse = $this->parseCollection($content);
break;
case Response::MODEL_COLLECTION_LIST:
$parsedResponse = $this->parseCollectionList($content);
break;
case Response::MODEL_FILE :
$parsedResponse = $this->parseFile($content);
break;
@ -104,6 +108,14 @@ class V06 extends Filter {
return $parsedResponse;
}
private function parseCollectionList(array $content)
{
foreach($content['collections'] as $key => $collection){
$content['collections'][$key] = $this->parseCollection($collection);
}
return $content;
}
private function parseCollection(array $content)
{
$content['$collection'] = Database::SYSTEM_COLLECTION_COLLECTIONS;