170316b84SAndreas Gohr<?php 28673a04eSAndreas Gohr 38673a04eSAndreas Gohruse dokuwiki\Extension\RemotePlugin; 48673a04eSAndreas Gohruse dokuwiki\Remote\AccessDeniedException; 58673a04eSAndreas Gohr 670316b84SAndreas Gohr/** 7*75bbd2c4SAndreas Gohr * DokuWiki Plugin @@PLUGIN_NAME@@ (Remote Component) 870316b84SAndreas Gohr * 970316b84SAndreas Gohr * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 1070316b84SAndreas Gohr * @author @@AUTHOR_NAME@@ <@@AUTHOR_MAIL@@> 1170316b84SAndreas Gohr */ 128673a04eSAndreas Gohrclass @@PLUGIN_COMPONENT_NAME@@ extends RemotePlugin 1370316b84SAndreas Gohr{ 1470316b84SAndreas Gohr /** 1570316b84SAndreas Gohr * Example function 1670316b84SAndreas Gohr * 1770316b84SAndreas Gohr * All public methods become automatically part of the API 1870316b84SAndreas Gohr */ 1970316b84SAndreas Gohr public function myExample($id) 2070316b84SAndreas Gohr { 2170316b84SAndreas Gohr // FIXME handle security in your method! 2270316b84SAndreas Gohr $id = cleanID($id); 2370316b84SAndreas Gohr if (auth_quickaclcheck($id) < AUTH_READ) { 248673a04eSAndreas Gohr throw new AccessDeniedException('You are not allowed to read this file', 111); 2570316b84SAndreas Gohr } 2670316b84SAndreas Gohr 2770316b84SAndreas Gohr return 'example'; 2870316b84SAndreas Gohr } 2970316b84SAndreas Gohr} 30