예제 #1
0
 public function getModel()
 {
     if (!$this->model) {
         $model = $_GET['target_type'] . 'Rate';
         unset($_GET['target_type']);
         try {
             $this->model = new $model();
         } catch (Exception $e) {
             throw new Exception('You should provide existing rateable entity name in "target_type" request attribute', null, $e);
         }
     }
     return parent::getModel();
 }