public function getTheme($name)
 {
     $controller = Yii::app()->controller;
     if ($controller !== null) {
         foreach ($this->rules as $rule => $theme) {
             if (!is_array($theme)) {
                 $themeName = $theme;
             } else {
                 $themeName = $theme['name'];
                 if (isset($theme['basePath'])) {
                     $this->setBasePath(Yii::getPathOfAlias($theme['basePath']));
                 }
             }
             if (preg_match("|" . $rule . "|", $controller->route)) {
                 Yii::trace('components.multi-theme.EMultiThemeManager', 'Rule "' . $rule . '" matched, switching to theme "' . $themeName . '"');
                 $name = $themeName;
                 break;
             }
         }
     }
     return parent::getTheme($name);
 }
 public function init()
 {
     return parent::init();
 }