<commit_before><?php
/**
 * @version     $Id$
 * @category	Koowa
 * @package     Koowa_Event
 * @copyright   Copyright (C) 2007 - 2010 <NAME>. All rights reserved.
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Class to handle events.
 *
 * @author      <NAME> <<EMAIL>>
 * @category    Koowa
 * @package     Koowa_Event
 */
class KEventListener extends KObject implements KObjectIdentifiable
{
 	/**
     * List of event handlers
     *
     * @var array
     */
    private $__event_handlers;
    
    /**
     * The event priority
     *
     * @var int
     */
    protected $_priority;
    
	/**
	 * Constructor.
	 *
	 * @param 	object 	An optional KConfig object with configuration options.
	 */
	public function __construct(KConfig $config)
	{
		parent::__construct($config);
	
		 $this->_priority = $config->priority;
		
		if($config->auto_connect) {
		    $this->connect($config->dispatcher);
		}
	}
 	
 	/**
     * Initializes the options for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param 	object 	An optional KConfig object with configuration options.
     * @return 	void
     */
    protected function _initialize(KConfig $config)
    {
    	$config->append(array(
        	'dispatcher'   => KFactory::get('lib.koowa.event.dispatcher'),
    	    'auto_connect' => true,
    		'priority'     => KCommand::PRIORITY_NORMAL 
        ));

        parent::_initialize($config);
    }<commit_msg>re #135 : Changed identifier to URL format (type:[//application/]package.path.name)<commit_after><?php
/**
 * @version     $Id$
 * @category	Koowa
 * @package     Koowa_Event
 * @copyright   Copyright (C) 2007 - 2010 <NAME>. All rights reserved.
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Class to handle events.
 *
 * @author      <NAME> <<EMAIL>>
 * @category    Koowa
 * @package     Koowa_Event
 */
class KEventListener extends KObject implements KObjectIdentifiable
{
 	/**
     * List of event handlers
     *
     * @var array
     */
    private $__event_handlers;
    
    /**
     * The event priority
     *
     * @var int
     */
    protected $_priority;
    
	/**
	 * Constructor.
	 *
	 * @param 	object 	An optional KConfig object with configuration options.
	 */
	public function __construct(KConfig $config)
	{
		parent::__construct($config);
	
		 $this->_priority = $config->priority;
		
		if($config->auto_connect) {
		    $this->connect($config->dispatcher);
		}
	}
 	
 	/**
     * Initializes the options for the object
     *
     * Called from {@link __construct()} as a first step of object instantiation.
     *
     * @param 	object 	An optional KConfig object with configuration options.
     * @return 	void
     */
    protected function _initialize(KConfig $config)
    {
    	$config->append(array(
        	'dispatcher'   => KFactory::get('koowa:event.dispatcher'),
    	    'auto_connect' => true,
    		'priority'     => KCommand::PRIORITY_NORMAL 
        ));

        parent::_initialize($config);
    }
{'fraction_non_alphanumeric': 0.12967660114140775, 'fraction_numerical': 0.006658211794546607, 'mean_word_length': 2.4145021645021645, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2874689', 'n_tokens_mistral': 1030, 'n_tokens_neox': 968, 'n_words': 233}