{"action":"opened","issue":{"url":"https://api.github.com/repos/laruence/yaf/issues/204","labels_url":"https://api.github.com/repos/laruence/yaf/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/laruence/yaf/issues/204/comments","events_url":"https://api.github.com/repos/laruence/yaf/issues/204/events","html_url":"https://github.com/laruence/yaf/issues/204","id":113755407,"number":204,"title":"route结构","user":{"login":"mhsun1992","id":5735656,"avatar_url":"https://avatars.githubusercontent.com/u/5735656?v=3","gravatar_id":"","url":"https://api.github.com/users/mhsun1992","html_url":"https://github.com/mhsun1992","followers_url":"https://api.github.com/users/mhsun1992/followers","following_url":"https://api.github.com/users/mhsun1992/following{/other_user}","gists_url":"https://api.github.com/users/mhsun1992/gists{/gist_id}","starred_url":"https://api.github.com/users/mhsun1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhsun1992/subscriptions","organizations_url":"https://api.github.com/users/mhsun1992/orgs","repos_url":"https://api.github.com/users/mhsun1992/repos","events_url":"https://api.github.com/users/mhsun1992/events{/privacy}","received_events_url":"https://api.github.com/users/mhsun1992/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-28T06:54:20Z","updated_at":"2015-10-28T06:54:20Z","closed_at":null,"body":"我的想法是这样的：在定义路由的时候添加一些其它额外的属性，然后在plugin中根据这些属性做一些检查操作。\r\n\r\nuser_following.type=\"rewrite\"\r\nuser_following.match=\"/:username/following$\"\r\nuser_following.route.module=index\r\nuser_following.route.controller=user\r\nuser_following.route.action=following\r\nuser_following.route.otherParam=test\r\n\r\n根据上边的route.ini获取到 Yaf\\Dispatcher::getInstance()->getRouter()->getRoute('user_following'):\r\n```\r\nYaf\\Route\\Rewrite Object\r\n(\r\n    [_route:protected] => /:username/following$\r\n    [_default:protected] => Array\r\n        (\r\n            [module] => index\r\n            [controller] => user\r\n            [action] => following\r\n            [otherParam] => test\r\n        )\r\n\r\n    [_verify:protected] => Array\r\n        (\r\n            [module] => index\r\n            [controller] => user\r\n            [action] => following\r\n            [otherParam] => test\r\n        )\r\n\r\n)\r\n```\r\n然而\"otherParam\"也像“m c a”被定义成静态属性了，所以目前是访问不到的"}}