Jump to content
Larry Ullman's Book Forums

rthriller

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by rthriller

  1. Hello,

     

    Reading chapter 7 (page 136), I understand what static instance (and method) are but what I didn't understand is : Why is the findByPK a non-static method.

     

    If findByPK was static then simply we get :

    $model = Page::findByPk();

    I know findByPK was generated by gii, my question is not 100% related to this book content but to yii philosophy and design.

     

    Thanks.

×
×
  • Create New...