Exemplo n.º 1
0
 function set($key, $value = null)
 {
     if ($key == 'status') {
         if (!is_numeric($value)) {
             $db = oseDB::instance();
             $query = "  SELECT * FROm `#__osemsc_member_status`" . " WHERE `name` = '{$value}'";
             $db->setQuery($query);
             $item = oseDB::loadItem('obj');
             parent::set($key, $item->id);
         } else {
             parent::set($key, $value);
         }
     } else {
         parent::set($key, $value);
     }
 }