9 * This source file is subject to the new BSD license that is bundled
10 * with this package in the file LICENSE.
11 * It is also available through the world-wide-web at this URL:
12 * http://phergie.org/license
15 * @package Phergie_Plugin_Wine
16 * @author Phergie Development Team <team@phergie.org>
17 * @copyright 2008-2010 Phergie Development Team (http://phergie.org)
18 * @license http://phergie.org/license New BSD License
19 * @link http://pear.phergie.org/package/Phergie_Plugin_Wine
23 * Processes requests to serve users wine.
26 * @package Phergie_Plugin_Wine
27 * @author Phergie Development Team <team@phergie.org>
28 * @license http://phergie.org/license New BSD License
29 * @link http://pear.phergie.org/package/Phergie_Plugin_Wine
30 * @uses Phergie_Plugin_Command pear.phergie.org
31 * @uses Phergie_Plugin_Serve pear.phergie.org
33 class Phergie_Plugin_Wine extends Phergie_Plugin_Abstract
36 * Checks for dependencies.
40 public function onLoad()
42 $plugins = $this->plugins;
43 $plugins->getPlugin('Command');
44 $plugins->getPlugin('Serve');
48 * Processes requests to serve a user a wine.
50 * @param string $request Request including the target and an optional
51 * suggestion of what wine to serve
55 public function onCommandWine($request)
57 $format = $this->getConfig(
59 'serves %target% a glass of %item%.'
62 $this->plugins->getPlugin('Serve')->serve(
63 dirname(__FILE__) . '/Wine/wine.db',