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