<?php
/**
 * This file contains the PMO_Log interface.
 *
 * This file is part of the PhpMyObject project,
 * an Object-Relational Mapping (ORM) system.
 * 
 * For questions, help, comments, discussion, etc., please join our
 * forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770} 
 *
 * PhpMyObject 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 3 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, see {@link http://www.gnu.org/licenses/}.
 *
 * @package			PhpMyObject
 * @subpackage 	PMO_Core
 * @author			Louis Lapointe <laplix@gmail.com>
 * @link				http://pmo.developpez.com/
 * @since			PhpMyObject v0.2.0
 * @version			$Revision$
 * @copyright		Copyright (C) 2008 Louis Lapointe
 * @copyright		Copyright (C) 2008 Louis Lapointe
 * @license			GPLv3 {@link http://www.gnu.org/licenses/gpl}
 * @filesource
 *
 */ 

/**
 * This interface defines the methods a class must implement
 * to provide a working logger.
 * 
 * @package		PhpMyObject
 * @subpackage PMO_Core
 * @see			PMO_MyLog
 */ 
interface PMO_Log {
	
	/**
	 * The implementation must create a PMO_MyLog object or if it already
	 * exists, return a reference to this object instance
	 *
	 * @param string $filename 	file name of the log. Defsaults to pmo.log
	 * @return PMO_Log
	 * @static
	 */
	static function factory($filename = 'pmo.log');
	
	public function destroy($killfile = false);

	/**
	 * Starts the logger.
	 */
	public function start();
	
	/**
	 * Stops the log.
	 */
	public function stop();

	public function reset($killfile = true);

	/**
	 * The implementation must set a DB link or DD object
	 *
	 * @param mixed $data 		Data to log
	 */
	public function log($data = null);

	public function getLog();
}
?>
