Piwik\DataTable\Filter\ReplaceColumnNames::__construct PHP Метод

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

Constructor.
public __construct ( DataTable $table, array | null $mappingToApply = null )
$table Piwik\DataTable The table that will be eventually filtered.
$mappingToApply array | null The name mapping to apply. Must map old column names with new ones, eg, array('OLD_COLUMN_NAME' => 'NEW_COLUMN NAME', 'OLD_COLUMN_NAME2' => 'NEW_COLUMN NAME2') If null, {@link Piwik\Metrics::$mappingFromIdToName} is used.
    public function __construct($table, $mappingToApply = null)
    {
        parent::__construct($table);
        $this->mappingToApply = Metrics::$mappingFromIdToName;
        if (!is_null($mappingToApply)) {
            $this->mappingToApply = $mappingToApply;
        }
    }