diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-21 02:15:25 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-21 07:26:00 +0400 |
commit | eab2bacda2658a28597b1b9f489da17afc1554e1 (patch) | |
tree | 212424a3e723f08194269e8e11385521d5988d32 /core/Singleton.php | |
parent | 085b26c714c2a6d2d39de36b3c211f996dd6371a (diff) |
Refs #4200, documented core/Singleton.php and core/Site.php and set method visibility for Site.
Diffstat (limited to 'core/Singleton.php')
-rw-r--r-- | core/Singleton.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Singleton.php b/core/Singleton.php index d6562a3ce9..649c3e7e37 100644 --- a/core/Singleton.php +++ b/core/Singleton.php @@ -12,9 +12,12 @@ namespace Piwik; /** - * The singleton class restricts the Instantiation of a class to one object only. + * The singleton class restricts the instantiation of a class to one object only. + * + * All plugin APIs are singletons and thus extend this class. * * @package Piwik + * @api */ class Singleton { @@ -24,6 +27,12 @@ class Singleton 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 + */ public static function getInstance() { $class = get_called_class(); |