Yii Framework Forum: One More Parameter In The Model() Static Method - Yii Framework Forum

Jump to content

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

One More Parameter In The Model() Static Method

#1 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 756
  • Joined: 02-February 09

Posted 15 February 2013 - 05:28 AM

Do you believe it would be a convenience to have another parameter in the model static method ( model() ) by which to be able to declare a scenario such as :

MyModel::model('create')->update();

0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,165
  • Joined: 17-January 09
  • Location:Russia

Posted 15 February 2013 - 03:00 PM

Usually update/insert is done for new objects or objects got from database so it makes little difference in this case.
Yii 2.0 Development Cookbook

Enjoying Yii? Star us at github

Support me so I work on Yii fulltime: https://www.patreon.com/samdark
0

#3 User is offline   Jaggi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 90
  • Joined: 05-September 11

Posted 19 February 2013 - 04:11 AM

Also the model static method is being dropped in yii 2.0 as I recall.
See my development site @ www.CodeTheInter.net (BETA)

Posted Image Posted Image

Quote

If you make it idiot proof, they'll build a better idiot
0

#4 User is offline   bettor 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 756
  • Joined: 02-February 09

Posted 20 February 2013 - 09:25 AM

View PostJaggi, on 19 February 2013 - 04:11 AM, said:

Also the model static method is being dropped in yii 2.0 as I recall.


Correct. I just read it a couple of days ago so please disregard
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