Core/Framework/Core.php
private function initMessageHandler()
    {
        $this->di->mapFactory('core.message.message_handler', '\Core\Message\MessageHandler');
        $this->di->mapFactory('core.message.message_storage', '\Core\Message\MessageStorage');
        $this->di->mapFactory('core.message.message', '\Core\Notification\Notifcation');

        /* @var $handler \Core\Message\MessageHandler */
        $handler = $this->di->get('core.message.message_handler');

        // Init a message session array if not exists until now
        if (empty($_SESSION['Core']['messages'])) {
            $_SESSION['Core']['messages'] = [];
        }

        // Create the message storage
        /* @var $storage \Core\Message\MessageStorage */
        $storage = $this->di->get('core.message.message_storage');
        $storage->setStorage($_SESSION['Core']['messages']);

        $handler->setStorage($storage);

        $this->message = new MessageFacade($handler);

        // Map the handler as frameworks default messagehandler
        $this->di->mapValue('core.message.default', $handler);
    }
private function initMessageHandler()
    {
        $this->di->mapFactory('core.message.message_handler', '\Core\Message\MessageHandler');
        $this->di->mapFactory('core.message.message_storage', '\Core\Message\MessageStorage');
        $this->di->mapFactory('core.message.message', '\Core\Notification\Notifcation');

        /* @var $handler \Core\Message\MessageHandler */
        $handler = $this->di->get('core.message.message_handler');

        // Init a message session array if not exists until now
        if (empty($_SESSION['Core']['messages'])) {
            $_SESSION['Core']['messages'] = [];
        }

        // Create the message storage
        /* @var $storage \Core\Message\MessageStorage */
        $storage = $this->di->get('core.message.message_storage');
        $storage->setStorage($_SESSION['Core']['messages']);

        $handler->setStorage($storage);

        $this->message = new MessageFacade($handler);

        // Map the handler as frameworks default messagehandler
        $this->di->mapValue('core.message.default', $handler);
    }
private function initMessageHandler ( ) { $ this -> di -> mapFactory ( 'core.message.message_handler' , '\Core\Message\MessageHandler' ) ; $ this -> di -> mapFactory ( 'core.message.message_storage' , '\Core\Message\MessageStorage' ) ; $ this -> di -> mapFactory ( 'core.message.message' , '\Core\Notification\Notifcation' ) ; /* @var $handler \Core\Message\MessageHandler */ $ handler = $ this -> di -> get ( 'core.message.message_handler' ) ; // Init a message session array if not exists until now if ( empty ( $ _SESSION [ 'Core' ] [ 'messages' ] ) ) { $ _SESSION [ 'Core' ] [ 'messages' ] = [ ] ; } // Create the message storage /* @var $storage \Core\Message\MessageStorage */ $ storage = $ this -> di -> get ( 'core.message.message_storage' ) ; $ storage -> setStorage ( $ _SESSION [ 'Core' ] [ 'messages' ] ) ; $ handler -> setStorage ( $ storage ) ; $ this -> message = new MessageFacade ( $ handler ) ; // Map the handler as frameworks default messagehandler $ this -> di -> mapValue ( 'core.message.default' , $ handler ) ; }
Inits message handler
Inits message handler