Начало обработки по ссылкам

This commit is contained in:
2024-09-04 16:12:03 +03:00
parent 48b4d6cccf
commit 04374fef40
10 changed files with 633 additions and 103 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace ContingentParser;
enum Color : string
{
case WHITE = "\033[0m";
case GREEN = "\033[92m";
case RED = "\033[91m";
case BLUE = "\033[94m";
public static function create(string $color) : Color
{
switch ($color) {
case 'green':
return self::GREEN;
case 'red':
return self::RED;
case 'blue':
return self::BLUE;
default:
return self::WHITE;
}
}
public function tostring() : string
{
return $this->value;
}
}