Write a status message to the console.

@param  string  $from
@param  string  $to
@param  string  $type
@return void
16932
protected function status($from, $to, $type)
    {
        $from = str_replace(base_path(), '', realpath($from));

        $to = str_replace(base_path(), '', realpath($to));

        $this->output->writeln('<info>Copied '.$type.'</info> <comment>['.$from.']</comment> <info>To</info> <comment>['.$to.']</comment>');
    }
976300
protected function publishDirectory($from, $to)
    {
        $this->moveManagedFiles(new MountManager([
            'from' => new Flysystem(new LocalAdapter($from)),
            'to' => new Flysystem(new LocalAdapter($to)),
        ]));
    }
411036
public function output(string $type, string $style, string $message, $status = true)
    {
        $text = '....';

        if ($status === true) {
            $text .= '<success>OK</>';
        } elseif ($status === false) {
            $text = '';
        } else {
            $text .= "<info>{$status}</>";
        }

        $type = "<{$style}>{$type}</>";

        $this->output->writeln(
            sprintf(
                '%s: %s %s',
                $type,
                $message,
                $text
            )
        );
    }
298019
public function sendMessage($body, $to, $item = NULL, $type = NULL, $subject = NULL, $tobare = false) {
		$to = new JID($to);
		$this->send('<message ' . (is_null($type) ? ' ' : 'type="' . $type . '" ') . 'from="' . (is_null($item) ? ($from = $this->component_name) : ($from = $item . '@' . $this->component_name)) . '" to="' . ($tobare ? htmlspecialchars($to->bare()) : htmlspecialchars($to)) . '">' . (is_null($subject) ? '' : '<subject>' . htmlspecialchars($subject) . '</subject>') . '<body>' . htmlspecialchars($body) . '</body></message>');
		$this->log("sent <message> from {$from} to {$to}", true, PHP_COMPONENT_MESSAGE_INFO);
	}
179185
public function redirect($from, $to, $status = 302)
    {
        $handler = function ($request, ResponseInterface $response) use ($to, $status) {
            return $response->withHeader('Location', (string)$to)->withStatus($status);
        };

        return $this->get($from, $handler);
    }
849545
public function moveFile( $from, $to )
	{
		$this->connection->checkConnection();
		return @ftp_rename( $this->connection->getResource(), $from, $to );
	}
953509
public function replaceMemberAuthor(User $from, User $to)
    {
        $fromIsMember = false;
        $froms = $this->memberRepo->findByUser($from);
        if (count($froms) > 0) {
            $fromIsMember = true;
        }

        $toIsMember = false;
        $tos = $this->memberRepo->findByUser($to);
        if (count($tos) > 0) {
            $toIsMember = true;
        }

        if ($toIsMember && $fromIsMember) {
            //user kept already have its member entry, delete the old one
            foreach ($froms as $member) {
                $this->objectManager->remove($member);
            }
            $this->objectManager->flush();
        } elseif (!$toIsMember && $fromIsMember) {
            //update entry for kept user
            foreach ($froms as $member) {
                $member->setUser($to);
            }
            $this->objectManager->flush();
        }
    }
115680
private function publishSymlink(string $origin, string $from, string $to)
    {
        $this->io->write(sprintf('Trying to install assets %s as symbolic links.', $origin));
        try {
            $this->filesystem->symlink($from, $to);
            $this->io->write(sprintf('Assets %s were installed using symbolic links.', $origin));
        } catch (IOException $e) {
            $this->io->write(sprintf(
                'It looks like your system doesn\'t support symbolic links,
                 so assets %s were installed by copying them.',
                $origin
            ));
            $this->filesystem->mirror($origin, $to);
        }
    }
645056
public function deleteOldType(Type $fromType)
    {
        $this->contentTypeGateway->delete($fromType->id, $fromType->status, $fromType->fieldDefinitions);
    }
167468
private function copyFromTo($from, $to)
    {
        $directory = dirname($to);
        if (!is_dir($directory)) {
            mkdir($directory, 0777, true);
        }

        copy($from, $to);
    }
84274
public static function sendFatal($error, $toSend = null)
    {
        $toJson = ['error' => utf8_encode($error)];
        if (isset($toSend)) {
            $toJson = array_merge($toSend, $toJson);
        }

        exit(json_encode($toJson));
    }
146520
protected function writeStatus(Job $job, $status, $type)
    {
        $date = Carbon::now()->format('Y-m-d H:i:s');

        $message = sprintf("<{$type}>[%s] %s</{$type}> %s", $date, str_pad("{$status}:", 11), $job->resolveName());

        $this->output->writeln($message);
    }
1014812
public function onMessage(ConnectionInterface $from, $msg) {
    $data = json_decode($msg, true);
    if (!$data['action']
        || !in_array(
            $data['action'],
            ['authenticate', 'subscribe', 'unsubscribe', 'publish']
        )) {
      return;
    }
    switch ($data['action']) {
      case 'authenticate':
        $this->handleAuthentication($from, $data);
        break;
      case 'subscribe':
      case 'unsubscribe':
        $this->handleSubscription($from, $data);
        break;
      case 'publish':
        $this->handlePublish($from, $msg, $data);
        break;
    }
  }
492199
public function redirectWithMessage(
        string $to,
        ?string $message = null,
        string $type = 'success'
    ): RedirectResponse {
        return \redirect_with_message($to, $message, $type);
    }
1010940
public function copyHeader(ParentHeaderPart $from, ParentHeaderPart $to, $header, $default = null)
    {
        $fromHeader = $from->getHeader($header);
        $set = ($fromHeader !== null) ? $fromHeader->getRawValue() : $default;
        if ($set !== null) {
            $to->setRawHeader($header, $set);
        }
    }
680197
public function moveDataFile($from, $to)
    {
        if (str_contains($from, '*.')) {
            $this->moveFilesWildcard($from, $to);

            return;
        }

        if (file_exists($from = $this->dataDir($from))) {
            $this->mkDir(dirname($to = $this->dataDir($to)));

            rename($from, $to);
        }
    }
1003475
public function seeResponseCodeIsBetween($from, $to)
    {
        $failureMessage = sprintf(
            'Expected HTTP Status Code between %s and %s. Actual Status Code: %s',
            HttpCode::getDescription($from),
            HttpCode::getDescription($to),
            HttpCode::getDescription($this->getResponseStatusCode())
        );
        $this->assertGreaterThanOrEqual($from, $this->getResponseStatusCode(), $failureMessage);
        $this->assertLessThanOrEqual($to, $this->getResponseStatusCode(), $failureMessage);
    }