<commit_before><?php
/** @package    verysimple::Phreeze */

/** import supporting libraries */
require_once("IObserver.php");
 
/**
 * ObserverToBrowser is an implementation of IObserver that prints all
 * messages to the browser
 *
 * @package    verysimple::Phreeze 
 * @author     VerySimple Inc.
 * @copyright  1997-2005 VerySimple, Inc.
 * @license    http://www.gnu.org/licenses/lgpl.html  LGPL
 * @version    2.0
 */
class ObserveToBrowser implements IObserver
{
	
	public function Observe($obj, $ltype = OBSERVE_INFO)
	{
		if (is_object($obj) || is_array($obj))
		{
			$msg = "<pre>" . print_r($obj, 1) . "</pre>";
		}
		else
		{
			$msg = $obj;
		}
		
		switch ($ltype)<commit_msg>add timestamp to observer<commit_after><?php
/** @package    verysimple::Phreeze */

/** import supporting libraries */
require_once("IObserver.php");
 
/**
 * ObserverToBrowser is an implementation of IObserver that prints all
 * messages to the browser
 *
 * @package    verysimple::Phreeze 
 * @author     VerySimple Inc.
 * @copyright  1997-2005 VerySimple, Inc.
 * @license    http://www.gnu.org/licenses/lgpl.html  LGPL
 * @version    2.0
 */
class ObserveToBrowser implements IObserver
{
	
	public function Observe($obj, $ltype = OBSERVE_INFO)
	{
		$msg = '<strong>' . number_format(microtime(true),2,'.','') . '</strong>: ';
		
		if (is_object($obj) || is_array($obj))
		{
			$msg .= "<pre>" . print_r($obj, 1) . "</pre>";
		}
		else
		{
			$msg .= $obj;
		}
		
		switch ($ltype)
{'fraction_non_alphanumeric': 0.16035182679296348, 'fraction_numerical': 0.015561569688768605, 'mean_word_length': 3.311953352769679, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '967737', 'n_tokens_mistral': 550, 'n_tokens_neox': 489, 'n_words': 118}