protected function addInstance(Message $message, $type, $flash = true, $format = null)
    {
        $message->setType($type);
        if ($message->isFlash() != $flash) {
            $message->setFlash($flash);
        }
        if (is_null($message->getFormat())) {
            $message->setFormat($this->getFormat($type));
        }
        if (!is_null($format)) {
            $message->setFormat($this->checkFormat($format, $type));
        }
    }
protected function addInstance(Message $message, $type, $flash = true, $format = null)
    {
        $message->setType($type);
        if ($message->isFlash() != $flash) {
            $message->setFlash($flash);
        }
        if (is_null($message->getFormat())) {
            $message->setFormat($this->getFormat($type));
        }
        if (!is_null($format)) {
            $message->setFormat($this->checkFormat($format, $type));
        }
    }
protected function addInstance ( Message $ message , $ type , $ flash = true , $ format = null ) { $ message -> setType ( $ type ) ; if ( $ message -> isFlash ( ) != $ flash ) { $ message -> setFlash ( $ flash ) ; } if ( is_null ( $ message -> getFormat ( ) ) ) { $ message -> setFormat ( $ this -> getFormat ( $ type ) ) ; } if ( ! is_null ( $ format ) ) { $ message -> setFormat ( $ this -> checkFormat ( $ format , $ type ) ) ; } }
Add message by instance.

@param \Krucas\Notification\Message $message
@param string $type
@param bool $flash
@param null $format
Add message by instance .