1<?php
2/**
3 * DokuWiki Plugin xcom (Helper Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Myron Turner <turnermm02@shaw.ca>
7 */
8
9// must be run within Dokuwiki
10if(!defined('DOKU_INC')) die();
11define('XCOM_ROOT', DOKU_INC . 'lib/plugins/xcom/');
12class helper_plugin_xcom extends DokuWiki_Plugin {
13
14    /**
15     * Return info about supported methods in this Helper Plugin
16     *
17     * @return array of public methods
18     */
19    public function getMethods() {
20        return array(
21            array(
22                'name'   => 'basic',
23                'desc'   => 'initializes',
24                'params' => array(
25                    'namespace'         => 'string'
26                ),
27                'return' => array('names' => 'array')
28            ),
29            array(
30                // and more supported methods...
31            )
32        );
33    }
34   public function basic($namespace) {
35       return array();
36   }
37
38   function write_debug($data) {
39        // return;
40        if (!$handle = fopen(XCOM_ROOT .'xcom_dbg.txt', 'a')) {
41            return;
42        }
43        if(is_array($data)) {
44            $data = print_r($data,true);
45        }
46        // Write $somecontent to our opened file.
47        fwrite($handle, "$data\n");
48        fclose($handle);
49   }
50}
51
52// vim:ts=4:sw=4:et:
53