| 1 | <?php |
||
| 23 | abstract class AbstractRenderer |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * The associated output writer instance. |
||
| 27 | * |
||
| 28 | * @var \PHPMD\AbstractWriter |
||
| 29 | */ |
||
| 30 | private $writer = null; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns the associated output writer instance. |
||
| 34 | * |
||
| 35 | * @return \PHPMD\AbstractWriter |
||
| 36 | */ |
||
| 37 | 4 | public function getWriter() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the associated output writer instance. |
||
| 44 | * |
||
| 45 | * @param \PHPMD\AbstractWriter $writer |
||
| 46 | * @return void |
||
| 47 | */ |
||
| 48 | 4 | public function setWriter(AbstractWriter $writer) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * This method will be called on all renderers before the engine starts the |
||
| 55 | * real report processing. |
||
| 56 | * |
||
| 57 | * @return void |
||
| 58 | */ |
||
| 59 | 4 | public function start() |
|
| 63 | |||
| 64 | /** |
||
| 65 | * This method will be called when the engine has finished the source analysis |
||
| 66 | * phase. |
||
| 67 | * |
||
| 68 | * @param \PHPMD\Report $report |
||
| 69 | * @return void |
||
| 70 | */ |
||
| 71 | abstract public function renderReport(Report $report); |
||
| 72 | |||
| 73 | /** |
||
| 74 | * This method will be called the engine has finished the report processing |
||
| 75 | * for all registered renderers. |
||
| 76 | * |
||
| 77 | * @return void |
||
| 78 | */ |
||
| 79 | 4 | public function end() |
|
| 83 | } |
||
| 84 |