refactoring.

This commit is contained in:
Taylor Otwell
2011-08-23 21:04:40 -05:00
parent 1a7fd6d360
commit df84e36314
34 changed files with 799 additions and 349 deletions

View File

@@ -61,14 +61,18 @@ class Module {
{
if (array_key_exists($module, static::$paths)) return static::$paths[$module];
if (in_array($module, static::$modules))
if (array_key_exists($module, static::$modules))
{
return (static::$modules[$module] == DEFAULT_MODULE_PATH) ? static::$modules[$module] : MODULE_PATH.static::$modules[$module].'/';
}
elseif (in_array($module, static::$modules))
{
return static::$paths[$module] = MODULE_PATH.$module.'/';
}
}
/**
* Get the an array of paths to all of the modules.
* Get an array of paths to all of the modules.
*
* @return array
*/