src/InfinityBase/Service/AbstractServiceTrait.php
protected function addMessage($message, $namespace = FlashMessenger::NAMESPACE_DEFAULT)
    {
        // Load flashMessenger
        if (null === $this->messenger) {
            $this->messenger = $this->getServiceLocator()
                    ->get('ControllerPluginManager')
                    ->get('flashMessenger');
        }

        // Set current namespace
        $this->messenger->setNamespace($namespace);

        // Add messages
        $message = (array) $message;
        foreach ($message as $value) {
            $this->messenger->addMessage($value);
        }
    }
protected function addMessage($message, $namespace = FlashMessenger::NAMESPACE_DEFAULT)
    {
        // Load flashMessenger
        if (null === $this->messenger) {
            $this->messenger = $this->getServiceLocator()
                    ->get('ControllerPluginManager')
                    ->get('flashMessenger');
        }

        // Set current namespace
        $this->messenger->setNamespace($namespace);

        // Add messages
        $message = (array) $message;
        foreach ($message as $value) {
            $this->messenger->addMessage($value);
        }
    }
protected function addMessage ( $ message , $ namespace = FlashMessenger :: NAMESPACE_DEFAULT ) { // Load flashMessenger if ( null === $ this -> messenger ) { $ this -> messenger = $ this -> getServiceLocator ( ) -> get ( 'ControllerPluginManager' ) -> get ( 'flashMessenger' ) ; } // Set current namespace $ this -> messenger -> setNamespace ( $ namespace ) ; // Add messages $ message = ( array ) $ message ; foreach ( $ message as $ value ) { $ this -> messenger -> addMessage ( $ value ) ; } }
Add a message to the flashMessenger

@param string|array $message
@param string $namespace
Add a message to the flashMessenger