pdf wip
This commit is contained in:
1 parent
9eb19cf8fd
commit
551ad2369e
17 files changed
+277
-38
No files matched your search
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Generate\Utilities;
|
||||
|
||||
class Notice
|
||||
{
|
||||
// note
|
||||
|
||||
public static function note($message, $color = '', $exit = false)
|
||||
{
|
||||
switch ($color) {
|
||||
case 'g':
|
||||
echo "\e[32m";
|
||||
break;
|
||||
case 'r':
|
||||
echo "\e[31m";
|
||||
break;
|
||||
case 'b':
|
||||
echo "\e[1;34m";
|
||||
break;
|
||||
default:
|
||||
echo "\e[39m";
|
||||
break;
|
||||
}
|
||||
|
||||
echo PHP_EOL.'-----------------------------------------------------------'.PHP_EOL;
|
||||
if (is_array($message)) {
|
||||
print_r($message);
|
||||
} else {
|
||||
echo $message.PHP_EOL;
|
||||
}
|
||||
echo '-----------------------------------------------------------'.PHP_EOL;
|
||||
echo "\e[39m";
|
||||
if ($exit) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
public static function html($message, $color = '', $exit = false)
|
||||
{
|
||||
switch ($color) {
|
||||
case 'g':
|
||||
echo '<div style="margin:10px; padding:3px; color:green; width=20rem; text-align:center; border:solid 1px green; background-color:lightgreen;">';
|
||||
break;
|
||||
case 'r':
|
||||
echo '<div style="margin:10px; padding:3px; color:red; width=20rem; text-align:center; border:solid 1px red; background-color:#fdd;">';
|
||||
break;
|
||||
case 'b':
|
||||
echo '<div style="margin:10px; padding:3px; color:blue; width=20rem; text-align:center; border:solid 1px blue; background-color:lightblue;">';
|
||||
break;
|
||||
default:
|
||||
echo '<div style="margin:10px; padding:3px; color:black; width=20rem; text-align:center; border:solid 1px black; background-color:#eee;">';
|
||||
break;
|
||||
}
|
||||
if (is_array($message)) {
|
||||
print_r($message);
|
||||
} else {
|
||||
echo $message;
|
||||
}
|
||||
echo '</div>';
|
||||
if ($exit) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user