CommentController::loadModel PHP Method

loadModel() public method

If the data model is not found, an HTTP exception will be raised.
public loadModel ( )
    public function loadModel()
    {
        if ($this->_model === null) {
            if (isset($_GET['id'])) {
                $this->_model = Comment::model()->findbyPk($_GET['id']);
            }
            if ($this->_model === null) {
                throw new CHttpException(404, 'The requested page does not exist.');
            }
        }
        return $this->_model;
    }

Same methods

CommentController::loadModel ( $id )