-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPresenterInterface.php
More file actions
46 lines (41 loc) · 1.11 KB
/
PresenterInterface.php
File metadata and controls
46 lines (41 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Orkestra\Bundle\ReportBundle;
/**
* Defines the contract all Presenters must follow
*
* A Presenter is essentially a slimmed down Controller in that it defines a
* template (or view) to be used for rendering a given report and a set of
* Filters to allow constraining the collection of Snapshots returned when
* the Presenter is bound to a Presentation
*/
interface PresenterInterface
{
/**
* Gets the name of the Presenter
*
* The name is used internally by the ReportFactory. As such, it should be
* unique across the entire application.
*
* @return string
*/
function getName();
/**
* Gets the name of the template to be used when rendering this Presenter
*
* @return string
*/
function getTemplate();
/**
* Gets an array of Filters available for this presenter
*
* @return array
*/
function getFilters();
/**
* Checks to see if a Report implements the necessary methods for this Presenter
* to function
*
* @return boolean
*/
function supports(ReportInterface $report);
}