Skip to content

Commit

Permalink
added abstract methods in abstract classes from interface for hhvm build
Browse files Browse the repository at this point in the history
run `php-cs-fixer fix`
  • Loading branch information
kokspflanze committed Apr 16, 2015
1 parent 4e054e2 commit 5f35aee
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ZfcDatagrid/DataSource/AbstractDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
34 changes: 34 additions & 0 deletions src/ZfcDatagrid/Renderer/AbstractRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@

abstract class AbstractRenderer implements RendererInterface
{
/**
*
* @var array
*/
protected $options = [];

/**
*
* @var string
*/
protected $title;

/**
Expand Down Expand Up @@ -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();
}

0 comments on commit 5f35aee

Please sign in to comment.