Yii Framework Forum: [EXTENSION] DbParam - Yii Framework Forum

Jump to content

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

[EXTENSION] DbParam Rate Topic: -----

#1 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 04 March 2009 - 03:59 AM

New extension to handle application params using the DB:

http://www.yiiframew...ension/dbparam/

Detailed post about it can be found in my blog: http://programmersno...g-the-database/
Post is updated according to the latest changes.
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 04 March 2009 - 07:08 AM

nice job!
0

#3 User is offline   sebas 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 496
  • Joined: 28-October 08
  • Location:Buenos Aires, Argentina

Posted 04 March 2009 - 08:58 AM

Really Nice !! :D

0

#4 User is offline   wei 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 147
  • Joined: 04-October 08

Posted 04 March 2009 - 05:55 PM

The __set and __get will be very slow since you are waiting for exceptions (exceptions are not appropriate in this case). A better approach is to extend CAttributeCollection and implement IApplicationComponent. You will then get those __set and __get et.al. features for free.

Cheers, Wei.
0

#5 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 04 March 2009 - 10:40 PM

Yes, I was thinking of that :) Will do.
0

#6 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 04 March 2009 - 11:54 PM

The drawback of this approach is that I was unable to define property by getter/setter method. However, it should work faster.
0

#7 User is offline   KJedi 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 381
  • Joined: 19-October 08
  • Location:Nikolaev, Ukraine (Europe)

Posted 05 March 2009 - 12:45 AM

I've updated everything, Jonah proposed more changes in the comments to my post, I'll implement them nearest time also.
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