Client::model PHP Method

model() static public method

static public model ( null | string $className = __CLASS__ ) : User | static
$className null | string
return User | static
    static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

 /**
  * @param $id
  * @throws CHttpException
  */
 public function actionView($id)
 {
     $model = Client::model()->findByPk($id);
     if (null === $model) {
         throw new CHttpException(404);
     }
     $this->render('view', ['model' => $model, 'order' => new Order(), 'orders' => $model->getOrders()]);
 }
All Usage Examples Of Client::model