Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-03-21 14:07:33 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-03-21 14:14:01 +0400
commit1581aa76a3e31dba957dbee89a5be9d846a5aa1e (patch)
treef996f50d80d39ab8ae61a86bc5c9f88b0e8a11ea /core/DataTable.php
parent5460c494951570fb546a484e816a7dd07aba1da8 (diff)
Allow DataTable filters to be array callbacks in DataTable::filter/queueFilter.
Diffstat (limited to 'core/DataTable.php')
-rw-r--r--core/DataTable.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/DataTable.php b/core/DataTable.php
index 0f8809821d..d91b907dfc 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -402,7 +402,9 @@ class DataTable implements DataTableInterface
*/
public function filter($className, $parameters = array())
{
- if ($className instanceof \Closure) {
+ if ($className instanceof \Closure
+ || is_array($className)
+ ) {
array_unshift($parameters, $this);
call_user_func_array($className, $parameters);
return;