找回密码
 注册
查看: 349|回复: 0

R语言 sinartra包 Router()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 09:36:54 | 显示全部楼层 |阅读模式
Router(sinartra)
Router()所属R语言包:sinartra

                                        Router object.
                                         路由器的对象。

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Router object. The router object coordinates matching urls to functions.
路由器的对象。路由器对象的坐标匹配的URL的功能。


Details

详细信息----------Details----------

Add possible route using the appropriate http verb (get, post, put, delete). Currently only get is implemented.  These methods have two arguments: route, the description of the url to match, and the callback to run when the route is matched.
添加使用相应的HTTP动词(GET,POST,PUT,DELETE)的可能的途径。目前,只有得到实施。这些方法有两个参数:route,URL匹配的描述,和callback运行时的路线被匹配。

Route urls have a special syntax.  They are basically paths but with two special keywords: :param which matches a single component and * which will match anything.
路线网址有一种特殊的语法。他们基本上是路径,但有两个特殊的关键字::param匹配一个单一的组件和*这将匹配任何内容。




hello.html matches hello.html only
hello.html匹配hello.html only

packages/:package.html will match packages/a.html, packages:/my-package.html and so on, and the callback will be called with an argument named package containing "a" and "my-package" respectively.
packages/:package.html将匹配packages/a.html,packages:/my-package.html“等,回调函数将会被调用,一个参数叫做包,其中包含”A“和”我的包“。

*.html will match anything ending in .html and callback will be called with a "splat" argument </ul>
*.html将匹配任何结尾的.html和回调函数将会被调用的“图示”的说法</ ul>

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-25 14:02 , Processed in 0.027944 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表