本文整理匯總了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;
}