Using Yii inside assets dir

Is there a way to make sure that Yii app starts before any asset is loaded?

I would like to use Yii inside my image/file browser extension, but cant because of assets loading before Yii.

Now I get a Fatal error: Class ‘Yii’ not found in …

I actually only need to set a few vars in my extension config files, and I can send those vars in session, but using framework functionality there would be much better idea and really handy

pd

Which files would that be? Usually asset files are only referenced from HTML pages that where generated with Yii. So they are always present at the time the browser fetches the assets.

Can you give a little more detail what you try to do?

Im trying to dynamically setup my image/file browser for tinymce which have separate config file in assets directory and in this config file im trying to use Yii base class with no success…

Actually this a popup window with url referencing to some file eg. conn.php in my assets dir which includes my config file, and i think that’s the problem, because it’s not Yii calling my conn.php :)

You can include yii.php in that file and also call Yii::createWebApplication($config); if you e.g. need access to ActiveRecords.