<<

# Bugzilla::Classification

- NAME
- SYNOPSIS
- DESCRIPTION
- METHODS
- SUBROUTINES

# NAME

Bugzilla::Classification - Bugzilla classification class.

# SYNOPSIS

        use Bugzilla::Classification;

        my $classification = new Bugzilla::Classification(1);
        my $classification = new Bugzilla::Classification({name => 'Acme'});

        my $id = $classification->id;
        my $name = $classification->name;
        my $description = $classification->description;
        my $product_count = $classification->product_count;
        my $products = $classification->products;

        my $hash_ref = Bugzilla::Classification::get_all_classifications();
        my $classification = $hash_ref->{1};

        my $classification =
            Bugzilla::Classification::check_classification('AcmeClass');

# DESCRIPTION

Classification.pm represents a Classification object.

A Classification is a higher-level grouping of Products.

# METHODS

`new($param)`

       Description: The constructor is used to load an existing
                    classification by passing a classification
                    id or classification name using a hash.

       Params:      $param - If you pass an integer, the integer is the
                            classification_id from the database that we
                            want to read in. If you pass in a hash with
                            'name' key, then the value of the name key
                            is the name of a classification from the DB.

       Returns:     A Bugzilla::Classification object.

`product_count()`

       Description: Returns the total number of products that belong to
                    the classification.

       Params:      none.

       Returns:     Integer - The total of products inside the classification.

`products`

       Description: Returns all products of the classification.

       Params:      none.

       Returns:     A reference to an array of Bugzilla::Product objects.

# SUBROUTINES

`get_all_classifications()`

       Description: Returns all classifications.

       Params:      none.

       Returns:     Bugzilla::Classification object list.

`check_classification($classification_name)`

       Description: Checks if the classification name passed in is a
                    valid classification.

       Params:      $classification_name - String with a classification name.

       Returns:     Bugzilla::Classification object.

<<