autoLink.

@param $message
546486
protected function autoLink($message)
    {
        $regex = '#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#';

        return preg_replace_callback($regex, function ($matches) {
            return $this->createLinkString($matches[0], $matches[0]);
        }, $message);
    }
625546
protected function onMasterMessage(string $message): Generator
    {
        yield Dispatcher::async($this->broadcast(Frame::encode($message), false));
    }
403146
public function logMessage($message)
    {
        $this->logger->info(strip_tags($message));

        if ($this->sendToBrowser) {
            $this->sendMessageToBrowser($message);
        }

        if ($this->sendToCli) {
            $this->sendMessageToCli($message);
        }
    }
915696
public function autolink($input, $newWindow = false, $defaultProtocol = 'http://')
    {
        $target = $newWindow ? ' target="_blank"' : '';
        $output = preg_replace_callback(
            '/(http:\/\/|https:\/\/|(www\.))(([^\s<]{4,80})[^\s<]*)/',
            function (array $matches) use ($target, $defaultProtocol) {
                $protocol = strpos($matches[1], ':') ? $matches[1] : $defaultProtocol;
                return "<a href=\"{$protocol}{$matches[2]}{$matches[3]}\"{$target} rel=\"nofollow\">{$matches[2]}{$matches[4]}</a>";
            },
            $input);

        return $output;
    }
486238
public function delete($message)
    {
        if (!$message instanceof QueueMessage) {
            $msg = new QueueMessage();
            $msg->setId($message);
        }

        $this->driver->delete($message);

        $message->isDeleted(true);
    }
230831
private function step($step, $message)
    {
        $step = 'Step ' . $step;
        $this->io->block($message, $step, 'fg=white;bg=blue', ' ', true);
    }
222972
protected function appendMessage(string $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > $this->config['max_messages']) {
            array_shift($this->messages);
        }
    }
493527
protected function buildAttachments($message)
    {
        foreach ($this->attachments as $attachment) {
            $message->attach($attachment['file'], $attachment['options']);
        }

        foreach ($this->rawAttachments as $attachment) {
            $message->attachData(
                $attachment['data'], $attachment['name'], $attachment['options']
            );
        }

        $this->buildDiskAttachments($message);

        return $this;
    }
664055
protected function sendEmail($message): void
    {
        $snooze = \is_numeric($this->emailSnooze)
            ? $this->emailSnooze
            : \strtotime($this->emailSnooze) - \time();

        if ($this->email && $this->mailer
            && @\filemtime($this->directory . '/email-sent') + $snooze < \time() // @ file may not exist
            && @\file_put_contents($this->directory . '/email-sent', 'sent') // @ file may not be writable
        ) {
            ($this->mailer)($message, \implode(', ', (array) $this->email));
        }
    }
263970
public function message($message)
    {
        if (isset($this->currentRule)) {
            static::$messages[$this->input.'.'.$this->currentRule] = $message;
        }

        return $this;
    }
934990
public function add($message)
    {
        $this->_messages[] = $this->log_timestamp() . $message . PHP_EOL;
        $this->debug($message);
    }
838509
public static function message(Message $message): void
    {
        static::init();

        foreach (static::$adapters as $adapter) {
            /* @var $adapter \Koldy\Log\Adapter\AbstractLogAdapter */
            if ($adapter->isLevelEnabled($message->getLevel())) {
                $adapter->logMessage($message);
            }
        }
    }
761400
public function addMessage($message) {
        $migrationName = get_class($this);
        $this->messages[] = sprintf("%s:  %s\n", $migrationName, $message);
    }
936751
public function send(Message $message) : void
    {
        $sender = $this->smtp['sender'];
        $recipients = is_array($sender['to']) ? $sender['to'] : [$sender['to']];

        $message->setFrom($sender['email'], $sender['name']);

        foreach ($recipients as $to)
        {
            $message->addTo($to);
        }

        $mailer = new \Nette\Mail\SmtpMailer($this->smtp['config']);
        $mailer->send($message);
    }
1234016
protected function log($message)
    {
        if ($this->log_handle == null) {
            $this->log_handle = fopen($this->config['logfile'], 'a');
        }
        fwrite($this->log_handle, $message);
    }
758292
protected function appendMessage(Message $message): void
    {
        $this->messages[] = $message;

        if (sizeof($this->messages) > 100) {
            array_shift($this->messages);
        }
    }
1042260
public function addMessage(Message $message)
    {
        $type = $message->getType();
        if (!array_key_exists($type, $this->messages)) {
            $this->messages[$type] = [];
        }

        if ($message->getId() !== null) {
            $this->messages[$type][$message->getId()] = $message;
        } else {
            $this->messages[$type][] = $message;
        }

        return $this;
    }