没有合适的资源?快使用搜索试试~ 我知道了~
首页Luci-Api手册 - 英文.pdf
资源详情
资源评论
资源推荐

1
LUCI-APIs-Reference
OverView
Class luci.dispatcher
Functions
_ ()
No-op function used to mark translation entries for
menu labels.
alias (...)
Create a redirect to another dispatching node.
arcombine (trg1, trg2)
Create a combined dispatching target for non argv
and argv requests.
assign (path, clone, title, order)
Clone a node of the dispatching tree to another

2
position.
build_url (...)
Build the URL relative to the server webroot from
given virtual path.
call (name, ...)
Create a function-call dispatching target.
cbi (model)
Create a CBI model dispatching target.
createindex ()
Generate the dispatching index using the native
file-cache based strategy.
createtree ()
Create the dispatching tree from the index.
dispatch (request)
Dispatches a LuCI virtual path.
entry (path, target, title, order)
Create a new dispatching node and define common
parameters.
error404 (message)
Send a 404 error code and render the "error404"
template if available.
error500 (message)
Send a 500 error code and render the "error500"
template if available.
firstchild ()
Alias the first (lowest order) page automatically
form (model)
Create a CBI form model dispatching target.
get (...)
Fetch or create a dispatching node without setting
the target module or enabling the node.
httpdispatch (request)
Dispatch an HTTP request.
lookup (...)
Lookup node in dispatching tree.
node (...)
Fetch or create a new dispatching node.
node_childs (node)
Return a sorted table of visible children within a
given node
node_visible (node)
Check whether a dispatch node shall be visible
rewrite (n, ...)
Rewrite the first x path values of the request.
template (name)
Create a template render dispatching target.
translate (text)
Access the luci.i18n translate() api.
Functions
_ ()
No-op function used to mark translation entries for menu labels.
This function does not actually translate the given argument but
is used by build/i18n-scan.pl to find translatable entries.

3
alias (...)
Create a redirect to another dispatching node.
Parameters
...: Virtual path destination
arcombine (trg1, trg2)
Create a combined dispatching target for non argv and argv requests.
Parameters
trg1: Overview Target
trg2: Detail Target
assign (path, clone, title, order)
Clone a node of the dispatching tree to another position.
Parameters
path: Virtual path destination
clone: Virtual path source
title: Destination node title (optional)
order: Destination node order value (optional)
Return value:
Dispatching tree node
build_url (...)
Build the URL relative to the server webroot from given virtual
path.
Parameters
...: Virtual path
Return value:
Relative URL
call (name, ...)
Create a function-call dispatching target.
Parameters
name: Target function of local controller
...: Additional parameters passed to the function
cbi (model)

4
Create a CBI model dispatching target.
Parameters
model: CBI model to be rendered
createindex ()
Generate the dispatching index using the native file-cache based
strategy.
createtree ()
Create the dispatching tree from the index. Build the index before
if it does not exist yet.
dispatch (request)
Dispatches a LuCI virtual path.
Parameters
request: Virtual path
entry (path, target, title, order)
Create a new dispatching node and define common parameters.
Parameters
path: Virtual path
target: Target function to call when dispatched.
title: Destination node title
order: Destination node order value (optional)
Return value:
Dispatching tree node
error404 (message)
Send a 404 error code and render the "error404" template if
available.
Parameters
message: Custom error message (optional)
Return value:
false
error500 (message)
Send a 500 error code and render the "error500" template if
available.
Parameters

5
message: Custom error message (optional)#
Return value:
false
firstchild ()
Alias the first (lowest order) page automatically
form (model)
Create a CBI form model dispatching target.
Parameters
model: CBI form model tpo be rendered
get (...)
Fetch or create a dispatching node without setting the target module
or enabling the node.
Parameters
...: Virtual path
Return value:
Dispatching tree node
httpdispatch (request)
Dispatch an HTTP request.
Parameters
request: LuCI HTTP Request object
lookup (...)
Lookup node in dispatching tree.
Parameters
...: Virtual path
Return value:
Node object, canonical url or nil if the path was not found.
node (...)
Fetch or create a new dispatching node.
Parameters
...: Virtual path
剩余141页未读,继续阅读









安全验证
文档复制为VIP权益,开通VIP直接复制

评论0