Product::model PHP 메소드

model() 공개 정적인 메소드

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Product
$className string active record class name.
리턴 Product Static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

 public function loadModel($id)
 {
     if (($model = Product::model()->findByPk($id)) === null) {
         throw new CHttpException(404, 'Страница не найдена');
     }
     return $model;
 }
All Usage Examples Of Product::model