class SiteRouter
{
public static function routeRequest($event)
{
$sender = &$event->sender;
//load site settings from database
$siteModel = Site::model()->findbyPk( <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />??? how to get $SITEID here <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />? );
The $SITEID is needed at the start to load the right params from database. How do I pass $SITEID to into the SiteRouter in onBeginRequest?
I’m looking for answers too. Did you solve the above?
I want to pass the timezone for my (multi site) application specified in main.php to a function that uses set_default_timezone() to set the correct timezone before each request using onBeginRequest event handler. I could probably use app()->params too but it would be more elegant to pass it directly to the event handler in this case.
It’s a bit strange that there is no default support for TimeZone configuration already. Perhaps in the next Yii version?