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-06-13 04:25:30 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-13 04:25:30 +0400
commite3a023794fc9bfcdc219ae2e9b4ed10f7651c5a3 (patch)
tree57aa435497551128a844b3eccabd82563aa1c7b0 /core/Plugin/Segment.php
parent8270fde816a0ec04f05a549d60f449038b618367 (diff)
added possibility to set a permission on the segment object, fix category of deviceType
Diffstat (limited to 'core/Plugin/Segment.php')
-rw-r--r--core/Plugin/Segment.php29
1 files changed, 21 insertions, 8 deletions
diff --git a/core/Plugin/Segment.php b/core/Plugin/Segment.php
index 520fa26c0f..52c2b04b8f 100644
--- a/core/Plugin/Segment.php
+++ b/core/Plugin/Segment.php
@@ -24,6 +24,7 @@ class Segment
private $sqlFilter;
private $sqlFilterValue;
private $acceptValues;
+ private $permission;
public function __construct()
{
@@ -36,7 +37,7 @@ class Segment
}
/**
- * @param mixed $acceptValues
+ * @param string $acceptValues
*/
public function setAcceptValues($acceptValues)
{
@@ -44,7 +45,7 @@ class Segment
}
/**
- * @param mixed $category
+ * @param string $category
*/
public function setCategory($category)
{
@@ -52,7 +53,7 @@ class Segment
}
/**
- * @param mixed $name
+ * @param string $name
*/
public function setName($name)
{
@@ -60,7 +61,7 @@ class Segment
}
/**
- * @param mixed $segment
+ * @param string $segment
*/
public function setSegment($segment)
{
@@ -68,7 +69,7 @@ class Segment
}
/**
- * @param mixed $sqlFilter
+ * @param string|\Closure $sqlFilter
*/
public function setSqlFilter($sqlFilter)
{
@@ -76,7 +77,7 @@ class Segment
}
/**
- * @param mixed $sqlFilterValue
+ * @param string|array $sqlFilterValue
*/
public function setSqlFilterValue($sqlFilterValue)
{
@@ -84,7 +85,7 @@ class Segment
}
/**
- * @param mixed $sqlSegment
+ * @param string $sqlSegment
*/
public function setSqlSegment($sqlSegment)
{
@@ -100,13 +101,21 @@ class Segment
}
/**
- * @param mixed $type
+ * @param string $type See constansts TYPE_*
*/
public function setType($type)
{
$this->type = $type;
}
+ /**
+ * @param bool $permission
+ */
+ public function setPermission($permission)
+ {
+ $this->permission = $permission;
+ }
+
public function toArray()
{
$segment = array(
@@ -129,6 +138,10 @@ class Segment
$segment['acceptedValues'] = $this->acceptValues;
}
+ if (isset($this->permission)) {
+ $segment['permission'] = $this->permission;
+ }
+
return $segment;
}
}