1 | <?php |
||
5 | class BackgroundColor extends Color |
||
6 | { |
||
7 | /** |
||
8 | * The difference to add to a foreground color code |
||
9 | * to get a background color code |
||
10 | * |
||
11 | * @const integer ADD |
||
12 | */ |
||
13 | const ADD = 10; |
||
14 | |||
15 | /** |
||
16 | * Get the code for the requested color |
||
17 | * |
||
18 | * @param mixed $val |
||
19 | * |
||
20 | * @return mixed |
||
21 | */ |
||
22 | 56 | public function get($val) |
|
32 | |||
33 | /** |
||
34 | * Set the current background color |
||
35 | * |
||
36 | * @param mixed $val |
||
37 | * |
||
38 | * @return boolean |
||
39 | */ |
||
40 | 52 | public function set($val) |
|
44 | |||
45 | /** |
||
46 | * Get all of the available background colors |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | 576 | public function all() |
|
60 | |||
61 | /** |
||
62 | * Strip the color of any prefixes |
||
63 | * |
||
64 | * @param string $val |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 56 | protected function strip($val) |
|
72 | } |
||
73 |