3 * StatusNet - the distributed open-source microblogging tool
4 * Copyright (C) 2010, StatusNet, Inc.
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 * @package YammerImportPlugin
22 * @maintainer Brion Vibber <brion@status.net>
25 if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
27 set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/');
29 class YammerImportPlugin extends Plugin
32 * Hook for RouterInitialized event.
34 * @param Net_URL_Mapper $m path-to-action mapper
35 * @return boolean hook return
37 function onRouterInitialized($m)
39 $m->connect('admin/import/yammer',
40 array('action' => 'importyammer'));
45 * Set up queue handlers for import processing
46 * @param QueueManager $qm
47 * @return boolean hook return
49 function onEndInitializeQueueManager(QueueManager $qm)
51 $qm->connect('importym', 'ImportYmQueueHandler');
57 * Automatically load the actions and libraries used by the plugin
59 * @param Class $cls the class
61 * @return boolean hook return
64 function onAutoload($cls)
66 $base = dirname(__FILE__);
67 $lower = strtolower($cls);
69 case 'yammerimqueuehandler':
70 case 'importyammeraction':
71 require_once $base . $lower . '.php';