diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-06 10:42:29 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-06 10:42:29 +0100 |
commit | 72b67f1af5c4afac2205fe4bc08b02813d66050d (patch) | |
tree | 48f323889ec4b27c06901081c5412e6581705d7d /perllib/FixMyStreet/Cobrand.pm | |
parent | 4609689f44b4e0b1f95b7fdf096d3356241c271a (diff) |
Added overrides to staging servers to make testing/dev easier
Diffstat (limited to 'perllib/FixMyStreet/Cobrand.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand.pm b/perllib/FixMyStreet/Cobrand.pm index 91155db6e..6fe2a2bc8 100644 --- a/perllib/FixMyStreet/Cobrand.pm +++ b/perllib/FixMyStreet/Cobrand.pm @@ -68,4 +68,24 @@ sub get_class_for_host { return 'FixMyStreet::Cobrand::Default'; } +=head2 get_class_for_moniker + + $cobrand_class = FixMyStreet::Cobrand->get_class_for_moniker( $moniker ); + +Given a moniker determine which cobrand we should be using. + +=cut + +sub get_class_for_moniker { + my $class = shift; + my $moniker = shift; + + foreach my $avail ( $class->available_cobrand_classes ) { + return $avail if $moniker eq $avail->moniker; + } + + # if none match then use the default + return 'FixMyStreet::Cobrand::Default'; +} + 1; |