public function findModel($id)
    {
        if($this->_model === null) 
        {
            if($this->_model = $id ? Author::findOne($id) : null) 
            {
                return $this->_model;
            } else {
                throw new NotFoundHttpException(Module::t('core', 'The requested model does not exist.'));
            }
        }
    }
public function findModel($id)
    {
        if($this->_model === null) 
        {
            if($this->_model = $id ? Author::findOne($id) : null) 
            {
                return $this->_model;
            } else {
                throw new NotFoundHttpException(Module::t('core', 'The requested model does not exist.'));
            }
        }
    }
public function findModel ( $ id ) { if ( $ this -> _model === null ) { if ( $ this -> _model = $ id ? Author :: findOne ( $ id ) : null ) { return $ this -> _model ; } else { throw new NotFoundHttpException ( Module :: t ( 'core' , 'The requested model does not exist.' ) ) ; } } }
Finds the User model based on its primary key value or by name.
If the model is not found, a 404 HTTP exception will be thrown.
@param integer $id
@param string $name
@return User the loaded model
@throws NotFoundHttpException if the model cannot be found
Finds the User model based on its primary key value or by name . If the model is not found a 404 HTTP exception will be thrown .