-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsole.php
More file actions
43 lines (35 loc) · 833 Bytes
/
Copy pathConsole.php
File metadata and controls
43 lines (35 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
include __DIR__ . '/Colors.php';
/**
*
*/
class Console extends Colors
{
public function info($message = '')
{
echo $this->getColoredString("[INFO]", "light_blue") .' ' . $message . "\n";
}
public function warn($message = '')
{
echo $this->getColoredString("[WARNING]", "yellow") .' ' . $message . "\n";
}
public function error($message = '')
{
echo $this->getColoredString("[ERROR]", "light_red") .' ' . $message . "\n";
}
public function success($message = '')
{
echo $this->getColoredString("[SUCCESS]", "light_green") .' ' . $message . "\n";
}
public function line($message = '')
{
echo $message. "\n";
}
public function exec($value='', $showOutput = false)
{
$output = shell_exec($value);
if ($showOutput) {
$this->lineln($output);
}
}
}