本文整理汇总了PHP中Piwik\Date::getDatetimeFromTimestamp方法的典型用法代码示例。如果您正苦于以下问题:PHP Date::getDatetimeFromTimestamp方法的具体用法?PHP Date::getDatetimeFromTimestamp怎么用?PHP Date::getDatetimeFromTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Date
的用法示例。
在下文中一共展示了Date::getDatetimeFromTimestamp方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onNewVisit
/**
* @param Request $request
* @param Visitor $visitor
* @param Action|null $action
* @return mixed
*/
public function onNewVisit(Request $request, Visitor $visitor, $action)
{
return Date::getDatetimeFromTimestamp($request->getCurrentTimestamp());
}
示例2: getGoalFromVisitor
private function getGoalFromVisitor(Visitor $visitor, $visitorInformation, $action)
{
$goal = array('idvisit' => $visitorInformation['idvisit'], 'idvisitor' => $visitorInformation['idvisitor'], 'server_time' => Date::getDatetimeFromTimestamp($visitorInformation['visit_last_action_time']));
$visitDimensions = VisitDimension::getAllDimensions();
foreach ($visitDimensions as $dimension) {
$value = $dimension->onAnyGoalConversion($this->request, $visitor, $action);
if (false !== $value) {
$goal[$dimension->getColumnName()] = $value;
}
}
return $goal;
}
示例3: getGoalFromVisitor
private function getGoalFromVisitor(VisitProperties $visitProperties, Request $request, $action)
{
$goal = array('idvisit' => $visitProperties->getProperty('idvisit'), 'idvisitor' => $visitProperties->getProperty('idvisitor'), 'server_time' => Date::getDatetimeFromTimestamp($visitProperties->getProperty('visit_last_action_time')));
$visitDimensions = VisitDimension::getAllDimensions();
$visit = Visitor::makeFromVisitProperties($visitProperties, $request);
foreach ($visitDimensions as $dimension) {
$value = $dimension->onAnyGoalConversion($request, $visit, $action);
if (false !== $value) {
$goal[$dimension->getColumnName()] = $value;
}
}
return $goal;
}
示例4: getDatetimeFromTimestamp
/**
* @deprecated since 2.10.0 use {@link Date::getDatetimeFromTimestamp()} instead
*/
public static function getDatetimeFromTimestamp($timestamp)
{
return Date::getDatetimeFromTimestamp($timestamp);
}
示例5: onNewAction
public function onNewAction(Request $request, Visitor $visitor, Action $action)
{
$timestamp = $request->getCurrentTimestamp();
return Date::getDatetimeFromTimestamp($timestamp);
}