1<?php
2
3use dokuwiki\Extension\RemotePlugin;
4use dokuwiki\Remote\AccessDeniedException;
5
6/**
7 * DokuWiki Plugin @@PLUGIN_NAME@@ (Action Component)
8 *
9 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
10 * @author @@AUTHOR_NAME@@ <@@AUTHOR_MAIL@@>
11 */
12class @@PLUGIN_COMPONENT_NAME@@ extends RemotePlugin
13{
14    /**
15     * Example function
16     *
17     * All public methods become automatically part of the API
18     */
19    public function myExample($id)
20    {
21        // FIXME handle security in your method!
22        $id = cleanID($id);
23        if (auth_quickaclcheck($id) < AUTH_READ) {
24            throw new AccessDeniedException('You are not allowed to read this file', 111);
25        }
26
27        return 'example';
28    }
29}
30