1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8/** 9 * \brief Skeleton to quick startup of making new debugger command 10 * \author zaufi <zaufi@sendmail.ru> 11 */ 12require_once('lib/debug/debugger-ext.php'); 13 14/** 15 * \brief Just a test 16 * 17 * This skeleton can be used to quick make and test smth :) 18 * It contain minimum to be a debugger command -- it is not 19 * example of full functional command... 20 * 21 * Usual way to use this file: 22 * 1. change smth 23 * 2. play with result 24 * 3. if results can be used by others goto 4 else goto 5 25 * 4. rename file, add needed helpers(), cvs add, cvs ci, cvs up, goto 6 26 * 5. rm file, cvs up 27 * 6. if (have_another_idea() == true) goto 1 28 * 29 */ 30class DebuggerCommand_Test extends DebuggerCommand 31{ 32 /// \b Must have function to announce command name in debugger console 33 function name() 34 { 35 return 'test'; 36 } 37 38 /// Execute command with given set of arguments. Must return string of result. 39 function execute($params) 40 { 41 // NOTE: Don't forget to set result type! By default it is NO_RESULT. 42 $this->set_result_type(TEXT_RESULT); 43 44 return 'done'; 45 } 46} 47 48function dbg_command_factory_test() 49{ 50 return new DebuggerCommand_Test(); 51} 52