<commit_before><?php
/**
 * @version     $Id: default.php 2776 2011-01-01 17:08:00Z johanjanssens $
 * @package     Nooku_Plugins
 * @subpackage  Koowa
 * @copyright  	Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Application Event Subscriber Class
.*
 * @author		<NAME> <<EMAIL>>
 * @package     Nooku_Components
 * @subpackage  Debug
 */

class ComDebugEventSubscriberApplication extends KEventSubscriberAbstract
{
    public function __construct(KConfig $config)
	{
	    //Intercept the events for profiling
	    if(JFactory::getApplication()->getCfg('debug'))
	    {
	        //Replace the event dispatcher
	        KService::setAlias('koowa:event.dispatcher', 'com://admin/debug.event.profiler');
	          
	        //Add the database tracer<commit_msg>re #228 : Replaced JFactory::getApplication() with $this->getService('application')<commit_after><?php
/**
 * @version     $Id: default.php 2776 2011-01-01 17:08:00Z johanjanssens $
 * @package     Nooku_Plugins
 * @subpackage  Koowa
 * @copyright  	Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Application Event Subscriber Class
.*
 * @author		<NAME> <<EMAIL>>
 * @package     Nooku_Components
 * @subpackage  Debug
 */

class ComDebugEventSubscriberApplication extends KEventSubscriberAbstract
{
    public function __construct(KConfig $config)
	{
	    //Intercept the events for profiling
	    if($this->getService('application')->getCfg('debug'))
	    {
	        //Replace the event dispatcher
	        KService::setAlias('koowa:event.dispatcher', 'com://admin/debug.event.profiler');
	          
	        //Add the database tracer
{'fraction_non_alphanumeric': 0.1341077085533263, 'fraction_numerical': 0.03009503695881732, 'mean_word_length': 3.183222958057395, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '5014246', 'n_tokens_mistral': 649, 'n_tokens_neox': 585, 'n_words': 130}