public function flush($caller = null)
    {
        $flushed = 0;
        if (count($this->statusMessages)) {
            foreach ($this->statusMessages as $type => $messages) {
                foreach ($messages as $messageID => $message) {
                    if (!isset($this->flushed[$type][$messageID])) {
                        $this->addToLog($caller, $message, $type);
                        $this->flushed[$type][$messageID] = true;
                        ++$flushed;
                    }
                }
            }
        }

        return $flushed;
    }
public function flush($caller = null)
    {
        $flushed = 0;
        if (count($this->statusMessages)) {
            foreach ($this->statusMessages as $type => $messages) {
                foreach ($messages as $messageID => $message) {
                    if (!isset($this->flushed[$type][$messageID])) {
                        $this->addToLog($caller, $message, $type);
                        $this->flushed[$type][$messageID] = true;
                        ++$flushed;
                    }
                }
            }
        }

        return $flushed;
    }
public function flush ( $ caller = null ) { $ flushed = 0 ; if ( count ( $ this -> statusMessages ) ) { foreach ( $ this -> statusMessages as $ type => $ messages ) { foreach ( $ messages as $ messageID => $ message ) { if ( ! isset ( $ this -> flushed [ $ type ] [ $ messageID ] ) ) { $ this -> addToLog ( $ caller , $ message , $ type ) ; $ this -> flushed [ $ type ] [ $ messageID ] = true ; ++ $ flushed ; } } } } return $ flushed ; }
Flush Messages.

@param string $caller

@return int how many messages was flushed
Flush Messages .