CUrlRule dynamic routes

A bit like custom classes for rules but using the default functionality of CUrlRule which can call a method to generate a dynamic route.




  ..

    'rules' => array(

      'my url rule here' => array(

        'class' => 'application.components.myroutegenerator'

      )

    )

  ..






  class myroutegenerator extends <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />

  {

    public function route()

    {

      return route created from db queries etc.

    }

  }



Read documentation about CUrlManager (CUrlManager)