#25 Added handling of sections on the processCollection method of the AbstractFormatter

This commit is contained in:
drgomesp 2013-02-13 17:08:35 -02:00
parent b7aa5dca72
commit ad4eae7dd7

View File

@ -127,7 +127,11 @@ abstract class AbstractFormatter implements FormatterInterface
{ {
$array = array(); $array = array();
foreach ($collection as $coll) { foreach ($collection as $coll) {
$array[$coll['resource']][] = $coll['annotation']->toArray(); if('none' === $coll['annotation']->getSection()) {
$array[$coll['resource']][] = $coll['annotation']->toArray();
} else {
$array[$coll['annotation']->getSection()][] = $coll['annotation']->toArray();
}
} }
$processedCollection = array(); $processedCollection = array();