PHP Класс Piwik\Columns\Dimension

С версии: 2.5.0
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$columnName string This will be the name of the column in the database table if a $columnType is specified.
$columnType string If a columnType is defined, we will create a column in the MySQL table having this type. Please make sure MySQL understands this type. Once you change the column type the Piwik platform will notify the user to perform an update which can sometimes take a long time so be careful when choosing the correct column type.
$segments Piwik\Plugin\Segment[] Holds an array of segment instances

Открытые методы

Метод Описание
factory ( string $dimensionId ) : Dimension | null Creates a Dimension instance from a string ID (see {@link getId()}).
getAllDimensions ( ) : Dimension[] Gets an instance of all available visit, action and conversion dimension.
getColumnName ( ) : string Get the name of the dimension column.
getDimensions ( Plugin $plugin )
getId ( ) : string Returns a unique string ID for this dimension. The ID is built using the namespaced class name of the dimension, but is modified to be more human readable.
getModule ( ) : string Returns the name of the plugin that contains this Dimension.
getName ( ) : string Get the translated name of the dimension. Defaults to an empty string.
getSegments ( ) : Piwik\Plugin\Segment[] Get the list of configured segments.
hasColumnType ( ) : boolean Check whether the dimension has a column type configured
hasImplementedEvent ( $method ) : boolean Check whether a dimension has overwritten a specific method.

Защищенные методы

Метод Описание
addSegment ( Piwik\Plugin\Segment $segment ) Adds a new segment. The segment type will be set to 'dimension' automatically if not already set.
configureSegments ( ) Overwrite this method to configure segments. To do so just create an instance of a {@link \Piwik\Plugin\Segment} class, configure it and call the {@link addSegment()} method. You can add one or more segments for this dimension. Example:

Описание методов

addSegment() защищенный Метод

Adds a new segment. The segment type will be set to 'dimension' automatically if not already set.
protected addSegment ( Piwik\Plugin\Segment $segment )
$segment Piwik\Plugin\Segment

configureSegments() защищенный Метод

$segment = new Segment(); $segment->setSegment('exitPageUrl'); $segment->setName('Actions_ColumnExitPageURL'); $segment->setCategory('General_Visit'); $this->addSegment($segment);
protected configureSegments ( )

factory() публичный статический Метод

Creates a Dimension instance from a string ID (see {@link getId()}).
public static factory ( string $dimensionId ) : Dimension | null
$dimensionId string See {@link getId()}.
Результат Dimension | null The created instance or null if there is no Dimension for $dimensionId or if the plugin that contains the Dimension is not loaded.

getAllDimensions() публичный статический Метод

Gets an instance of all available visit, action and conversion dimension.
public static getAllDimensions ( ) : Dimension[]
Результат Dimension[]

getColumnName() публичный Метод

Get the name of the dimension column.
public getColumnName ( ) : string
Результат string

getDimensions() публичный статический Метод

public static getDimensions ( Plugin $plugin )
$plugin Piwik\Plugin

getId() публичный Метод

Returns a unique string ID for this dimension. The ID is built using the namespaced class name of the dimension, but is modified to be more human readable.
public getId ( ) : string
Результат string eg, `"Referrers.Keywords"`

getModule() публичный Метод

Returns the name of the plugin that contains this Dimension.
public getModule ( ) : string
Результат string

getName() публичный Метод

Get the translated name of the dimension. Defaults to an empty string.
public getName ( ) : string
Результат string

getSegments() публичный Метод

Get the list of configured segments.
public getSegments ( ) : Piwik\Plugin\Segment[]
Результат Piwik\Plugin\Segment[]

hasColumnType() публичный Метод

Check whether the dimension has a column type configured
public hasColumnType ( ) : boolean
Результат boolean

hasImplementedEvent() публичный Метод

Check whether a dimension has overwritten a specific method.
public hasImplementedEvent ( $method ) : boolean
$method
Результат boolean

Описание свойств

$columnName защищенное свойство

This will be the name of the column in the database table if a $columnType is specified.
protected string $columnName
Результат string

$columnType защищенное свойство

If a columnType is defined, we will create a column in the MySQL table having this type. Please make sure MySQL understands this type. Once you change the column type the Piwik platform will notify the user to perform an update which can sometimes take a long time so be careful when choosing the correct column type.
protected string $columnType
Результат string

$segments защищенное свойство

Holds an array of segment instances
protected Segment[],Piwik\Plugin $segments
Результат Piwik\Plugin\Segment[]