当前位置: 首页>>代码示例>>PHP>>正文


PHP DataTable::getRowsMetadata方法代码示例

本文整理汇总了PHP中Piwik\DataTable::getRowsMetadata方法的典型用法代码示例。如果您正苦于以下问题:PHP DataTable::getRowsMetadata方法的具体用法?PHP DataTable::getRowsMetadata怎么用?PHP DataTable::getRowsMetadata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\DataTable的用法示例。


在下文中一共展示了DataTable::getRowsMetadata方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_filter_shouldUrlEncodeValues

 public function test_filter_shouldUrlEncodeValues()
 {
     $mapping = array(1 => 'Core tests', 3 => 'plugins tästs');
     $this->table->filter($this->filter, array('segmentName', $mapping));
     $metadata = $this->table->getRowsMetadata('segment');
     $expected = array('segmentName==Core+tests', false, 'segmentName==plugins+t%C3%A4sts', false, false, false);
     $this->assertSame($expected, $metadata);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:8,代码来源:AddSegmentFilterByLabelMappingTest.php

示例2: array

 public function test_filter_IfMultipleSegmentsAreGiven_IfShouldBePossibleToIgnorePartsByUsingAnEmptyStringAsSegmentName()
 {
     // must result in 3 exploded parts city, region and country
     $this->table->filter($this->filter, array(array('city', '', 'country'), $delimiter = ' '));
     $segmentValues = $this->table->getRowsMetadata('segment');
     $expected = array(false, false, false, false, false, 'city==play;country==movie', false, false);
     $this->assertSame($expected, $segmentValues);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:8,代码来源:AddSegmentFilterTest.php

示例3: test_filter_shouldRemoveAllMetadataEntriesHavingTheGivenName_EvenIfOnlySomeRowsHaveThatMetadataName

 public function test_filter_shouldRemoveAllMetadataEntriesHavingTheGivenName_EvenIfOnlySomeRowsHaveThatMetadataName()
 {
     $this->table->filter($this->filter, array('other'));
     $metadata = $this->table->getRowsMetadata('other');
     $this->assertSame(array(false, false, false, false, false), $metadata);
     $metadata = $this->table->getRowsMetadata('test');
     $expected = array('1', '2', '3', '1', '4');
     $this->assertSame($expected, $metadata);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:9,代码来源:ColumnCallbackDeleteMetadataTest.php

示例4: test_filter_shouldOnlyPrependIfAMetadataNameIsSet

 public function test_filter_shouldOnlyPrependIfAMetadataNameIsSet()
 {
     $this->table->filter($this->filter, array('other', 'prependme'));
     $metadata = $this->table->getRowsMetadata('other');
     $this->assertSame(array(false, 'prependmevalue', false, 'prependmevalue', 'prependme'), $metadata);
     // should still be the same
     $metadata = $this->table->getRowsMetadata('test');
     $this->assertSame(array('1', '2', '3', '1', '4'), $metadata);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:9,代码来源:PrependValueToMetadataTest.php

示例5: test_filter_shouldRemoveAllMetadataEntriesHavingTheGivenName

 public function test_filter_shouldRemoveAllMetadataEntriesHavingTheGivenName()
 {
     $prepend = 'city=test;';
     $this->table->filter($this->filter, array($prepend));
     $metadata = $this->table->getRowsMetadata('segment');
     $this->assertSame(array(false, $prepend . 'country=NZ', false, $prepend . 'country=AU', $prepend), $metadata);
     // should be still the same
     $metadata = $this->table->getRowsMetadata('test');
     $this->assertSame(array('1', '2', '3', '1', '4'), $metadata);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:10,代码来源:PrependSegmentFilterTest.php

示例6: test_filter_shouldNotGenerateASegmentValueIfReturnValueIsFalse

 public function test_filter_shouldNotGenerateASegmentValueIfReturnValueIsFalse()
 {
     $this->table->filter($this->filter, array(function ($label) {
         if ($label === false) {
             return 'was false';
         }
         return false;
     }));
     $segmentValues = $this->table->getRowsMetadata('segmentValue');
     $expected = array(false, false, false, false, 'was false', false, 'was false', false);
     $this->assertSame($expected, $segmentValues);
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:12,代码来源:AddSegmentValueTest.php

示例7: test_filter

 public function test_filter()
 {
     $dataTable = new DataTable();
     $dataTable->addRowsFromArray(array(array(Row::COLUMNS => array('label' => 'val1', 'nb_visits' => 120)), array(Row::COLUMNS => array('nb_visits' => 90)), array(Row::COLUMNS => array('label' => 'val2 5w ö?', 'nb_visits' => 99)), array(Row::COLUMNS => array('label' => Archiver::LABEL_CUSTOM_VALUE_NOT_DEFINED, 'nb_visits' => 99))));
     $dataTable->filter($this->filter, array($idDimension = 5));
     $metadata = $dataTable->getRowsMetadata('segment');
     $expected = array('dimension5==val1', false, 'dimension5==val2+5w+%C3%B6%3F', 'dimension5==');
     $this->assertSame($expected, $metadata);
 }
开发者ID:ep123,项目名称:plugin-CustomDimensions,代码行数:9,代码来源:AddSegmentMetadataTest.php

示例8: assertSegmentValues

 private function assertSegmentValues($expectedSegmentValues)
 {
     $segmentValues = $this->table->getRowsMetadata('segmentValue');
     $this->assertSame($expectedSegmentValues, $segmentValues);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:5,代码来源:AddSegmentByLabelInUTCTest.php


注:本文中的Piwik\DataTable::getRowsMetadata方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。