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:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-14 11:02:26 +0400
committerThomas Steur <thomas.steur@gmail.com>2014-08-14 11:19:26 +0400
commit5cf69a0b75e0041e7373a18e21e7d640edbb69ec (patch)
tree76ede142c3b229099b8667293bff076b2cde2bde /core/DataTable.php
parenta040cb98cccb95ebe241465ad3cab1f0925d9e78 (diff)
wondering if this fixes the skipped test?
Diffstat (limited to 'core/DataTable.php')
-rw-r--r--core/DataTable.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/core/DataTable.php b/core/DataTable.php
index d4c1976d60..3049dbf966 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -165,7 +165,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Common.php';
*
* @api
*/
-class DataTable implements DataTableInterface, \IteratorAggregate
+class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess
{
const MAX_DEPTH_DEFAULT = 15;
@@ -1640,4 +1640,26 @@ class DataTable implements DataTableInterface, \IteratorAggregate
public function getIterator() {
return new \ArrayIterator($this->getRows());
}
+
+ public function offsetExists($offset)
+ {
+ $row = $this->getRowFromId($offset);
+
+ return false !== $row;
+ }
+
+ public function offsetGet($offset)
+ {
+ return $this->getRowFromId($offset);
+ }
+
+ public function offsetSet($offset, $value)
+ {
+ $this->rows[$offset] = $value;
+ }
+
+ public function offsetUnset($offset)
+ {
+ $this->deleteRow($offset);
+ }
} \ No newline at end of file