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
23 * @copyright (C) 2008 Vincent Tunru
24 * @author Vincent Tunru <email@vincentt.org>
28 * Pivip debugging utility class
30 class Pivip_Debug
extends Zend_Debug
33 * @var string The current setup (i.e. "dev" or "production")
35 protected static $_setup = 'production';
38 * Retrieve the current setup
40 * @return string The current setup
42 public static function getSetup()
44 $configuration = new Zend_Config_Ini('data/config/general.ini', 'developers');
45 switch($configuration->setup
)
48 // Break intentionally omitted
50 self
::$_setup = 'dev';
53 // Break intentionally omitted
55 // Break intentionally omitted
57 self
::$_setup = 'production';
64 * Find out whether we're currently in a testing environment
66 * @return bool True when in a testing environment
68 public static function isTesting()
70 if('dev' == self
::getSetup())