Remove a message from the notifier

@param string $content
@param string $level
@param string $area
@return $this
547146
public function remove($content = null, $level = '', $area = '')
    {
        $area = $area ?: $this->workingArea ?: $this->defaultArea;
        $level = $level ?: $this->defaultLevel;

        $this->clear(is_array($content) ? $content : [
            'content' => $content,
            'level'   => $level,
            'area'    => $area,
        ]);

        $this->clearWorking();

        return $this;
    }
1270322
public function setContent($content)
    {

        if (!is_null($content) && (!preg_match("/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/", $content))) {
            throw new \InvalidArgumentException("invalid value for $content when calling SendSmtpEmailAttachment., must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.");
        }

        $this->container['content'] = $content;

        return $this;
    }
927602
private function logMessage(
        LoggerInterface $logger,
        string $level,
        string $value
    ) {
        /**
         * Logs content, using specified level.
         */
        $logger->$level($value);
    }
895302
public static function write($content, $level = self::DEBUG)
    {
        $now = date(' c ');
        $path = Config::get('log_path', __DIR__ . '/../../../../log');
        $destination = $path . '/mailer-' . date('Y-m-d') . '.log';
        // 自动创建日志目录
        if (!is_dir($path)) {
            mkdir($path, 0777, true);
        }
        $content = '[ ' . $level . ' ] ' . $content;
        error_log("[{$now}] " . $_SERVER['REMOTE_ADDR'] . ' ' . $_SERVER['REQUEST_URI'] . "\r\n{$content}\r\n", 3, $destination);
    }
807214
function remove_message($mailbox = null, $uids = null)
    {
        if (!($this->mode & self::MODE_MESSAGE)) {
            return;
        }

        if (!strlen($mailbox)) {
            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?",
                $this->userid);
        }
        else {
            // Remove the message from internal cache
            if (!empty($uids) && ($message = $this->icache['__message'])
                && $message['mailbox'] === $mailbox
                && in_array($message['object']->uid, (array)$uids)
            ) {
                $this->icache['__message'] = null;
            }

            $this->db->query(
                "DELETE FROM {$this->messages_table}"
                ." WHERE `user_id` = ?"
                    ." AND `mailbox` = ?"
                    .($uids !== null ? " AND `uid` IN (".$this->db->array2list((array)$uids, 'integer').")" : ""),
                $this->userid, $mailbox);
        }
    }
1013714
public function addRecord($level, $message, array $context = array())
    {
        $replacement = array();
        foreach ($context as $key=>$value) {
            if (!is_array($value)) {
                $rkey = '%'.$key.'%';
                $replacement[$rkey] = $value;
                if (false!==strpos($message,$rkey)) {
                    unset($context[$key]);
                }
            }
        }
        $message = strtr($message,$replacement);

        return parent::addRecord($level, $message, $context);
    }
1066272
public void removeMessage(CmsNotificationMessage message) {

        m_messages.remove(message);
        if (hasWidget()) {
            m_widget.removeMessage(message);
        }
    }
916126
public function clearMessages($item = null)
    {
        if (is_string($item)) {
            if (array_key_exists($item, $this->messages)) {
                unset($this->messages[$item]);
            }
        } elseif ($item === null) {
            $this->messages = array();
        }

        return $this;
    }
1359618
public function info($string, $level = null)
    {
        $this->out->level($level)->writeln("<info>$string</info>");
        
        return $this;
    }
716602
public function addLog($message, $level = LoggerInterface::INFO)
    {
        if ($this->logger) {
            $this->logger->log($message, $level);
        }

        return $this;
    }
1262860
private function setContent($content)
    {
        if (is_array($content))
            $this->content = $content;
        elseif (is_string($content))
            $this->content = trim($content);

        return $this;
    }
101208
public static function sendNotification(Notification $notification, $content = null)
    {
        $beforeSendCallback = $notification->beforeSendCallback();
        self::_performCallback($beforeSendCallback, $notification);

        if ($notification->locale() !== null) {
            I18n::locale($notification->locale());
        } else {
            I18n::locale(Configure::read('Notifications.defaultLocale'));
        }

        $notification->email()->send($content);

        $afterSendCallback = $notification->afterSendCallback();
        self::_performCallback($afterSendCallback);

        return $notification;
    }
855454
public function setHeading($text, $level = 3)
    {
        $this->heading = new Heading($text, $level);
        $this->heading->entity->setEntityName($text);

        return $this;
    }
956219
public static function ListItem( $content, $level = 0, $attributes = array() )
	{
		$depth	= 2 * abs( (int) $level ) + 1;
		$indent	= str_repeat( "  ", $depth );
		$tag	= UI_HTML_Tag::create( "li", $content, $attributes );
		$code	= $indent.$tag;
		return $code;
	}
83753
public function report($level, $message, ReviewInterface $review, ReviewableInterface $subject)
    {
        $issue = new Issue($level, $message, $review, $subject);

        $this->issues->append($issue);

        return $this;
    }
1283140
public function write($message, $level = null)
    {
        if ($this->isSilent()) {
            return;
        }

        if ($level && ($this->verbosity < $level)) {
            return;
        }

        $message = $this->filter->filter($message);
        $this->adapter->write($message);
    }
319819
private function keepMessage($level, $message) {
		if(static::LOG_LEVELS[$this->keepMessages] > static::LOG_LEVELS[$level]) {
			return;
		}

		if($level == '' || $level == 'LOG'){
			$keepMessage = $message;
		} else {
			$keepMessage = $level . " " . $message;
		}
		$this->logEntries[] = $keepMessage;
	}