/www/system/src/Framework/Application/Application.php
$this->_listenPlusShop($request);
}
} else {
// 컨트롤러 호출
$reflection = new ReflectionClass($controllerName);
if ($reflection->isSubclassOf(Controller::class)) {
$this->_controller = new $controllerName();
$this->_controller->run($cacheConfig);
return;
}
}
// 존재하지 않는 마이앱 API 호출시 404
if (\Request::getSubdomainDirectory() === 'api' && strpos(\Request::getFullFileUri(), DIR_MYAPP) !== false) {
http_response_code(Response::HTTP_NOT_FOUND);
}
// 페이지 오류 출력
throw new HttpException(__('컨트롤러(%s)를 찾을 수 없습니다.', $controllerName), 404);
} catch (Exception $e) {
throw $e;
}
}
/**
* POST 사이즈가 초과됬을 때 이를 체크해 예외처리를 할 수 있다.
*
* @author Jong-tae Ahn <qnibus@godo.co.kr>
*
* @param Request $request
*
* @throws Exception
*/
public function checkPostSizeExceeded(Request $request)
{
if ($request->server()->get('REQUEST_METHOD') == 'POST' && empty($request->post()->toArray()) && empty($request->files()->toArray()) && $request->server()->get('CONTENT_LENGTH') > 0) {
// php.ini에 설정된 값
$maxPostSize = $this->iniGetBytes('post_max_size');
Arguments
"컨트롤러(Controller\Front\Goods\IndexController)를 찾을 수 없습니다."
/www/system/src/Framework/Application/Application.php
$request = $this->getInstance('request');
if ($this->isBooted() === false) {
$this->boot();
}
// handle request
if ($request->isCli()) {
$this->runBatch($request);
} else {
// 플러스샵 초기화 실행 글로벌 전역 변수 unset 전에 반드시 선언되어야 하며 설정값때문에 부트스트랩 구동이후에 실행한다.
$this->_initPlusShop();
// 컨트롤러 단에서 사용할 수 없도록 전역변수 모두 삭제 (부트스트랩에서는 사용 가능)
// @formatter:off
unset($_GLOBALS, $_ENV, $_SESSION, $_GET, $_POST, $_FILES, $_SERVER, $_REQUEST);
// @formatter:on
// 컨트롤러 실행
$this->dispatch(new TemplateCacheConfig($request));
// 페이지 로드뷰 실행
if ($this->isEndLogView() === true) {
\LogHandler::endLogView();
}
}
if ($this['DB'] instanceof DB) {
$this['DB']->close();
}
}
/**
* Returns whether the booted.
*
* @return boolean
*/
public function isBooted()
{
return $this->_booted;
Arguments
/www/jongnogi1_godomall_com/route.php
$godomall5['loader'] = $loader;
$godomall5['request'] = new Request();
// boot & run.
if ($godomall5->boot()) {
// adds the default classpath resolver for user classes. (prepend)
try {
// preview user development
if ($godomall5['request']->get()->has('__gd5_work_preview') || Session::has('workPreview')) {
$userWorksResolver = new DefaultClassPathResolver($godomall5['user.path']->get('data', 'module'));
$userWorksResolver->setExcludedNamespace(['Framework', 'Bundle', 'Core']);
$godomall5['loader']->addClassPathResolver($userWorksResolver, true);
} else {
$userRealResolver = new DefaultClassPathResolver($godomall5['user.path']->get('module'));
$userRealResolver->setExcludedNamespace(['Framework', 'Bundle', 'Core']);
$godomall5['loader']->addClassPathResolver($userRealResolver, true);
}
// run application
$godomall5->run();
} catch (Exception $e) {
throw $e;
}
} else {
throw new HttpException(null, 500);
}