forked from inhere/php-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputInterface.php
More file actions
49 lines (42 loc) · 1.01 KB
/
Copy pathInputInterface.php
File metadata and controls
49 lines (42 loc) · 1.01 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
<?php
/**
* Created by PhpStorm.
* User: Inhere
* Date: 2016/4/23 0023
* Time: 10:22
*/
namespace inhere\console\io;
/**
* Class Input
* @package inhere\console\io
*/
interface InputInterface
{
/**
* These words will be as a Boolean value
*/
const TRUE_WORDS = '|on|yes|true|';
const FALSE_WORDS = '|off|no|false|';
/**
* 读取输入信息
* @param string $question 若不为空,则先输出文本消息
* @param bool $nl true 会添加换行符 false 原样输出,不添加换行符
* @return string
*/
public function read($question = null, $nl = false);
public function getScript();
public function getCommand();
/**
* get Argument
* @param null|int|string $name
* @param mixed $default
* @return mixed
*/
public function getArg($name, $default = null);
/**
* @param string $name
* @param null $default
* @return bool|mixed|null
*/
public function getOpt($name, $default = null);
}