2012-04-12 01:28:36 +02:00
|
|
|
<?php
|
|
|
|
|
2012-04-12 18:37:42 +02:00
|
|
|
namespace Nelmio\ApiDocBundle\Formatter;
|
2012-04-12 01:28:36 +02:00
|
|
|
|
2012-04-12 18:37:42 +02:00
|
|
|
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
2012-04-12 01:28:36 +02:00
|
|
|
use Symfony\Component\Routing\Route;
|
|
|
|
|
|
|
|
interface FormatterInterface
|
|
|
|
{
|
2012-04-12 17:48:21 +02:00
|
|
|
/**
|
|
|
|
* Format a collection of documentation data.
|
|
|
|
*
|
|
|
|
* @param array $collection
|
|
|
|
* @return string|array
|
|
|
|
*/
|
2012-04-12 12:48:36 +02:00
|
|
|
function format(array $collection);
|
|
|
|
|
2012-04-12 17:48:21 +02:00
|
|
|
/**
|
|
|
|
* Format documentation data for one route.
|
|
|
|
*
|
|
|
|
* @param ApiDoc $apiDoc
|
|
|
|
* @param Route $route
|
|
|
|
* return string|array
|
|
|
|
*/
|
2012-04-12 12:48:36 +02:00
|
|
|
function formatOne(ApiDoc $apiDoc, Route $route);
|
2012-04-12 01:28:36 +02:00
|
|
|
}
|