From 5f35aeec8fb8bfde4b6f137c5fd4adca5a7d37fa Mon Sep 17 00:00:00 2001 From: kokspflanze Date: Thu, 16 Apr 2015 22:51:52 +0200 Subject: [PATCH] added abstract methods in abstract classes from interface for hhvm build run `php-cs-fixer fix` --- .../DataSource/AbstractDataSource.php | 13 +++++++ src/ZfcDatagrid/Renderer/AbstractRenderer.php | 34 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/src/ZfcDatagrid/DataSource/AbstractDataSource.php b/src/ZfcDatagrid/DataSource/AbstractDataSource.php index 6bb04043..c11bdd28 100644 --- a/src/ZfcDatagrid/DataSource/AbstractDataSource.php +++ b/src/ZfcDatagrid/DataSource/AbstractDataSource.php @@ -141,4 +141,17 @@ public function getPaginatorAdapter() { return $this->paginatorAdapter; } + + /** + * Get the data back from construct + * @return mixed + */ + abstract public function getData(); + + /** + * Execute the query and set the paginator + * - with sort statements + * - with filters statements + */ + abstract public function execute(); } diff --git a/src/ZfcDatagrid/Renderer/AbstractRenderer.php b/src/ZfcDatagrid/Renderer/AbstractRenderer.php index 19f13558..15d7e421 100644 --- a/src/ZfcDatagrid/Renderer/AbstractRenderer.php +++ b/src/ZfcDatagrid/Renderer/AbstractRenderer.php @@ -14,8 +14,16 @@ abstract class AbstractRenderer implements RendererInterface { + /** + * + * @var array + */ protected $options = []; + /** + * + * @var string + */ protected $title; /** @@ -700,4 +708,30 @@ public function prepareViewModel(Datagrid $grid) $viewModel->setVariable('exportRenderers', $grid->getExportRenderers()); } + + /** + * Return the name of the renderer + * @return string + */ + abstract public function getName(); + + /** + * Determine if the renderer is for export + * @return boolean + */ + abstract public function isExport(); + + /** + * Determin if the renderer is HTML + * It can be export + html -> f.x. + * printing for HTML + * @return boolean + */ + abstract public function isHtml(); + + /** + * Execute all... + * @return ViewModel Response\Stream + */ + abstract public function execute(); }