#25 Added section property to the ApiDoc class

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

View File

@ -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;