user_type_id; } else { $user_type_id = $params; } $type_id = explode('_', $user_type_id); if (count($type_id) == 2) { return $type_id[0] + 0; } else { return 0; } } public function get_id($params) { if (is_array($params)) { $user_type_id = $params['user_type_id']; } elseif (is_object($params)) { $user_type_id = $params->user_type_id; } else { $user_type_id = $params; } $type_id = explode('_', $user_type_id); if (count($type_id) == 2) { return $type_id[1] + 0; } else { return 0; } } } // end of class