File: func_world_requireplugin.xhtml

package info (click to toggle)
kildclient 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 6,320 kB
  • sloc: ansic: 24,830; xml: 7,500; sh: 4,295; perl: 2,877; makefile: 172
file content (26 lines) | stat: -rw-r--r-- 3,535 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>C.74.  $world-&gt;requireplugin</title><link rel="stylesheet" type="text/css" href="docbook.css"/><link rel="stylesheet" type="text/css" href="kildclient.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"/><link rel="prev" href="func_world_reconnect.xhtml" title="C.73.  $world-&gt;reconnect"/><link rel="next" href="func_world_save.xhtml" title="C.75.  $world-&gt;save"/></head><body><header><div class="navheader"><table style="width: 100%; "><tr><th style="text-align: center; " colspan="3">C.74. 
  <code class="function">$world-&gt;requireplugin</code>
</th></tr><tr><td style="width: 20%; text-align: left; "><a accesskey="p" href="func_world_reconnect.xhtml">Prev</a> </td><th style="width: 60%; text-align: center; ">Appendix C. $world Reference</th><td style="width: 20%; text-align: right; "> <a accesskey="n" href="func_world_save.xhtml">Next</a></td></tr></table><hr/></div></header><section class="sect1" id="func_world_requireplugin"><div class="titlepage"><div><div><h2 class="title" style="clear: both">C.74. 
  <code class="function">$world-&gt;requireplugin</code>
</h2></div></div></div><div class="abstract"><div class="abstract-title">Abstract</div><p>$world-&gt;requireplugin function: REQUIREs a PLUGIN to be loaded</p></div><div class="funcsynopsis"><table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table"><tr><td><code class="funcdef">$success = $world-&gt;requireplugin(</code></td><td>
      <code>name</code>
    <code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>This function is similar to <a class="xref" href="func_world_loadplugin.xhtml" title="C.58.  $world-&gt;loadplugin">
  <code class="function">$world-&gt;loadplugin</code>
</a>, but first checks if the plugin is
already loaded. If it is, it returns successfully. If not, it tries
loading the plugin (silently). If this succeeds, the function returns
successfully, if not, it <code class="function">die</code>()'s. This function
is useful in plugins that require other plugins, and is meant to be
called in a <code class="literal">BEGIN</code> block of a plugin that requires
another.</p><p>The argument passed must be the name of the plugin (a path to
the file is not allowed, unlike with <a class="xref" href="func_world_loadplugin.xhtml" title="C.58.  $world-&gt;loadplugin">
  <code class="function">$world-&gt;loadplugin</code>
</a>. See <a class="xref" href="func_world_loadplugin.xhtml" title="C.58.  $world-&gt;loadplugin">
  <code class="function">$world-&gt;loadplugin</code>
</a> for
information on how plugins are found.</p></section><footer><div class="navfooter"><hr/><table style="width: 100%; "><tr><td style="width: 40%; text-align: left; "><a accesskey="p" href="func_world_reconnect.xhtml">Prev</a> </td><td style="width: 20%; text-align: center; "><a accesskey="u" href="apc.xhtml">Up</a></td><td style="width: 40%; text-align: right; "> <a accesskey="n" href="func_world_save.xhtml">Next</a></td></tr><tr><td style="width: 40%; text-align: left; vertical-align: top; ">C.73. 
  <code class="function">$world-&gt;reconnect</code>
 </td><td style="width: 20%; text-align: center; "><a accesskey="h" href="index.xhtml">Home</a></td><td style="width: 40%; text-align: right; vertical-align: top; "> C.75. 
  <code class="function">$world-&gt;save</code>
</td></tr></table></div></footer></body></html>