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
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -11,7 +11,7 @@ namespace Piwik;
|
|||
|
||||
/**
|
||||
* The singleton base class restricts the instantiation of derived classes to one object only.
|
||||
*
|
||||
*
|
||||
* All plugin APIs are singletons and thus extend this class.
|
||||
*
|
||||
* @api
|
||||
|
|
@ -20,17 +20,22 @@ class Singleton
|
|||
{
|
||||
protected static $instances;
|
||||
|
||||
protected function __construct() { }
|
||||
protected function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
final private function __clone() { }
|
||||
final private function __clone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the singleton instance for the derived class. If the singleton instance
|
||||
* has not been created, this method will create it.
|
||||
*
|
||||
* @return Singleton
|
||||
* @return static
|
||||
*/
|
||||
public static function getInstance() {
|
||||
public static function getInstance()
|
||||
{
|
||||
$class = get_called_class();
|
||||
|
||||
if (!isset(self::$instances[$class])) {
|
||||
|
|
@ -58,4 +63,12 @@ class Singleton
|
|||
$class = get_called_class();
|
||||
self::$instances[$class] = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
public static function clearAll()
|
||||
{
|
||||
self::$instances = array();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue