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