<?php

class UcImageScalerEventListener
{
  static public function listenToRoutingLoadConfigurationEvent(sfEvent $event)
  {
    $r = $event->getSubject();
    if( !$r -> hasRouteName( 'UcImageScalerCachedImageUrl') )
    {
      $r->prependRoute('UcImageScalerCachedImageUrl',
      new sfRoute('/dynimage/:mw/:mh/:fid/*',
      array('module' => 'UcImageScaler', 'action' => 'ImageDisplay')
      ));
    }
  }
}