summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-10-19 14:58:48 +0200
committermkanat%bugzilla.org <>2007-10-19 14:58:48 +0200
commit77761cd6861490775d0d617f962ad213019517d9 (patch)
treedd220626d75c0c22afb2c2bd25c5d06a53f5d260 /Bugzilla
parent415e32d463bbb881d991d886ddba6f859669c098 (diff)
downloadbugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.gz
bugzilla-77761cd6861490775d0d617f962ad213019517d9.tar.xz
Bug 396243: Allow extensions (aka plugins) to extend the WebService interface
This also includes the first checkin of the example plugin. Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=ghendricks, a=mkanat
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Hook.pm35
1 files changed, 34 insertions, 1 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index a9cfc649c..9d65fbe69 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -62,7 +62,7 @@ __END__
=head1 NAME
-Bugzilla::Hook - Extendible extension hooks for Bugzilla code
+Bugzilla::Hook - Extendable extension hooks for Bugzilla code
=head1 SYNOPSIS
@@ -193,3 +193,36 @@ definitions. F<checksetup.pl> will automatically add these tables to the
database when run.
=back
+
+=head2 webservice
+
+This hook allows you to add your own modules to the WebService. (See
+L<Bugzilla::WebService>.)
+
+Params:
+
+=over
+
+=item C<dispatch>
+
+A hashref that you can specify the names of your modules and what Perl
+module handles the functions for that module. (This is actually sent to
+L<SOAP::Lite/dispatch_with>. You can see how that's used in F<xmlrpc.cgi>.)
+
+The Perl module name must start with C<extensions::yourextension::lib::>
+(replace C<yourextension> with the name of your extension). The C<package>
+declaration inside that module must also start with
+C<extensions::yourextension::lib::> in that module's code.
+
+Example:
+
+ $dispatch->{Example} = "extensions::example::lib::Example";
+
+And then you'd have a module F<extensions/example/lib/Example.pm>
+
+It's recommended that all the keys you put in C<dispatch> start with the
+name of your extension, so that you don't conflict with the standard Bugzilla
+WebService functions (and so that you also don't conflict with other
+plugins).
+
+=back