/** * @param string $message * @param bool $reset */ public function overWriteHeader($message, $reset = False) { if ($reset) { $this->lastMessageLength = 0; } echo str_repeat(chr(8), $this->lastMessageLength); echo str_repeat(" ", $this->lastMessageLength); echo str_repeat(chr(8), $this->lastMessageLength); $this->lastMessageLength = strlen($message); echo $this->cli->headerOver($message); }
/** * Echo a updated release name to CLI. * * @param array $data * array( * 'new_name' => (string) The new release search name. * 'old_name' => (string) The old release search name. * 'new_category' => (string) The new category name or ID for the release. * 'old_category' => (string) The old category name or ID for the release. * 'group' => (string) The group name or ID of the release. * 'release_id' => (int) The ID of the release. * 'method' => (string) The method used to rename the release. * ) * * @access public * @static * @void */ public static function echoChangedReleaseName(array $data = ['new_name' => '', 'old_name' => '', 'new_category' => '', 'old_category' => '', 'group' => '', 'release_id' => 0, 'method' => '']) { echo PHP_EOL . ColorCLI::headerOver('New name: ') . ColorCLI::primaryOver($data['new_name']) . PHP_EOL . ColorCLI::headerOver('Old name: ') . ColorCLI::primaryOver($data['old_name']) . PHP_EOL . ColorCLI::headerOver('New category: ') . ColorCLI::primaryOver($data['new_category']) . PHP_EOL . ColorCLI::headerOver('Old category: ') . ColorCLI::primaryOver($data['old_category']) . PHP_EOL . ColorCLI::headerOver('Group: ') . ColorCLI::primaryOver($data['group']) . PHP_EOL . ColorCLI::headerOver('Release ID: ') . ColorCLI::primaryOver($data['release_id']) . PHP_EOL . ColorCLI::headerOver('Method: ') . ColorCLI::primaryOver($data['method']) . PHP_EOL; }