From b7aa5dca72a7275039f857c3a518088c7aeec5ef Mon Sep 17 00:00:00 2001 From: drgomesp Date: Wed, 13 Feb 2013 17:08:00 -0200 Subject: [PATCH] #25 Added section property to the ApiDoc class --- Annotation/ApiDoc.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Annotation/ApiDoc.php b/Annotation/ApiDoc.php index aac6f38..9004b55 100644 --- a/Annotation/ApiDoc.php +++ b/Annotation/ApiDoc.php @@ -56,6 +56,13 @@ class ApiDoc */ private $description = null; + /** + * Section to group actions together. + * + * @var string + */ + private $section = 'none'; + /** * Extended documentation. * @@ -128,6 +135,10 @@ class ApiDoc if (isset($data['statusCodes'])) { $this->statusCodes = $data['statusCodes']; } + + if (isset($data['section'])) { + $this->section = $data['section']; + } } /** @@ -188,6 +199,22 @@ class ApiDoc $this->description = $description; } + /** + * @param string $section + */ + public function setSection($section) + { + $this->section = $section; + } + + /** + * @return string + */ + public function getSection() + { + return $this->section; + } + /** * @param string $documentation */ @@ -303,6 +330,10 @@ class ApiDoc $data['statusCodes'] = $statusCodes; } + if ($section = $this->section) { + $data['section'] = $section; + } + $data['https'] = $this->https; return $data;