Merge pull request #42 from solgenomics/topic/duplicate_image_warning
[cxgn-corelibs.git] / lib / CXGN / Phylo / Configuration.pm
blob623512296616f75d46838c43ed18701e73cee164
1 package CXGN::Phylo::Configuration;
3 =head1 NAME
5 CXGN::Phylo::Configuration -- configuration information for the Phylo package
7 =head1 DESCRIPTION
9 The idea of this class is to abstract the SGN configuration so that this wonderful piece of software can be run independently of the SGN system.
11 People wishing to use the software have to fill in the function of the module with the appropriate values for their site.
13 =cut
15 use strict;
16 use warnings;
17 use SGN::Context;
19 sub new {
20 my $class = shift;
21 my $args = {};
22 my $self = bless $args, $class;
23 return $self;
26 =head2 function get_temp_dir()
28 Synopsis: $temp_file_dir = $configuration->get_temp_file_dir()
29 Arguments: none
30 Returns: the fully qualified path of the temp file directory
31 This needs to be writable by the Apache user (nobody, www-data,
32 or whatever it is).
33 Side effects: the temporary files created by tree browser will be stored
34 there. The directory will need to be cleaned from time to time
35 by something like a cron job.
36 Description:
38 =cut
40 sub get_temp_dir {
41 my $self = shift;
42 my $vhost = SGN::Context->new;
43 $self->{temp_dir} = $vhost->get_conf("basepath").$vhost->get_conf("tempfiles_subdir")."/tree_browser";