本文整理匯總了PHP中Piwik_Date::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Piwik_Date::get方法的具體用法?PHP Piwik_Date::get怎麽用?PHP Piwik_Date::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik_Date
的用法示例。
在下文中一共展示了Piwik_Date::get方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadArchiveProperties
/**
* Inits the object
*
* @return void
*/
protected function loadArchiveProperties()
{
$this->idsite = $this->site->getId();
$this->periodId = $this->period->getId();
$this->dateStart = $this->period->getDateStart();
$this->dateEnd = $this->period->getDateEnd();
$this->tableArchiveNumeric = new Piwik_TablePartitioning_Monthly('archive_numeric');
$this->tableArchiveNumeric->setIdSite($this->idsite);
$this->tableArchiveNumeric->setTimestamp($this->dateStart->get());
$this->tableArchiveBlob = new Piwik_TablePartitioning_Monthly('archive_blob');
$this->tableArchiveBlob->setIdSite($this->idsite);
$this->tableArchiveBlob->setTimestamp($this->dateStart->get());
$this->strDateStart = $this->dateStart->toString();
$this->strDateEnd = $this->dateEnd->toString();
// if the current archive is a DAY and if it's today,
// we set this maxTimestampArchive that defines the lifetime value of today's archive
$this->maxTimestampArchive = 0;
if ($this->period->getNumberOfSubperiods() == 0 && $this->period->toString() == date("Y-m-d")) {
$this->maxTimestampArchive = time() - Zend_Registry::get('config')->General->time_before_today_archive_considered_outdated;
} else {
if ($this->period->isFinished()) {
$this->maxTimestampArchive = $this->period->getDateEnd()->setTime('00:00:00')->addDay(1)->getTimestamp();
} else {
$this->maxTimestampArchive = Piwik_Date::today()->getTimestamp();
}
}
}
示例2: loadArchiveProperties
/**
* Inits the object
*/
protected function loadArchiveProperties()
{
$this->idsite = $this->site->getId();
$this->periodId = $this->period->getId();
$this->dateStart = $this->period->getDateStart();
$this->dateEnd = $this->period->getDateEnd();
$this->tableArchiveNumeric = new Piwik_TablePartitioning_Monthly('archive_numeric');
$this->tableArchiveNumeric->setIdSite($this->idsite);
$this->tableArchiveNumeric->setTimestamp($this->dateStart->get());
$this->tableArchiveBlob = new Piwik_TablePartitioning_Monthly('archive_blob');
$this->tableArchiveBlob->setIdSite($this->idsite);
$this->tableArchiveBlob->setTimestamp($this->dateStart->get());
$this->strDateStart = $this->dateStart->toString();
$this->strDateEnd = $this->dateEnd->toString();
// if the current archive is a DAY and if it's today,
// we set this maxTimestampArchive that defines the lifetime value of today's archive
$this->maxTimestampArchive = 0;
if ($this->period->getNumberOfSubperiods() == 0 && $this->period->toString() == date("Y-m-d")) {
$this->maxTimestampArchive = time() - Zend_Registry::get('config')->General->time_before_today_archive_considered_outdated;
$browserArchivingEnabled = Zend_Registry::get('config')->General->enable_browser_archiving_triggering;
// see #1150; if new archives are not triggered from the browser,
// we still want to try and return the latest archive available for today (rather than return nothing)
if (!$browserArchivingEnabled) {
$this->maxTimestampArchive = 0;
}
} else {
if ($this->period->isFinished()) {
$this->maxTimestampArchive = $this->period->getDateEnd()->setTime('00:00:00')->addDay(1)->getTimestamp();
} else {
$this->maxTimestampArchive = Piwik_Date::today()->getTimestamp();
}
}
$db = Zend_Registry::get('db');
$this->compressBlob = $db->hasBlobDataType();
}
示例3: loadArchiveProperties
/**
* Inits the object
*/
protected function loadArchiveProperties()
{
$this->idsite = $this->site->getId();
$this->periodId = $this->period->getId();
$this->dateStart = $this->period->getDateStart();
$this->dateEnd = $this->period->getDateEnd();
$this->tableArchiveNumeric = new Piwik_TablePartitioning_Monthly('archive_numeric');
$this->tableArchiveNumeric->setIdSite($this->idsite);
$this->tableArchiveNumeric->setTimestamp($this->dateStart->get());
$this->tableArchiveBlob = new Piwik_TablePartitioning_Monthly('archive_blob');
$this->tableArchiveBlob->setIdSite($this->idsite);
$this->tableArchiveBlob->setTimestamp($this->dateStart->get());
$this->strDateStart = $this->dateStart->toString();
$this->strDateEnd = $this->dateEnd->toString();
// if the current archive is a DAY and if it's today,
// we set this maxTimestampArchive that defines the lifetime value of today's archive
$this->maxTimestampArchive = 0;
if( $this->period->getNumberOfSubperiods() == 0
&& $this->period->toString() == date("Y-m-d")
)
{
$this->maxTimestampArchive = time() - Zend_Registry::get('config')->General->time_before_today_archive_considered_outdated;
}
// either
// - if the period we're looking for is finished, we look for a ts_archived that
// is greater than the last day of the archive
// - if the period we're looking for is not finished, we look for a recent enough archive
// recent enough means maxTimestampArchive = 00:00:01 this morning
else
{
if($this->period->isFinished())
{
$this->maxTimestampArchive = $this->period->getDateEnd()->setTime('00:00:00')->addDay(1)->getTimestamp();
}
else
{
$this->maxTimestampArchive = Piwik_Date::today()->getTimestamp();
}
}
$db = Zend_Registry::get('db');
$this->compressBlob = $db->hasBlobDataType();
}