2024-09-04 16:12:03 +03:00
|
|
|
<?php
|
|
|
|
namespace ContingentParser;
|
|
|
|
|
2024-09-06 14:11:38 +03:00
|
|
|
final class Printer
|
2024-09-04 16:12:03 +03:00
|
|
|
{
|
2024-09-06 14:11:38 +03:00
|
|
|
public static function print(
|
|
|
|
int|string $text = '',
|
|
|
|
Color $color = Color::WHITE
|
|
|
|
): void {
|
2024-09-04 16:12:03 +03:00
|
|
|
print($color->tostring().$text.Color::WHITE->tostring());
|
|
|
|
}
|
|
|
|
|
2024-09-06 14:11:38 +03:00
|
|
|
public static function println(
|
|
|
|
int|string $text = '',
|
|
|
|
Color $color = Color::WHITE
|
|
|
|
): void {
|
2024-09-04 16:12:03 +03:00
|
|
|
print($color->tostring().$text.Color::WHITE->tostring());
|
|
|
|
print(PHP_EOL);
|
|
|
|
}
|
|
|
|
|
2024-09-06 14:11:38 +03:00
|
|
|
public static function print_r(
|
|
|
|
mixed $value,
|
|
|
|
Color $color = Color::WHITE
|
|
|
|
): void {
|
2024-09-04 16:12:03 +03:00
|
|
|
print($color->tostring());
|
|
|
|
print_r($value);
|
|
|
|
print(Color::WHITE->tostring());
|
|
|
|
}
|
2024-09-06 14:11:38 +03:00
|
|
|
}
|