Yay, I managed to display something! Only problem is that it required refactoring...
[pivip.git] / project / plugins / errorhandler / Plugin.php
blob16ed80cee995655dfab98962a8a9930b45469acd
1 <?php
3 /**
4 * Pivip
5 * Copyright (C) 2008 Vincent Tunru
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2
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 General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 * @license http://www.fsf.org/licensing/licenses/info/GPLv2.html GPL v.2
21 * @category PivipPluginsDefault
22 * @package Plugin_ErrorHandler
23 * @copyright (C) 2008 Vincent Tunru
24 * @author Vincent Tunru <email@vincentt.org>
27 /**
28 * Manage the ErrorHandler plugin
30 * @see /library/Pivip/Plugin/Abstract.php
32 class errorhandler_Plugin extends Pivip_Plugin_Abstract
34 /**
35 * Checks whether this plugin is already installed
37 * @return boolean Whether ErrorHandler is already installed.
39 public static function isInstalled()
43 /**
44 * Communicate that ErrorHandler does not need any configuration
46 * Always returns false since there is nothing to configure for the
47 * ErrorHandler plugin.
49 * @return boolean False, since ErrorHandler does not need to be configured.
51 public static function needsConfiguring()
53 return false;
56 /**
57 * Install ErrorHandler
59 * @throws Pivip_Install_Exception
60 * @return boolean Whether the installation succeeded
62 public function install()
66 /**
67 * Uninstall ErrorHandler
69 * @throws Pivip_Install_Exception
70 * @return boolean Whether uninstallation succeeded
72 public function uninstall()
76 /**
77 * Load the plugin
79 * Sets the error handler to the ErrorHandler plugin
81 public static function bootstrap()
83 $errorHandler = new Zend_Controller_Plugin_ErrorHandler
84 (array('module' => 'errorhandler',
85 'controller' => 'error',
86 'action' => 'error'));
87 Zend_Controller_Front::getInstance()->registerPlugin($errorHandler);