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


PHP ArchiveTableCreator::getTableMonthFromDate方法代码示例

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


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

示例1: getLastNTableMonths

 /**
  * @param int $lastN
  * @return string[]
  */
 private function getLastNTableMonths($lastN)
 {
     $now = Date::factory('now');
     $result = array();
     for ($i = 0; $i < $lastN; ++$i) {
         $date = $now->subMonth($i + 1);
         $result[] = ArchiveTableCreator::getTableMonthFromDate($date);
     }
     return $result;
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:14,代码来源:OptimizeArchiveTables.php

示例2: getDatesByYearMonthAndPeriodType

 /**
  * Called when deleting all periods.
  *
  * @param Date[] $dates
  * @return string[][][]
  */
 private function getDatesByYearMonthAndPeriodType($dates)
 {
     $result = array();
     foreach ($dates as $date) {
         $yearMonth = ArchiveTableCreator::getTableMonthFromDate($date);
         $result[$yearMonth][null][] = $date->toString();
         // since we're removing all periods, we must make sure to remove year periods as well.
         // this means we have to make sure the january table is processed.
         $janYearMonth = $date->toString('Y') . '_01';
         $result[$janYearMonth][null][] = $date->toString();
     }
     return $result;
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:19,代码来源:ArchiveInvalidator.php


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