From ad4eae7dd731296bb007e65194ccbe4d8cc84ca3 Mon Sep 17 00:00:00 2001 From: drgomesp <daniel@obiz.com.br> Date: Wed, 13 Feb 2013 17:08:35 -0200 Subject: [PATCH] #25 Added handling of sections on the processCollection method of the AbstractFormatter --- Formatter/AbstractFormatter.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Formatter/AbstractFormatter.php b/Formatter/AbstractFormatter.php index eadc844..978c719 100644 --- a/Formatter/AbstractFormatter.php +++ b/Formatter/AbstractFormatter.php @@ -127,7 +127,11 @@ abstract class AbstractFormatter implements FormatterInterface { $array = array(); 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();