Example #1
0
 function __construct($inargs)
 {
     $defaults = array('group' => 'posts', 'subgroup' => 'worst');
     parent::__construct();
     $args = array_merge($defaults, $inargs);
     $this->badge_group = $args['group'];
     // set some vars
     $action = 'action_' . $this->badge_group;
     if (in_array($action, get_class_methods($this))) {
         $this->gotbadge = $this->{$action}();
     }
     // test the return value.
     return;
 }