
Yaf_Router::getRoute 메서드가 리턴하는 라우트 정보의 'module'과 'controller'의 차이점은 다음과 같습니다.
- 'module'은 라우팅에 사용되는 모듈 이름입니다. 예를 들어, 라우팅 URL이 '/module1/controller1'일 경우 'module'은 'module1'이 됩니다.
- 'controller'은 라우팅에 사용되는 컨트롤러 이름입니다. 예를 들어, 라우팅 URL이 '/module1/controller1'일 경우 'controller'은 'controller1'이 됩니다.
컨트롤러는 모듈 안에 있는 클래스입니다. 예를 들어, 모듈 이름이 'module1'이고, 컨트롤러 이름이 'controller1'인 경우, 컨트롤러 클래스는 'module1/Controller/Controller1.php' 파일에 정의됩니다.
예를 들어, 라우팅 URL이 '/module1/controller1'일 경우, Yaf_Router::getRoute 메서드는 다음과 같은 라우트 정보를 리턴합니다.
- 'module' : 'module1'
- 'controller' : 'controller1'
이러한 정보를 사용하여, 라우팅 URL에 해당하는 모듈과 컨트롤러를 찾을 수 있습니다.
2025-05-24 04:35