Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobocoder <anthon.pang@gmail.com>2009-08-22 17:23:16 +0400
committerrobocoder <anthon.pang@gmail.com>2009-08-22 17:23:16 +0400
commit20cac9adab214fe1e8e8a37f0cf81ec28c7968fa (patch)
tree436d3d9c8546deb59b8f307dd5b20cd1a60d407f /core/Loader.php
parent6eb358f25786a76f3dfcd52f40304a515cf98411 (diff)
phpdoc cleanup:
* add @category (Piwik => 'core', Piwik_Plugins => 'plugins') * in core, use @package and @subpackage more consistently to group files/classes; exception is DataFiles/*, PluginsFunctions/*, and SmartyPlugins/* * in plugins, @package is the plugin name * removed '@param none' -- not a phpdoc convention * '@throws' and '@return void' are also not phpdoc conventions, but are widely used elsewhere, e.g., Smarty & Zend git-svn-id: http://dev.piwik.org/svn/trunk@1420 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Loader.php')
-rw-r--r--core/Loader.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/core/Loader.php b/core/Loader.php
index 8df94541d3..e88c1db1af 100644
--- a/core/Loader.php
+++ b/core/Loader.php
@@ -6,15 +6,27 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
* @version $Id$
*
+ * @category Piwik
* @package Piwik
*/
+/**
+ * Piwik auto loader
+ *
+ * @package Piwik
+ */
class Piwik_Loader
{
// our class search path; current directory is intentionally excluded
protected static $dirs = array( '/core/', '/libs/', '/plugins/' );
- protected static function getClassPath($class)
+ /**
+ * Get class file name
+ *
+ * @param string $class Class name
+ * @return string Class file name
+ */
+ protected static function getClassFileName($class)
{
$class = str_replace('_', '/', $class);
@@ -31,9 +43,15 @@ class Piwik_Loader
return $class;
}
+ /**
+ * Load class by name
+ *
+ * @param string $class Class name
+ * @throws exception if class cannot be loaded
+ */
public static function autoload($class)
{
- $classPath = self::getClassPath($class);
+ $classPath = self::getClassFileName($class);
while(!empty($classPath))
{
// auto-discover class location