Yii Framework Forum: Extension Loading - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Extension Loading Rate Topic: -----

#1 User is offline   afshin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 10-April 12

Posted 13 April 2012 - 04:40 AM

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 ?
0

#2 User is offline   rookie84 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 114
  • Joined: 16-November 11

Posted 14 April 2012 - 12:59 AM

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()
0

#3 User is offline   afshin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 10-April 12

Posted 14 April 2012 - 04:26 AM

View Postrookie84, on 14 April 2012 - 12:59 AM, said:

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'
	     ),

0

#4 User is offline   rookie84 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 114
  • Joined: 16-November 11

Posted 23 April 2012 - 08:04 PM

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)



View Postafshin, on 14 April 2012 - 04:26 AM, said:

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'
	     ),


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users