Piwik\Segment\
Manages the global list of segments that can be used.
Segments are added automatically by dimensions as well as through the Segment.addSegments event. Observers for this event should call the addSegment() method to add segments or use any of the other methods to remove segments.
The class defines the following methods:
addSegment()
getSegments()
— Get all available segments.remove()
— Removes one or more segments from the segments list.getSegment()
addSegment()
It accepts the following parameter(s):
$segment
(Segment
) —It does not return anything or a mixed result.
getSegments()
Get all available segments.
Segment[]
value.remove()
Removes one or more segments from the segments list.
$segmentCategory
(string
) —
The segment category id. Can be a translation token eg 'General_Visits' see Segment::getCategoryId().$segmentExpression
(string
|false
) —
The segment expression name to remove eg 'pageUrl'. If not supplied, all segments within that category will be removed.getSegment()
It accepts the following parameter(s):
$segmentExpression
(string
) —
Name of the segment expression. eg pageUrl
Returns: Segment
|null
—