12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <head>
- <title>Reference</title>
- <link rel="stylesheet" href="../luadoc.css" type="text/css" />
- <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
- </head>
- <body>
- <div id="container">
- <div id="product">
- <div id="product_logo"></div>
- <div id="product_name"><big><b></b></big></div>
- <div id="product_description"></div>
- </div> <!-- id="product" -->
- <div id="main">
- <div id="navigation">
- <h1>LuaDoc</h1>
- <ul>
-
- <li><a href="../index.html">Index</a></li>
-
- </ul>
- <!-- Module list -->
- <h1>Modules</h1>
- <ul>
- <li><strong>luci.dispatcher</strong></li>
-
- <li>
- <a href="../modules/luci.http.html">luci.http</a>
- </li>
- <li>
- <a href="../modules/luci.http.protocol.html">luci.http.protocol</a>
- </li>
- <li>
- <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
- </li>
- <li>
- <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
- </li>
- <li>
- <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.mime</a>
- </li>
- <li>
- <a href="../modules/luci.i18n.html">luci.i18n</a>
- </li>
- <li>
- <a href="../modules/luci.ip.html">luci.ip</a>
- </li>
- <li>
- <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
- </li>
- <li>
- <a href="../modules/luci.json.html">luci.json</a>
- </li>
- <li>
- <a href="../modules/luci.jsonc.html">luci.jsonc</a>
- </li>
- <li>
- <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
- </li>
- <li>
- <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
- </li>
- <li>
- <a href="../modules/luci.model.uci.html">luci.model.uci</a>
- </li>
- <li>
- <a href="../modules/luci.rpcc.html">luci.rpcc</a>
- </li>
- <li>
- <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
- </li>
- <li>
- <a href="../modules/luci.sys.html">luci.sys</a>
- </li>
- <li>
- <a href="../modules/luci.sys.init.html">luci.sys.init</a>
- </li>
- <li>
- <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
- </li>
- <li>
- <a href="../modules/luci.sys.net.html">luci.sys.net</a>
- </li>
- <li>
- <a href="../modules/luci.sys.process.html">luci.sys.process</a>
- </li>
- <li>
- <a href="../modules/luci.sys.user.html">luci.sys.user</a>
- </li>
- <li>
- <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
- </li>
- <li>
- <a href="../modules/luci.util.html">luci.util</a>
- </li>
- <li>
- <a href="../modules/nixio.html">nixio</a>
- </li>
- <li>
- <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
- </li>
- <li>
- <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
- </li>
- <li>
- <a href="../modules/nixio.File.html">nixio.File</a>
- </li>
- <li>
- <a href="../modules/nixio.README.html">nixio.README</a>
- </li>
- <li>
- <a href="../modules/nixio.Socket.html">nixio.Socket</a>
- </li>
- <li>
- <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
- </li>
- <li>
- <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
- </li>
- <li>
- <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
- </li>
- <li>
- <a href="../modules/nixio.bin.html">nixio.bin</a>
- </li>
- <li>
- <a href="../modules/nixio.bit.html">nixio.bit</a>
- </li>
- <li>
- <a href="../modules/nixio.crypto.html">nixio.crypto</a>
- </li>
- <li>
- <a href="../modules/nixio.fs.html">nixio.fs</a>
- </li>
- </ul>
- <!-- File list -->
- </div><!-- id="navigation" -->
- <div id="content">
- <h1>Class <code>luci.dispatcher</code></h1>
- <p></p>
- <h2>Functions</h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#_">_</a> ()</td>
- <td class="summary">
-
- No-op function used to mark translation entries for menu labels.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#alias">alias</a> (...)</td>
- <td class="summary">
-
- Create a redirect to another dispatching node.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#arcombine">arcombine</a> (trg1, trg2)</td>
- <td class="summary">
-
- Create a combined dispatching target for non argv and argv requests.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#assign">assign</a> (path, clone, title, order)</td>
- <td class="summary">
-
- Clone a node of the dispatching tree to another position.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#build_url">build_url</a> (...)</td>
- <td class="summary">
-
- Build the URL relative to the server webroot from given virtual path.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#call">call</a> (name, ...)</td>
- <td class="summary">
-
- Create a function-call dispatching target.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#cbi">cbi</a> (model)</td>
- <td class="summary">
-
- Create a CBI model dispatching target.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#createindex">createindex</a> ()</td>
- <td class="summary">
-
- Generate the dispatching index using the native file-cache based strategy.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#createtree">createtree</a> ()</td>
- <td class="summary">
-
- Create the dispatching tree from the index.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#dispatch">dispatch</a> (request)</td>
- <td class="summary">
-
- Dispatches a LuCI virtual path.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#entry">entry</a> (path, target, title, order)</td>
- <td class="summary">
-
- Create a new dispatching node and define common parameters.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#error404">error404</a> (message)</td>
- <td class="summary">
-
- Send a 404 error code and render the "error404" template if available.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#error500">error500</a> (message)</td>
- <td class="summary">
-
- Send a 500 error code and render the "error500" template if available.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#firstchild">firstchild</a> ()</td>
- <td class="summary">
-
- Alias the first (lowest order) page automatically
-
- </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#form">form</a> (model)</td>
- <td class="summary">
-
- Create a CBI form model dispatching target.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#get">get</a> (...)</td>
- <td class="summary">
-
- Fetch or create a dispatching node without setting the target module or
-
- enabling the node.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#httpdispatch">httpdispatch</a> (request)</td>
- <td class="summary">
-
- Dispatch an HTTP request.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#modifier">modifier</a> (func, order)</td>
- <td class="summary">
-
- Register a tree modifier.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#node">node</a> (...)</td>
- <td class="summary">
-
- Fetch or create a new dispatching node.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#node_childs">node_childs</a> (node)</td>
- <td class="summary">
-
- Return a sorted table of visible childs within a given node
- </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#node_visible">node_visible</a> (node)</td>
- <td class="summary">
-
- Check whether a dispatch node shall be visible
- </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#rewrite">rewrite</a> (n, ...)</td>
- <td class="summary">
-
- Rewrite the first x path values of the request.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#template">template</a> (name)</td>
- <td class="summary">
-
- Create a template render dispatching target.</td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#translate">translate</a> (text)</td>
- <td class="summary">
-
- Access the luci.i18n translate() api.</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2><a name="functions"></a>Functions</h2>
- <dl class="function">
- <dt><a name="_"></a><strong>_</strong> ()</dt>
- <dd>
-
- 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.
- </dd>
- <dt><a name="alias"></a><strong>alias</strong> (...)</dt>
- <dd>
-
- Create a redirect to another dispatching node.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- ...: Virtual path destination
- </li>
-
- </ul>
- </dd>
- <dt><a name="arcombine"></a><strong>arcombine</strong> (trg1, trg2)</dt>
- <dd>
-
- Create a combined dispatching target for non argv and argv requests.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- trg1: Overview Target
- </li>
-
- <li>
- trg2: Detail Target
- </li>
-
- </ul>
- </dd>
- <dt><a name="assign"></a><strong>assign</strong> (path, clone, title, order)</dt>
- <dd>
-
- Clone a node of the dispatching tree to another position.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- path: Virtual path destination
- </li>
-
- <li>
- clone: Virtual path source
- </li>
-
- <li>
- title: Destination node title (optional)
- </li>
-
- <li>
- order: Destination node order value (optional)
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Dispatching tree node
- </dd>
- <dt><a name="build_url"></a><strong>build_url</strong> (...)</dt>
- <dd>
-
- Build the URL relative to the server webroot from given virtual path.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- ...: Virtual path
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Relative URL
- </dd>
- <dt><a name="call"></a><strong>call</strong> (name, ...)</dt>
- <dd>
-
- Create a function-call dispatching target.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- name: Target function of local controller
- </li>
-
- <li>
- ...: Additional parameters passed to the function
- </li>
-
- </ul>
- </dd>
- <dt><a name="cbi"></a><strong>cbi</strong> (model)</dt>
- <dd>
-
- Create a CBI model dispatching target.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- model: CBI model to be rendered
- </li>
-
- </ul>
- </dd>
- <dt><a name="createindex"></a><strong>createindex</strong> ()</dt>
- <dd>
-
- Generate the dispatching index using the native file-cache based strategy.
-
- </dd>
- <dt><a name="createtree"></a><strong>createtree</strong> ()</dt>
- <dd>
-
- Create the dispatching tree from the index.
-
- Build the index before if it does not exist yet.
- </dd>
- <dt><a name="dispatch"></a><strong>dispatch</strong> (request)</dt>
- <dd>
-
- Dispatches a LuCI virtual path.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- request: Virtual path
- </li>
-
- </ul>
- </dd>
- <dt><a name="entry"></a><strong>entry</strong> (path, target, title, order)</dt>
- <dd>
-
- Create a new dispatching node and define common parameters.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- path: Virtual path
- </li>
-
- <li>
- target: Target function to call when dispatched.
- </li>
-
- <li>
- title: Destination node title
- </li>
-
- <li>
- order: Destination node order value (optional)
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Dispatching tree node
- </dd>
- <dt><a name="error404"></a><strong>error404</strong> (message)</dt>
- <dd>
-
- Send a 404 error code and render the "error404" template if available.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- message: Custom error message (optional)
- </li>
-
- </ul>
- <h3>Return value:</h3>
- false
- </dd>
- <dt><a name="error500"></a><strong>error500</strong> (message)</dt>
- <dd>
-
- Send a 500 error code and render the "error500" template if available.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- message: Custom error message (optional)#
- </li>
-
- </ul>
- <h3>Return value:</h3>
- false
- </dd>
- <dt><a name="firstchild"></a><strong>firstchild</strong> ()</dt>
- <dd>
-
- Alias the first (lowest order) page automatically
-
- </dd>
- <dt><a name="form"></a><strong>form</strong> (model)</dt>
- <dd>
-
- Create a CBI form model dispatching target.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- model: CBI form model tpo be rendered
- </li>
-
- </ul>
- </dd>
- <dt><a name="get"></a><strong>get</strong> (...)</dt>
- <dd>
-
- Fetch or create a dispatching node without setting the target module or
-
- enabling the node.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- ...: Virtual path
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Dispatching tree node
- </dd>
- <dt><a name="httpdispatch"></a><strong>httpdispatch</strong> (request)</dt>
- <dd>
-
- Dispatch an HTTP request.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- request: LuCI HTTP Request object
- </li>
-
- </ul>
- </dd>
- <dt><a name="modifier"></a><strong>modifier</strong> (func, order)</dt>
- <dd>
-
- Register a tree modifier.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- func: Modifier function
- </li>
-
- <li>
- order: Modifier order value (optional)
- </li>
-
- </ul>
- </dd>
- <dt><a name="node"></a><strong>node</strong> (...)</dt>
- <dd>
-
- Fetch or create a new dispatching node.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- ...: Virtual path
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Dispatching tree node
- </dd>
- <dt><a name="node_childs"></a><strong>node_childs</strong> (node)</dt>
- <dd>
-
- Return a sorted table of visible childs within a given node
- <h3>Parameters</h3>
- <ul>
-
- <li>
- node: Dispatch node
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Ordered table of child node names
- </dd>
- <dt><a name="node_visible"></a><strong>node_visible</strong> (node)</dt>
- <dd>
-
- Check whether a dispatch node shall be visible
- <h3>Parameters</h3>
- <ul>
-
- <li>
- node: Dispatch node
- </li>
-
- </ul>
- <h3>Return value:</h3>
- Boolean indicating whether the node should be visible
- </dd>
- <dt><a name="rewrite"></a><strong>rewrite</strong> (n, ...)</dt>
- <dd>
-
- Rewrite the first x path values of the request.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- n: Number of path values to replace
- </li>
-
- <li>
- ...: Virtual path to replace removed path values with
- </li>
-
- </ul>
- </dd>
- <dt><a name="template"></a><strong>template</strong> (name)</dt>
- <dd>
-
- Create a template render dispatching target.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- name: Template to be rendered
- </li>
-
- </ul>
- </dd>
- <dt><a name="translate"></a><strong>translate</strong> (text)</dt>
- <dd>
-
- Access the luci.i18n translate() api.
- <h3>Parameters</h3>
- <ul>
-
- <li>
- text: Text to translate
- </li>
-
- </ul>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|