-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamplecolor.php
59 lines (42 loc) · 2.17 KB
/
examplecolor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/*
<col0/><col1/><col2/><col3/><col4/><col5/> columns. col0=0 (left),col1--col5 every column of the page.
<option/> it shows all the options available (if the input has some options)
*/
use eftec\CliOne\CliOne;
include __DIR__.'/../src/CliOne.php';
include __DIR__.'/../src/CliOneParam.php';
$cli=new CliOne(); // we create an instance
$cli->createParam('test')->setInput(true,'option',['alpha','beta','gamma'])->add();
$cli->upLevel('level1')->showBread();
$cli->showValuesColumn(['hello','world','alpha','beta','gamma'],'option2');
$cli->upLevel('level2')->showBread();
$cli->showValuesColumn(['col1'=>'hello','col2'=>'world','col3'=>'alpha','col4'=>'beta','col5'=>'gamma'],'option2');
$cli->downLevel()->showBread();
$cli->showLine("<bold>bold</bold>");
$cli->showLine("<dim>dim</dim>");
$cli->showLine("<bred>background red</bred>");
$cli->showLine("<bblue>background red</bblue>");
$cli->showLine("<bwhite><black>background white</black> </bwhite>");
$cli->showLine("<byellow><blue>background yellow</blue></byellow>");
$cli->showLine("<red>error</red> (color red)");
$cli->showLine("<yellow>warning</yellow> (color yellow)");
$cli->showLine("<blue>information</blue> (blue)");
$cli->showLine("<yellow>yellow</yellow> (yellow)");
$cli->showLine("<green>green</green> (color green)");
$cli->showLine("<italic>italic</italic>");
$cli->showLine("<bold>bold</bold>");
$cli->showLine("<bold><yellow>bold yellow</yellow></bold>");
$cli->showLine("<strikethrough>stike</strikethrough>");
$cli->showLine("<underline>underline</underline>");
$cli->showLine("<cyan>cyan</cyan> (color cyan)");
$cli->showLine("<magenta>magenta</magenta> (color magenta)");
$cli->showLine("<bold><cyan>bold cyan</cyan></bold> (color cyan)");
$cli->showLine("<bold><magenta>bold magenta</magenta></bold> (color magenta)");
$cli->showLine("<bblue><col0/> col0</bblue>");
$cli->showLine("<bblue><col1/> col1</bblue>");
$cli->showLine("<bblue><col2/> col2</bblue>");
$cli->showLine("<bblue><col3/> col3</bblue>");
$cli->showLine("<bblue><col4/> col4</bblue>");
$cli->showLine("<bblue><col1/> col1 <col3/> col3 <col5/> col5</bblue>");
$cli->showLine("The parameters of option are: <option/>",$cli->getParameter('test'));