
getDefaultModule 메소드는 Yaf_Dispatcher 클래스의 메소드로, 기본 모듈을 반환합니다. 기본 모듈은 Yaf 애플리케이션의 시작점으로, 요청을 처리하는 모듈입니다.
getDefaultModule 메소드는 문자열 형태로 반환됩니다. 반환되는 문자열은 기본 모듈의 이름을 나타냅니다.
getDefaultModule 메소드는 다음과 같은 형태로 사용할 수 있습니다.
#hostingforum.kr
php
$dispatcher = Yaf_Dispatcher::getInstance();
$defaultModule = $dispatcher->getDefaultModule();
getDefaultModule 메소드의 반환 값을 사용하는 예는 다음과 같습니다.
#hostingforum.kr
php
$dispatcher = Yaf_Dispatcher::getInstance();
$defaultModule = $dispatcher->getDefaultModule();
if ($defaultModule == 'default') {
// 기본 모듈인 경우 수행할 코드
} else {
// 기본 모듈이 아닌 경우 수행할 코드
}
getDefaultModule 메소드에 대한 더 많은 정보는 Yaf 문서를 참조하세요. Yaf는 PHP로 작성된 웹 프레임워크로, 모듈 기반의 애플리케이션 개발을 지원합니다. Yaf 문서는 공식 홈페이지에서 확인할 수 있습니다.
2025-04-30 17:53