summaryrefslogtreecommitdiffstats
path: root/pts-core/objects
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-12 13:01:01 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-13 10:34:16 -0500
commit7cd5c521d2367592238880e665095f583e07fdcd (patch)
treea5db37806a05c409aa3f714c5b6500c5d75200df /pts-core/objects
parent3746233562db9323733ba92cc20d51497acce3db (diff)
downloadphoronix-test-suite-upstream-7cd5c521d2367592238880e665095f583e07fdcd.tar.gz
phoronix-test-suite-upstream-7cd5c521d2367592238880e665095f583e07fdcd.tar.xz
phoronix-test-suite-upstream-7cd5c521d2367592238880e665095f583e07fdcd.zip
pts-core: Add more module information to pts_user_module_details class
Diffstat (limited to 'pts-core/objects')
-rw-r--r--pts-core/objects/pts-generic-classes.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/pts-core/objects/pts-generic-classes.php b/pts-core/objects/pts-generic-classes.php
index 295e0ff..966aefb 100644
--- a/pts-core/objects/pts-generic-classes.php
+++ b/pts-core/objects/pts-generic-classes.php
@@ -154,13 +154,15 @@ class pts_user_module_details
var $module;
var $version;
var $author;
+ var $description;
+ var $information;
public function __construct($module_file_path)
{
$module = basename(substr($module_file_path, 0, strrpos($module_file_path, ".")));
$this->module = $module;
- if(!in_array($module, pts_attached_modules()) && substr($module_file_path, -3) == "php")
+ if(!class_exists($module) && substr($module_file_path, -3) == "php")
{
include_once($module_file_path);
}
@@ -168,6 +170,30 @@ class pts_user_module_details
$this->name = pts_module_call($module, "module_name");
$this->version = pts_module_call($module, "module_version");
$this->author = pts_module_call($module, "module_author");
+ $this->description = pts_module_call($module, "module_description");
+ $this->information = pts_module_call($module, "module_info");
+ }
+ public function info_string()
+ {
+ $str = "";
+
+ $str .= pts_string_header("Module: " . $this->name);
+
+ if(in_array($this->module, pts_attached_modules()))
+ {
+ $str .= "** This module is currently loaded. **\n";
+ }
+
+ $str .= "Version: " . $this->version . "\n";
+ $str .= "Author: " . $this->author . "\n";
+ $str .= "Description: " . $this->description . "\n";
+
+ if(!empty($this->information))
+ {
+ $str .= "\n" . $this->information . "\n";
+ }
+
+ return $str;
}
public function __toString()
{