gecko-dev/webtools/addons/lib/amo.class.php
mike.morgan%oregonstate.edu eaec74e2ae addon.php
added title, filled out passing of proper vars.
faq.php
    fixed title.
overview.php
    fixed title.
content.css
    added some styles for user opinions.
developers/index.php
    fixed title.
lib/addon.class.php
    added class vars and some extra stuff in constructor in order to populate all addon information during object instantiation.
lib/amo.class.php
    added setVar and setVars functions, which set object parameters one at a time or via array, respectively.
tpl/addon.tpl
    fleshed out addon summary page to look mostly like existing pages.
tpl/inc/header.tpl
    added line for page title.
2005-07-20 23:32:22 +00:00

54 lines
1.0 KiB
PHP

<?php
/**
* AMO master class. This class contains global application logic.
*/
class AMO_Object
{
var $wrapper;
function AMO_Object()
{
// Our DB and Smarty objects are global to save cycles.
global $db, $tpl;
// Pass by reference in order to save memory.
$this->db =& $db;
$this->tpl =& $tpl;
}
/**
* Set var.
*
* @param string $key name of object property to set
* @param mixed $val value to assign
*
* @return bool
*/
function setVar($key,$val)
{
$this->$key = $val;
return true;
}
/**
* Set an array of variables based on a $db record.
*
* @param array $data associative array of data.
*
* @return bool
*/
function setVars($data)
{
if (is_array($data)) {
foreach ($data as $key=>$val) {
$this->setVar($key,$val);
}
return true;
} else {
return false;
}
}
}
?>