本文整理汇总了PHP中Piwik::getCurrency方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::getCurrency方法的具体用法?PHP Piwik::getCurrency怎么用?PHP Piwik::getCurrency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik
的用法示例。
在下文中一共展示了Piwik::getCurrency方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: guessUnitFromRequestedColumnNames
protected function guessUnitFromRequestedColumnNames($requestedColumnNames)
{
$nameToUnit = array('_rate' => '%', '_revenue' => Piwik::getCurrency());
foreach ($requestedColumnNames as $columnName) {
foreach ($nameToUnit as $pattern => $type) {
if (strpos($columnName, $pattern) !== false) {
return $type;
}
}
}
return false;
}
示例2: addNewGoal
function addNewGoal()
{
$view = Piwik_View::factory('add_new_goal');
$view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
$view->currency = Piwik::getCurrency();
$view->onlyShowAddNewGoal = true;
echo $view->render();
}
示例3: getUnit
/**
* Derive the unit name from a column name
* @param $column
* @param $idSite
* @return string
* @ignore
*/
public static function getUnit($column, $idSite)
{
$nameToUnit = array('_rate' => '%', 'revenue' => Piwik::getCurrency($idSite), '_time_' => 's');
foreach ($nameToUnit as $pattern => $type) {
if (strpos($column, $pattern) !== false) {
return $type;
}
}
return '';
}
示例4: addNewGoal
function addNewGoal()
{
$view = new Piwik_View('Goals/templates/add_new_goal.tpl');
$view->userCanEditGoals = Piwik::isUserHasAdminAccess($this->idSite);
$view->currency = Piwik::getCurrency();
$view->onlyShowAddNewGoal = true;
echo $view->render();
}
示例5: guessUnitFromRequestedColumnNames
protected function guessUnitFromRequestedColumnNames($requestedColumnNames, $idSite)
{
$nameToUnit = array('_rate' => '%', 'revenue' => Piwik::getCurrency($idSite), '_time_' => 's');
$units = array();
foreach ($requestedColumnNames as $columnName) {
$units[$columnName] = false;
foreach ($nameToUnit as $pattern => $type) {
if (strpos($columnName, $pattern) !== false) {
$units[$columnName] = $type;
break;
}
}
}
return $units;
}