ReportController::loadReport PHP 메소드

loadReport() 개인적인 메소드

private loadReport ( ) : ReportInterface
리턴 ReportInterface
    private function loadReport()
    {
        $report = Yii::app()->request->getParam('report') . 'Report';
        //Load the modules for when a report is defined there.
        foreach (Yii::app()->modules as $module => $moduleData) {
            if (strpos($module, 'Oph') === 0) {
                Yii::app()->getModule($module);
            }
        }
        if ($report && class_exists($report)) {
            $reportObj = new $report(Yii::app());
        } else {
            throw new CHttpException(404, 'Report not found');
        }
        return $reportObj;
    }