설명서를 읽었지만 URI를 모듈로 라우팅하는 방법을 찾을 수없는 것 같습니다.모듈로 어떻게 라우팅 할 수 있습니까?
내 모듈에는 현재 올바른 디렉토리 구조 (현재는 수천 개의 빈 디렉토리)를 사용하는 단일 컨트롤러가 포함되어 있습니다. 내 컨트롤러는 modules/module_name/classes/controller
안에 있고 내 경로 파일은 modules/module_name/config/routes.php
안에 있습니다. 컨트롤러는 같은 아래 보이는
<?php
return array(
'_root_' => 'md5_encrypt/index', // The default route
'tools/geek/md5_encrypt' => array('md5_encrypt'),
);
(하지만 난 그 관련되어 있다고 생각하지 않습니다) :
은 내가 모두 /app/config/routes.php
및 modules/module_name/config/routes.php
에 다음과 같은 시도
<?php
/**
* MD5 Encrypt Controller.
*
* Online tool to encrypt a string using MD5
*
* @package app
* @extends Controller
*/
namespace Md5_encrypt;
class Controller_Md5_Encrypt extends Controller_Template
{
/**
* The tool
*
* @access public
* @return Response
*/
public function action_index()
{
$data = array();
$this->template->tab = 'geek';
$this->template->title = 'MD5 Encrypt Tool';
$this->template->content = View::forge('welcome/index', $data);
}
}
고마워요,하지만 고칠 수는 없습니다. 나는 그것이 일하고 있었던 길이었던 것은 잘못했을 것이다라고 생각할 것이다. – Mike