hi
i have a question about loading extension !
if i define a extension in app config, this extension will be load when application run or will be include when i use it ?
hi
i have a question about loading extension !
if i define a extension in app config, this extension will be load when application run or will be include when i use it ?
It depends on the kind of extension you’ve made/using. If it is an Application Component (CApplicationComponent) then you can definitely preload it or lazy load it: Yii::app()->foo->bar()
i using Mailer extension that i downloaded from extensions directory
and i configure it in app file config :
'mailer' => array(
'class' => 'ext.mailer.EMailer',
'pathViews' => 'application.views.email',
'pathLayouts' => 'application.views.email.layouts'
),
If you did write the code below in config/main.php then you can use this extension as:
Yii::app()->mailer->(whatever functions are supported)