forked from inhere/php-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTraitInteract.php
More file actions
61 lines (55 loc) · 1.42 KB
/
Copy pathTraitInteract.php
File metadata and controls
61 lines (55 loc) · 1.42 KB
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
60
61
<?php
/**
* Created by PhpStorm.
* User: inhere
* Date: 2017-03-17
* Time: 11:38
*/
namespace inhere\console\utils;
/**
* Class TraitInteract
* @package inhere\console\utils
*/
trait TraitInteract
{
/**
* @inheritdoc
* @see Interact::choice()
*/
public function select($description, $options, $default = null, $allowExit=true)
{
return $this->choice($description, $options, $default, $allowExit);
}
public function choice($description, $options, $default = null, $allowExit=true)
{
return Interact::choice($description, $options, $default, $allowExit);
}
/**
* @inheritdoc
* @see Interact::confirm()
*/
public function confirm($question, $default = true)
{
return Interact::confirm($question, $default);
}
/**
* @inheritdoc
* @see Interact::question()
*/
public function ask($question, $default = null, \Closure $validator = null)
{
return $this->question($question, $default, $validator);
}
public function question($question, $default = null, \Closure $validator = null)
{
return Interact::question($question, $default, $validator);
}
/**
* @inheritdoc
* @see Interact::loopAsk()
*/
public function loopAsk($question, $default = null, \Closure $validator = null, $times=3)
{
return Interact::loopAsk($question, $default, $validator, $times);
}
}