[Phpcms-plugins-cvs] admin4phpCMS/modules/debug class.module_debug.php,NONE,1.1
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-06-04 11:12:07
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12823/modules/debug Added Files: class.module_debug.php Log Message: several changes --- NEW FILE: class.module_debug.php --- <?php /** * The debugging-module * * <b>License</b> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @author Martin Jahn <mj...@us...> * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @copyright Copyright (c) 2004, Martin Jahn * @version $Id: class.module_debug.php,v 1.1 2004/06/04 11:11:57 mjahn Exp $ * @package admin4phpCMS * @subpackage module_debug **/ /* * $Log: class.module_debug.php,v $ * Revision 1.1 2004/06/04 11:11:57 mjahn * several changes * */ /** * class for displaying debug-information * * @package admin4phpCMS * @subpackage module_debug * @todo Get the class working correctly **/ class module_debug extends module { function init () { $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doProcess', 'process'); $this->_registerAction ('doParseContent', 'getContent'); } function parseParam (&$actiondata) { $this->uri = $actiondata; } function process (&$actiondata) { } function getContent (&$actiondata) { if (DEBUG != true) return; $root = $actiondata['_root']; $actiondata = array ('_id'=>'trennerdebug', '_type'=>'hr', 'id'=>'', 'class'=>'', '_root'=>$root); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); $this->uri['events'] =& $this->_event->_events; $this->uri['actions'] =& $this->_event->_actionHandler->_actions; foreach ($this->uri as $type=>$data) { if (!is_array ($data)) { continue; } // check if there is any data in the array if (count ($data) == 0) { continue; } // set the headline $actiondata = array ('_id'=>'request_'.$type, '_type'=>'headline', 'content'=>strtoupper ($type), 'id'=>'', 'class'=>'', '_root'=>$root); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); // set the unordered list $actiondata = array ('_id'=>'list_'.$type, '_type'=>'ulist', 'id'=>'', 'class'=>'', '_root'=>$root); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); // walk through the array-structure foreach ($data as $id=>$value) { if (is_array ($value)) { $value = 'Array ('.join(', ', $value).')'; } $content = '$_'.strtoupper($type).'[\''.$id.'\'] = '.$value; // set the list-entry with content $actiondata = array ('_id'=>$type.$id, '_type'=>'list_entry', 'content'=>$content, '_root'=>'list_'.$type); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); } } } function getUserData (&$actiondata) { } function setUserData (&$actiondata) { } } ?> |