You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/vendor/songshenzong/support/src/BashEcho.php

72 lines
1.5 KiB

<?php
namespace Songshenzong\Support;
/**
* Class BashEcho
*
* @package Songshenzong\Support
*/
class BashEcho
{
/**
* @param string $string
*/
public static function echoRed($string)
{
$cmd = "echo -ne \"\033[31m" . $string . " \033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
/**
* @param string $string
*/
public static function echoCyan($string)
{
$cmd = "printf \"\033[35m" . $string . "\033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
/**
* @param string $string
*/
public static function echoGreen($string)
{
$cmd = "printf \"\033[32m" . $string . "\033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
/**
* @param string $string
*/
public static function echoBrown($string)
{
$cmd = "printf \"\033[33m" . $string . "\033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
/**
* @param string $string
*/
public static function echoBlue($string)
{
$cmd = "printf \"\033[34m" . $string . "\033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
/**
* @param string $string
*/
public static function echoPurple($string)
{
$cmd = "printf \"\033[35m" . $string . "\033[0m\n\"";
$a = exec($cmd);
print $a . PHP_EOL;
}
}