孙梦华
孙梦华
md的code引用是 ``` + language 就够了: ``` c try_again: swtich (Z_TYPE_P(zv)) { case IS_TRING: break; case IS_ARRAY: break; ... case IS_REFERNCE: zv = Z_REFVAL_P(zv); //解引用 goto try_again; break; } ```
route结构
我的想法是这样的:在定义路由的时候添加一些其它额外的属性,然后在plugin中根据这些属性做一些检查操作。 route.ini: user_following.type="rewrite" user_following.match="/:username/following$" user_following.route.module=index user_following.route.controller=user user_following.route.action=following user_following.route.otherParam=test 根据上边的route.ini获取到 Yaf\Dispatcher::getInstance()->getRouter()->getRoute('user_following'): ``` Yaf\Route\Rewrite Object ( [_route:protected] => /:username/following$ [_default:protected] => Array ( [module] => index [controller] => user [action] => following...