update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
32
www/analytics/core/Measurable/Measurable.php
Normal file
32
www/analytics/core/Measurable/Measurable.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Piwik\Measurable;
|
||||
|
||||
use Exception;
|
||||
use Piwik\Site;
|
||||
|
||||
/**
|
||||
* Provides access to individual measurables.
|
||||
*/
|
||||
class Measurable extends Site
|
||||
{
|
||||
|
||||
public function getSettingValue($name)
|
||||
{
|
||||
$settings = new MeasurableSettings($this->id, $this->getType());
|
||||
$setting = $settings->getSetting($name);
|
||||
|
||||
if (!empty($setting)) {
|
||||
return $setting->getValue(); // Calling `getValue` makes sure we respect read permission of this setting
|
||||
}
|
||||
|
||||
throw new Exception(sprintf('Setting %s does not exist', $name));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue