Add class to all meta boxes for a custom post type

After doing some playing around, I discovered this can actually be accomplished by defining the name of the hook I want to add the filter to via a variable.

So if my $post_type_name is portfolio and my $box_id is piece_info, I can make a filter as follows:

function add_meta_box_class( $classes ) {
   array_push( $classes, 'custom-class');
   return $classes;
}
$filter_name="postbox_classes_" . $post_type_name . '_' . $box_id;
add_filter( $filter_name , 'add_meta_box_class' );

This will result in a filter being created using the postbox_classes_{$page}_{$id} hook as postbox_classes_portfolio_piece_info.