Pommo_Groups::__construct PHP Method

__construct() public method

============ NON STATIC METHODS ===================
public __construct ( $groupID = NULL, $status = 1, $filter = FALSE )
    function __construct($groupID = NULL, $status = 1, $filter = FALSE)
    {
        $this->_status = $status;
        if (!is_numeric($groupID)) {
            // exception if no group ID was passed -- group assumes "all subscribers".
            require_once Pommo::$_baseDir . 'classes/Pommo_Subscribers.php';
            $this->_group = array('rules' => array(), 'id' => 0);
            $this->_id = 0;
            $this->_name = Pommo::_T('All Subscribers');
            $this->_memberIDs = is_array($filter) ? Pommo_Groups::getMemberIDs($this->_group, $status, $filter) : null;
            $this->_tally = is_array($filter) ? count($this->_memberIDs) : Pommo_Subscribers::tally($status);
            return;
        }
        $this->_group = current(Pommo_Groups::get(array('id' => $groupID)));
        $this->_id = $groupID;
        $this->_name =& $this->_group['name'];
        $this->_memberIDs = Pommo_Groups::getMemberIDs($this->_group, $status, $filter);
        $this->_tally = count($this->_memberIDs);
        return;
    }