<commit_before><?php

namespace Isa\CMessage;

/**
 * Store a message in session and print it out.
 *
 */
class CMessage 
{
	use \Anax\DI\TInjectable;

	private $sessionKey;
	
	
    
	public function __construct(){
		 $this->sessionKey = 'messages';
	}
	
	
	/**
	 * Add errormessage in the session
	 *
	 */
	public function addMessage($message, $type) {
		//$messages = $_SESSION[$this->sessionKey];
		$messages = $this->session->get($this->sessionKey, []);<commit_msg>Done som changes with session handeling<commit_after><?php

namespace Isa\CMessage;

/**
 * Store a message in session and print it out.
 *
 */
class CMessage 
{
	use \Anax\DI\TInjectable;

	public $sessionKey=null;
	
	
    
	public function __construct($di){
		 $this->sessionKey = 'messages';
		 
		 $this->di = $di;
	}
	
	
	/**
	 * Add errormessage in the session
	 *
	 */
	public function addMessage($message, $type) {
		//$messages = $_SESSION[$this->sessionKey];
		$messages = $this->session->get($this->sessionKey, []);
{'fraction_non_alphanumeric': 0.15477386934673368, 'fraction_numerical': 0.0, 'mean_word_length': 3.3876651982378854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3363641', 'n_tokens_mistral': 352, 'n_tokens_neox': 322, 'n_words': 79}