|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
|
|
3
|
|
|
namespace AlecRabbit\ConsoleColour; |
|
4
|
|
|
|
|
5
|
|
|
use AlecRabbit\ConsoleColour\Contracts\Color; |
|
6
|
|
|
use AlecRabbit\ConsoleColour\Contracts\Effect; |
|
7
|
|
|
use AlecRabbit\ConsoleColour\Core\AbstractThemes; |
|
8
|
|
|
use AlecRabbit\ConsoleColour\Themes\Contracts\ActionsThemes; |
|
9
|
|
|
use AlecRabbit\ConsoleColour\Themes\Contracts\ColorsThemes; |
|
10
|
|
|
use AlecRabbit\ConsoleColour\Themes\Contracts\EffectsThemes; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* @method debug(string $text) |
|
14
|
|
|
* @method comment(string $text) |
|
15
|
|
|
* @method info(string $text) |
|
16
|
|
|
* @method error(string $text) |
|
17
|
|
|
* @method yellow(string $text) |
|
18
|
|
|
* @method green(string $text) |
|
19
|
|
|
* @method red(string $text) |
|
20
|
|
|
* @method cyan(string $text) |
|
21
|
|
|
* @method magenta(string $text) |
|
22
|
|
|
* @method black(string $text) |
|
23
|
|
|
* @method blue(string $text) |
|
24
|
|
|
* @method lightGray(string $text) |
|
25
|
|
|
* @method darkGray(string $text) |
|
26
|
|
|
* @method lightRed(string $text) |
|
27
|
|
|
* @method lightGreen(string $text) |
|
28
|
|
|
* @method lightYellow(string $text) |
|
29
|
|
|
* @method lightBlue(string $text) |
|
30
|
|
|
* @method lightMagenta(string $text) |
|
31
|
|
|
* @method lightCyan(string $text) |
|
32
|
|
|
* @method white(string $text) |
|
33
|
|
|
* @method italic(string $text) |
|
34
|
|
|
* @method bold(string $text) |
|
35
|
|
|
* @method dark(string $text) |
|
36
|
|
|
* @method crossed(string $text) |
|
37
|
|
|
* @method darkItalic(string $text) |
|
38
|
|
|
* @method whiteBold(string $text) |
|
39
|
|
|
* @method underlined(string $text) |
|
40
|
|
|
* @method underlinedBold(string $text) |
|
41
|
|
|
* @method underlinedItalic(string $text) |
|
42
|
|
|
*/ |
|
43
|
|
|
class Themes extends AbstractThemes implements EffectsThemes, ActionsThemes, ColorsThemes |
|
44
|
|
|
{ |
|
45
|
|
|
public const DARK_ITALIC = 'darkItalic'; |
|
46
|
|
|
public const WHITE_BOLD = 'whiteBold'; |
|
47
|
|
|
public const UNDERLINED_BOLD = 'underlinedBold'; |
|
48
|
|
|
public const UNDERLINED_ITALIC = 'underlinedItalic'; |
|
49
|
|
|
|
|
50
|
|
|
public const THEMES = [ |
|
51
|
|
|
self::DARK_ITALIC => [Effect::DARK, Effect::ITALIC], |
|
52
|
|
|
self::WHITE_BOLD => [Color::WHITE, Effect::BOLD], |
|
53
|
|
|
self::UNDERLINED_BOLD => [Effect::UNDERLINE, Effect::BOLD], |
|
54
|
|
|
self::UNDERLINED_ITALIC => [Effect::UNDERLINE, Effect::ITALIC], |
|
55
|
|
|
]; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @return array |
|
59
|
|
|
*/ |
|
60
|
6 |
|
protected function prepareThemes(): array |
|
61
|
|
|
{ |
|
62
|
6 |
|
return \array_merge(static::ACTIONS, static::COLORS, static::EFFECTS, static::THEMES); |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|