Yii Framework Forum: модель для extentions - Yii Framework Forum

Jump to content

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

модель для extentions Rate Topic: -----

#1 User is offline   3ton 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 30-June 09

Posted 05 October 2009 - 02:51 AM

создаю расширение которому для работы нужна модель, но не хочу раскидывать их в разных местах

могу ли я разместить в папке extentions/my_ext/models модели для моего расширения и как их подключить???
0

#2 User is offline   Albert 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-September 09

Posted 05 October 2009 - 03:22 AM

Yii::import('application.extentions.my_ext.models.*');
:huh:
1

#3 User is offline   3ton 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 30-June 09

Posted 05 October 2009 - 03:33 AM

вот спасибо!

ан нет... не завелось... :(

ругается

Internal Server Error
include(my_ext.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.
0

#4 User is offline   Albert 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-September 09

Posted 05 October 2009 - 04:04 AM

очепятка :)
extensions с буквой "s"
0

#5 User is offline   3ton 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 24
  • Joined: 30-June 09

Posted 05 October 2009 - 04:31 AM

все одно не пошло

пошло когда указал точно

Yii::import('application.extensions.my_ext.models.my_model');
0

#6 User is offline   Albert 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 09-September 09

Posted 05 October 2009 - 05:36 AM

http://www.yiiframew...asics.namespace
http://www.yiiframew...e#import-detail
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